diff --git a/app/src/full/java/org/fdroid/fdroid/nearby/StartSwapView.java b/app/src/full/java/org/fdroid/fdroid/nearby/StartSwapView.java index 39bf1d89b..187fdecc6 100644 --- a/app/src/full/java/org/fdroid/fdroid/nearby/StartSwapView.java +++ b/app/src/full/java/org/fdroid/fdroid/nearby/StartSwapView.java @@ -7,9 +7,6 @@ import android.content.Context; import android.content.Intent; import android.content.IntentFilter; import android.net.wifi.WifiConfiguration; -import androidx.annotation.Nullable; -import androidx.localbroadcastmanager.content.LocalBroadcastManager; -import androidx.appcompat.widget.SwitchCompat; import android.text.TextUtils; import android.util.AttributeSet; import android.view.LayoutInflater; @@ -22,7 +19,12 @@ import android.widget.ImageView; import android.widget.ListView; import android.widget.ProgressBar; import android.widget.TextView; -import cc.mvdan.accesspoint.WifiApControl; + +import androidx.annotation.Nullable; +import androidx.appcompat.widget.SwitchCompat; +import androidx.core.content.ContextCompat; +import androidx.localbroadcastmanager.content.LocalBroadcastManager; + import org.fdroid.fdroid.FDroidApp; import org.fdroid.fdroid.R; import org.fdroid.fdroid.Utils; @@ -30,6 +32,8 @@ import org.fdroid.fdroid.nearby.peers.Peer; import java.util.ArrayList; +import cc.mvdan.accesspoint.WifiApControl; + @SuppressWarnings("LineLength") public class StartSwapView extends SwapView { private static final String TAG = "StartSwapView"; @@ -67,7 +71,7 @@ public class StartSwapView extends SwapView { Peer peer = getItem(position); ((TextView) convertView.findViewById(R.id.peer_name)).setText(peer.getName()); ((ImageView) convertView.findViewById(R.id.icon)) - .setImageDrawable(getResources().getDrawable(peer.getIcon())); + .setImageDrawable(ContextCompat.getDrawable(getContext(), peer.getIcon())); return convertView; } diff --git a/app/src/full/java/org/fdroid/fdroid/nearby/peers/BluetoothPeer.java b/app/src/full/java/org/fdroid/fdroid/nearby/peers/BluetoothPeer.java index 515853873..75d6f4fbc 100644 --- a/app/src/full/java/org/fdroid/fdroid/nearby/peers/BluetoothPeer.java +++ b/app/src/full/java/org/fdroid/fdroid/nearby/peers/BluetoothPeer.java @@ -3,8 +3,10 @@ package org.fdroid.fdroid.nearby.peers; import android.bluetooth.BluetoothClass.Device; import android.bluetooth.BluetoothDevice; import android.os.Parcel; -import androidx.annotation.Nullable; import android.text.TextUtils; + +import androidx.annotation.Nullable; + import org.fdroid.fdroid.R; public class BluetoothPeer implements Peer { @@ -44,7 +46,7 @@ public class BluetoothPeer implements Peer { @Override public int getIcon() { - return R.drawable.ic_bluetooth_white; + return R.drawable.ic_bluetooth; } @Override diff --git a/app/src/full/res/drawable-hdpi/ic_bluetooth_white.png b/app/src/full/res/drawable-hdpi/ic_bluetooth_white.png deleted file mode 100644 index 95f1f121d..000000000 Binary files a/app/src/full/res/drawable-hdpi/ic_bluetooth_white.png and /dev/null differ diff --git a/app/src/full/res/drawable-mdpi/ic_bluetooth_white.png b/app/src/full/res/drawable-mdpi/ic_bluetooth_white.png deleted file mode 100644 index 32488bb01..000000000 Binary files a/app/src/full/res/drawable-mdpi/ic_bluetooth_white.png and /dev/null differ diff --git a/app/src/full/res/drawable-xhdpi/ic_bluetooth_white.png b/app/src/full/res/drawable-xhdpi/ic_bluetooth_white.png deleted file mode 100644 index 42b50d697..000000000 Binary files a/app/src/full/res/drawable-xhdpi/ic_bluetooth_white.png and /dev/null differ diff --git a/app/src/full/res/drawable-xxhdpi/ic_bluetooth_white.png b/app/src/full/res/drawable-xxhdpi/ic_bluetooth_white.png deleted file mode 100644 index ae9c74800..000000000 Binary files a/app/src/full/res/drawable-xxhdpi/ic_bluetooth_white.png and /dev/null differ diff --git a/app/src/full/res/drawable-xxxhdpi/ic_bluetooth_white.png b/app/src/full/res/drawable-xxxhdpi/ic_bluetooth_white.png deleted file mode 100644 index 1550d57ec..000000000 Binary files a/app/src/full/res/drawable-xxxhdpi/ic_bluetooth_white.png and /dev/null differ diff --git a/app/src/full/res/drawable/ic_bluetooth.xml b/app/src/full/res/drawable/ic_bluetooth.xml new file mode 100644 index 000000000..8ded8624f --- /dev/null +++ b/app/src/full/res/drawable/ic_bluetooth.xml @@ -0,0 +1,5 @@ + + + diff --git a/app/src/full/res/layout/swap_peer_list_item.xml b/app/src/full/res/layout/swap_peer_list_item.xml index a284a3f2e..9f474e1cc 100644 --- a/app/src/full/res/layout/swap_peer_list_item.xml +++ b/app/src/full/res/layout/swap_peer_list_item.xml @@ -27,7 +27,7 @@ android:layout_width="24dp" android:layout_height="24dp" android:layout_centerInParent="true" - tools:src="@drawable/ic_bluetooth_white"/> + tools:src="@drawable/ic_bluetooth"/> diff --git a/app/src/full/res/layout/swap_start_swap.xml b/app/src/full/res/layout/swap_start_swap.xml index 4b25a4e79..1cb6c1774 100644 --- a/app/src/full/res/layout/swap_start_swap.xml +++ b/app/src/full/res/layout/swap_start_swap.xml @@ -27,7 +27,7 @@ android:layout_height="24dp" android:tint="@color/swap_grey_icon" android:contentDescription="@string/use_bluetooth" - android:src="@drawable/ic_bluetooth_white"/> + android:src="@drawable/ic_bluetooth"/>