From 1a8180e65921bec7a941d93744bbbc79bb96f8f1 Mon Sep 17 00:00:00 2001 From: Javier Date: Sun, 21 Mar 2021 14:37:19 +0100 Subject: add new icons --- app/src/main/ic_launcher-playstore.png | Bin 0 -> 15889 bytes .../javispedro/autobluetether/DeviceFragment.java | 9 +++++++++ .../main/res/drawable/ic_launcher_foreground.xml | 17 +++++++++++++++++ app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml | 4 ++-- .../res/mipmap-anydpi-v26/ic_launcher_round.xml | 4 ++-- app/src/main/res/mipmap-hdpi/ic_launcher.png | Bin 3593 -> 1943 bytes app/src/main/res/mipmap-hdpi/ic_launcher_round.png | Bin 5339 -> 3953 bytes app/src/main/res/mipmap-mdpi/ic_launcher.png | Bin 2636 -> 1412 bytes app/src/main/res/mipmap-mdpi/ic_launcher_round.png | Bin 3388 -> 2582 bytes app/src/main/res/mipmap-xhdpi/ic_launcher.png | Bin 4926 -> 2572 bytes app/src/main/res/mipmap-xhdpi/ic_launcher_round.png | Bin 7472 -> 5512 bytes app/src/main/res/mipmap-xxhdpi/ic_launcher.png | Bin 7909 -> 3790 bytes .../main/res/mipmap-xxhdpi/ic_launcher_round.png | Bin 11873 -> 8545 bytes app/src/main/res/mipmap-xxxhdpi/ic_launcher.png | Bin 10652 -> 5379 bytes .../main/res/mipmap-xxxhdpi/ic_launcher_round.png | Bin 16570 -> 12026 bytes app/src/main/res/values/colors.xml | 6 +++--- app/src/main/res/values/ic_launcher_background.xml | 4 ++++ app/src/main/res/values/strings.xml | 2 ++ app/src/main/res/values/styles.xml | 3 +-- 19 files changed, 40 insertions(+), 9 deletions(-) create mode 100644 app/src/main/ic_launcher-playstore.png create mode 100644 app/src/main/res/drawable/ic_launcher_foreground.xml create mode 100644 app/src/main/res/values/ic_launcher_background.xml diff --git a/app/src/main/ic_launcher-playstore.png b/app/src/main/ic_launcher-playstore.png new file mode 100644 index 0000000..14c0586 Binary files /dev/null and b/app/src/main/ic_launcher-playstore.png differ 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 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 @@ + + + + + + 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 @@ - - + + \ 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 @@ - - + + \ 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 index a571e60..da57e35 100644 Binary files a/app/src/main/res/mipmap-hdpi/ic_launcher.png and b/app/src/main/res/mipmap-hdpi/ic_launcher.png differ diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher_round.png b/app/src/main/res/mipmap-hdpi/ic_launcher_round.png index 61da551..8487c0d 100644 Binary files a/app/src/main/res/mipmap-hdpi/ic_launcher_round.png and b/app/src/main/res/mipmap-hdpi/ic_launcher_round.png differ diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher.png b/app/src/main/res/mipmap-mdpi/ic_launcher.png index c41dd28..cda7844 100644 Binary files a/app/src/main/res/mipmap-mdpi/ic_launcher.png and b/app/src/main/res/mipmap-mdpi/ic_launcher.png differ diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher_round.png b/app/src/main/res/mipmap-mdpi/ic_launcher_round.png index db5080a..4d7f650 100644 Binary files a/app/src/main/res/mipmap-mdpi/ic_launcher_round.png and b/app/src/main/res/mipmap-mdpi/ic_launcher_round.png differ diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/app/src/main/res/mipmap-xhdpi/ic_launcher.png index 6dba46d..e918b2d 100644 Binary files a/app/src/main/res/mipmap-xhdpi/ic_launcher.png and b/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png b/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png index da31a87..b03a1f7 100644 Binary files a/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png and b/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png differ diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/app/src/main/res/mipmap-xxhdpi/ic_launcher.png index 15ac681..53e9a8f 100644 Binary files a/app/src/main/res/mipmap-xxhdpi/ic_launcher.png and b/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png b/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png index b216f2d..42bf96a 100644 Binary files a/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png and b/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png differ diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png index f25a419..c204d91 100644 Binary files a/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png and b/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png b/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png index e96783c..23d7a02 100644 Binary files a/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png and b/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png differ 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 @@ - #6200EE - #3700B3 - #03DAC5 + #0082FB + #004687 + #03A9F4 \ 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 @@ + + + #9ADDEE + \ 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 @@ Bluetooth tethering will be enabled automatically when any of the following selected devices is connected: + No Bluetooth adapter found on this device + device_list \ 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 @@ - - \ No newline at end of file -- cgit v1.2.3