Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added info for bluetooth disabled in OBD selection #879

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M13,5.83l1.88,1.88 -1.6,1.6 1.41,1.41 3.02,-3.02L12,2h-1v5.03l2,2v-3.2zM5.41,4L4,5.41 10.59,12 5,17.59 6.41,19 11,14.41V22h1l4.29,-4.29 2.3,2.29L20,18.59 5.41,4zM13,18.17v-3.76l1.88,1.88L13,18.17z"/>
</vector>
13 changes: 4 additions & 9 deletions org.envirocar.app/res/layout/activity_obd_selection_fragment.xml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/obd_selection_avaiable_devices"
android:text="@string/obd_selection_available_devices"
android:textColor="@color/blue_dark_cario"
android:textSize="14sp" />

Expand Down Expand Up @@ -125,13 +125,8 @@

</androidx.constraintlayout.widget.ConstraintLayout>

<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:layout_margin="10dp"
android:gravity="center"
android:text="@string/obd_selection_bluetooth_disabled"
tools:layout_editor_absoluteX="26dp" />
<include
android:id="@+id/activity_logbook_not_logged_in"
layout="@layout/bluetooth_disabled_info" />

</LinearLayout>
61 changes: 61 additions & 0 deletions org.envirocar.app/res/layout/bluetooth_disabled_info.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
<?xml version="1.0" encoding="utf-8"?>
<!--

Copyright (C) 2013 - 2021 the enviroCar community

This file is part of the enviroCar app.

The enviroCar app is free software: you can redistribute it and/or
modify it under the terms of the GNU General Public License as published
by the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

The enviroCar app is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
Public License for more details.

You should have received a copy of the GNU General Public License along
with the enviroCar app. If not, see http://www.gnu.org/licenses/.

-->
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">

<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:orientation="vertical">

<ImageView
android:layout_width="175dp"
android:layout_height="175dp"
android:layout_gravity="center"
android:layout_margin="@dimen/spacing_xlarge"
android:alpha="0.24"
android:src="@drawable/ic_baseline_bluetooth_disabled_24"/>

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:alpha="0.54"
android:text="@string/obd_selection_bluetooth_disabled"
android:textSize="24sp"
android:textStyle="bold"/>

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_margin="@dimen/spacing_large"
android:alpha="0.54"
android:gravity="center"
android:text="@string/obd_selection_bluetooth_disabled_info"/>

</LinearLayout>

</RelativeLayout>
3 changes: 2 additions & 1 deletion org.envirocar.app/res/values-de/strings_obd_selection.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
<string name="obd_selection_bluetooth_on">Bluetooth An</string>
<string name="obd_selection_bluetooth_off">Bluetooth Aus</string>
<string name="obd_selection_bluetooth_disabled">Bluetooth ist deaktiviert.</string>
<string name="obd_selection_bluetooth_disabled_info">Bitte aktivieren Sie Bluetooth, bevor Sie nach anderen Geräten suchen können.</string>
<string name="obd_selection_bluetooth_disabled_snackbar">Bluetooth ist deaktiviert. Bitte aktivieren Sie Bluetooth, bevor Sie nach anderen Geräten suchen können.</string>
<string name="obd_selection_discovery_started">Suche gestartet!</string>
<string name="obd_selection_discovery_finished">Suche beendet!</string>
Expand All @@ -34,7 +35,7 @@
<string name="obd_selection_no_available_devices">Keine Bluetooth-Geräte gefunden.</string>

<string name="obd_selection_paired_devices">Gekoppelte Geräte</string>
<string name="obd_selection_avaiable_devices">Verfügbare Geräte</string>
<string name="obd_selection_available_devices">Verfügbare Geräte</string>

<string name="obd_selection_dialog_pairing_title">Gerät koppeln</string>
<string name="obd_selection_dialog_pairing_content_template">Möchten Sie ihr Gerät mit %s koppeln?</string>
Expand Down
3 changes: 2 additions & 1 deletion org.envirocar.app/res/values/strings_obd_selection.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
<string name="obd_selection_bluetooth_on">Bluetooth On</string>
<string name="obd_selection_bluetooth_off">Bluetooth Off</string>
<string name="obd_selection_bluetooth_disabled">Bluetooth is disabled.</string>
<string name="obd_selection_bluetooth_disabled_info">Please enable Bluetooth before you can discover other devices.</string>
<string name="obd_selection_bluetooth_disabled_snackbar">Bluetooth is disabled. Please enable Bluetooth before you can discover other devices.</string>
<string name="obd_selection_discovery_started">Bluetooth discovery started.</string>
<string name="obd_selection_discovery_finished">Bluetooth discovery finished.</string>
Expand All @@ -34,7 +35,7 @@
<string name="obd_selection_no_available_devices">No Bluetooth devices found</string>

<string name="obd_selection_paired_devices">Paired Devices</string>
<string name="obd_selection_avaiable_devices">Available Devices</string>
<string name="obd_selection_available_devices">Available Devices</string>

<string name="obd_selection_dialog_pairing_title">Pair Device</string>
<string name="obd_selection_dialog_pairing_content_template">Do you want to pair with %s?</string>
Expand Down