diff options
author | Javier <dev.git@javispedro.com> | 2021-03-21 14:37:19 +0100 |
---|---|---|
committer | Javier <dev.git@javispedro.com> | 2021-03-21 14:37:19 +0100 |
commit | 1a8180e65921bec7a941d93744bbbc79bb96f8f1 (patch) | |
tree | 2da43d13e32e5dc89a9d50c38a8e0aa832ba1f55 | |
parent | aaa3fffd45b2e47c1a2c88265340751bca4ad69d (diff) | |
download | autobluetether-1a8180e65921bec7a941d93744bbbc79bb96f8f1.tar.gz autobluetether-1a8180e65921bec7a941d93744bbbc79bb96f8f1.zip |
add new icons
19 files changed, 40 insertions, 9 deletions
diff --git a/app/src/main/ic_launcher-playstore.png b/app/src/main/ic_launcher-playstore.png Binary files differnew file mode 100644 index 0000000..14c0586 --- /dev/null +++ b/app/src/main/ic_launcher-playstore.png diff --git a/app/src/main/java/com/javispedro/autobluetether/DeviceFragment.java b/app/src/main/java/com/javispedro/autobluetether/DeviceFragment.java index 2f8099c..0876d6f 100644 --- a/app/src/main/java/com/javispedro/autobluetether/DeviceFragment.java +++ b/app/src/main/java/com/javispedro/autobluetether/DeviceFragment.java @@ -6,9 +6,11 @@ import android.content.Context; import android.content.SharedPreferences; import android.os.Bundle; import android.preference.PreferenceManager; +import android.util.Log; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; +import android.widget.Toast; import androidx.fragment.app.Fragment; import androidx.recyclerview.widget.GridLayoutManager; @@ -21,6 +23,8 @@ import java.util.ArrayList; * A fragment representing a list of Items. */ public class DeviceFragment extends Fragment { + private final static String TAG = "DeviceFragment"; + private RecyclerView mRecyclerView; private BtDeviceRecyclerViewAdapter mAdapter; private BtDeviceEnabledSetAdapter mEnabledAdapter; @@ -86,6 +90,11 @@ public class DeviceFragment extends Fragment { public void refreshList() { BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter(); + if (adapter == null) { + Log.e(TAG, "no bluetooth adapter found?"); + Toast.makeText(getContext(), getString(R.string.no_bluetooth_adapter), Toast.LENGTH_LONG).show(); + return; + } ArrayList<BluetoothDevice> devices = new ArrayList<>(adapter.getBondedDevices()); mAdapter.setValues(devices); } diff --git a/app/src/main/res/drawable/ic_launcher_foreground.xml b/app/src/main/res/drawable/ic_launcher_foreground.xml new file mode 100644 index 0000000..d2c7601 --- /dev/null +++ b/app/src/main/res/drawable/ic_launcher_foreground.xml @@ -0,0 +1,17 @@ +<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="108dp"
+ android:height="108dp"
+ android:viewportWidth="108"
+ android:viewportHeight="108">
+ <group android:scaleX="1.8371134"
+ android:scaleY="1.8371134"
+ android:translateX="25.677835"
+ android:translateY="27.208763">
+ <path
+ android:fillColor="#FF000000"
+ android:pathData="m13.44,14.1934h-8.78c-0.43,0 -0.81,0.28 -0.95,0.68l-1.66,5v6.81c0,0.29 0.23,0.51 0.5,0.51h1c0.28,0 0.5,-0.22 0.5,-0.5v-1.5h10v1.5c0,0.28 0.22,0.5 0.5,0.5h1c0.28,0 0.5,-0.22 0.5,-0.5v-6.81l-1.66,-5c-0.14,-0.41 -0.52,-0.69 -0.95,-0.69zM4.83,23.1934c-0.68,0 -1.22,-0.54 -1.22,-1.22s0.54,-1.22 1.22,-1.22 1.22,0.55 1.22,1.22 -0.54,1.22 -1.22,1.22zM13.27,23.1934c-0.67,0 -1.22,-0.54 -1.22,-1.22s0.54,-1.22 1.22,-1.22 1.22,0.54 1.22,1.22 -0.54,1.22 -1.22,1.22zM3.34,19.1934 L4.67,15.1934h8.78l1.33,4z"/>
+ <path
+ android:fillColor="#FF000000"
+ android:pathData="m22,26h2v-2h-2zM18,26h2v-2h-2zM26,26h2v-2h-2zM28.71,7.71 L23,2h-1v7.59l-4.59,-4.59 -1.41,1.41 5.59,5.59 -5.59,5.59 1.41,1.41 4.59,-4.59v7.59h1l5.71,-5.71 -4.3,-4.29zM24,5.83 L25.88,7.71 24,9.59zM25.88,16.29 L24,18.17v-3.76z"/>
+ </group>
+</vector>
diff --git a/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml index eca70cf..7353dbd 100644 --- a/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml +++ b/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> <adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android"> - <background android:drawable="@drawable/ic_launcher_background" /> - <foreground android:drawable="@drawable/ic_launcher_foreground" /> + <background android:drawable="@color/ic_launcher_background"/> + <foreground android:drawable="@drawable/ic_launcher_foreground"/> </adaptive-icon>
\ No newline at end of file diff --git a/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml index eca70cf..7353dbd 100644 --- a/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml +++ b/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> <adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android"> - <background android:drawable="@drawable/ic_launcher_background" /> - <foreground android:drawable="@drawable/ic_launcher_foreground" /> + <background android:drawable="@color/ic_launcher_background"/> + <foreground android:drawable="@drawable/ic_launcher_foreground"/> </adaptive-icon>
\ No newline at end of file diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher.png b/app/src/main/res/mipmap-hdpi/ic_launcher.png Binary files differindex a571e60..da57e35 100644 --- a/app/src/main/res/mipmap-hdpi/ic_launcher.png +++ b/app/src/main/res/mipmap-hdpi/ic_launcher.png diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher_round.png b/app/src/main/res/mipmap-hdpi/ic_launcher_round.png Binary files differindex 61da551..8487c0d 100644 --- a/app/src/main/res/mipmap-hdpi/ic_launcher_round.png +++ b/app/src/main/res/mipmap-hdpi/ic_launcher_round.png diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher.png b/app/src/main/res/mipmap-mdpi/ic_launcher.png Binary files differindex c41dd28..cda7844 100644 --- a/app/src/main/res/mipmap-mdpi/ic_launcher.png +++ b/app/src/main/res/mipmap-mdpi/ic_launcher.png diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher_round.png b/app/src/main/res/mipmap-mdpi/ic_launcher_round.png Binary files differindex db5080a..4d7f650 100644 --- a/app/src/main/res/mipmap-mdpi/ic_launcher_round.png +++ b/app/src/main/res/mipmap-mdpi/ic_launcher_round.png diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/app/src/main/res/mipmap-xhdpi/ic_launcher.png Binary files differindex 6dba46d..e918b2d 100644 --- a/app/src/main/res/mipmap-xhdpi/ic_launcher.png +++ b/app/src/main/res/mipmap-xhdpi/ic_launcher.png diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png b/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png Binary files differindex da31a87..b03a1f7 100644 --- a/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png +++ b/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/app/src/main/res/mipmap-xxhdpi/ic_launcher.png Binary files differindex 15ac681..53e9a8f 100644 --- a/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +++ b/app/src/main/res/mipmap-xxhdpi/ic_launcher.png diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png b/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png Binary files differindex b216f2d..42bf96a 100644 --- a/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png +++ b/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png Binary files differindex f25a419..c204d91 100644 --- a/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png +++ b/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png b/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png Binary files differindex e96783c..23d7a02 100644 --- a/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png +++ b/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml index 4faecfa..bb902ef 100644 --- a/app/src/main/res/values/colors.xml +++ b/app/src/main/res/values/colors.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <resources> - <color name="colorPrimary">#6200EE</color> - <color name="colorPrimaryDark">#3700B3</color> - <color name="colorAccent">#03DAC5</color> + <color name="colorPrimary">#0082FB</color> + <color name="colorPrimaryDark">#004687</color> + <color name="colorAccent">#03A9F4</color> </resources>
\ No newline at end of file diff --git a/app/src/main/res/values/ic_launcher_background.xml b/app/src/main/res/values/ic_launcher_background.xml new file mode 100644 index 0000000..f5aa0c2 --- /dev/null +++ b/app/src/main/res/values/ic_launcher_background.xml @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <color name="ic_launcher_background">#9ADDEE</color>
+</resources>
\ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index e86eff1..1800087 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -6,5 +6,7 @@ <string name="device_list_header">Bluetooth tethering will be enabled automatically when any of the following selected devices is connected:</string> + <string name="no_bluetooth_adapter">No Bluetooth adapter found on this device</string> + <string name="prefs_key_device_list">device_list</string> </resources>
\ No newline at end of file diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml index fac9291..6cfa1e1 100644 --- a/app/src/main/res/values/styles.xml +++ b/app/src/main/res/values/styles.xml @@ -1,10 +1,9 @@ <resources> <!-- Base application theme. --> - <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar"> + <style name="AppTheme" parent="Theme.AppCompat.DayNight.DarkActionBar"> <!-- Customize your theme here. --> <item name="colorPrimary">@color/colorPrimary</item> <item name="colorPrimaryDark">@color/colorPrimaryDark</item> <item name="colorAccent">@color/colorAccent</item> </style> - </resources>
\ No newline at end of file |