Merge branch 'Use_vector_drawables' into 'master'

Use vector drawables.

See merge request fdroid/fdroidclient!946
This commit is contained in:
Hans-Christoph Steiner 2020-11-06 09:45:37 +00:00
commit 5ffb6636a3
189 changed files with 291 additions and 112 deletions

View File

@ -8,12 +8,6 @@ import android.graphics.PorterDuff;
import android.graphics.drawable.Drawable; import android.graphics.drawable.Drawable;
import android.net.Uri; import android.net.Uri;
import android.os.Bundle; import android.os.Bundle;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.loader.app.LoaderManager;
import androidx.loader.content.CursorLoader;
import androidx.loader.content.Loader;
import androidx.cursoradapter.widget.CursorAdapter;
import android.text.TextUtils; import android.text.TextUtils;
import android.util.AttributeSet; import android.util.AttributeSet;
import android.view.ContextThemeWrapper; import android.view.ContextThemeWrapper;
@ -26,6 +20,14 @@ import android.widget.CompoundButton;
import android.widget.ImageView; import android.widget.ImageView;
import android.widget.ListView; import android.widget.ListView;
import android.widget.TextView; import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.cursoradapter.widget.CursorAdapter;
import androidx.loader.app.LoaderManager;
import androidx.loader.content.CursorLoader;
import androidx.loader.content.Loader;
import org.fdroid.fdroid.R; import org.fdroid.fdroid.R;
import org.fdroid.fdroid.data.InstalledAppProvider; import org.fdroid.fdroid.data.InstalledAppProvider;
import org.fdroid.fdroid.data.Schema.InstalledAppTable; import org.fdroid.fdroid.data.Schema.InstalledAppTable;
@ -217,10 +219,10 @@ public class SelectAppsView extends SwapView implements LoaderManager.LoaderCall
int resource; int resource;
int colour; int colour;
if (checked) { if (checked) {
resource = R.drawable.ic_check_circle_white; resource = R.drawable.ic_check_circle;
colour = getResources().getColor(R.color.swap_bright_blue); colour = getResources().getColor(R.color.swap_bright_blue);
} else { } else {
resource = R.drawable.ic_add_circle_outline_white; resource = R.drawable.ic_add_circle_outline;
colour = 0xFFD0D0D4; colour = 0xFFD0D0D4;
} }
imageView.setImageDrawable(getResources().getDrawable(resource)); imageView.setImageDrawable(getResources().getDrawable(resource));
@ -228,5 +230,4 @@ public class SelectAppsView extends SwapView implements LoaderManager.LoaderCall
} }
} }
} }
} }

View File

@ -7,9 +7,6 @@ import android.content.Context;
import android.content.Intent; import android.content.Intent;
import android.content.IntentFilter; import android.content.IntentFilter;
import android.net.wifi.WifiConfiguration; 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.text.TextUtils;
import android.util.AttributeSet; import android.util.AttributeSet;
import android.view.LayoutInflater; import android.view.LayoutInflater;
@ -22,7 +19,12 @@ import android.widget.ImageView;
import android.widget.ListView; import android.widget.ListView;
import android.widget.ProgressBar; import android.widget.ProgressBar;
import android.widget.TextView; 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.FDroidApp;
import org.fdroid.fdroid.R; import org.fdroid.fdroid.R;
import org.fdroid.fdroid.Utils; import org.fdroid.fdroid.Utils;
@ -30,6 +32,8 @@ import org.fdroid.fdroid.nearby.peers.Peer;
import java.util.ArrayList; import java.util.ArrayList;
import cc.mvdan.accesspoint.WifiApControl;
@SuppressWarnings("LineLength") @SuppressWarnings("LineLength")
public class StartSwapView extends SwapView { public class StartSwapView extends SwapView {
private static final String TAG = "StartSwapView"; private static final String TAG = "StartSwapView";
@ -67,7 +71,7 @@ public class StartSwapView extends SwapView {
Peer peer = getItem(position); Peer peer = getItem(position);
((TextView) convertView.findViewById(R.id.peer_name)).setText(peer.getName()); ((TextView) convertView.findViewById(R.id.peer_name)).setText(peer.getName());
((ImageView) convertView.findViewById(R.id.icon)) ((ImageView) convertView.findViewById(R.id.icon))
.setImageDrawable(getResources().getDrawable(peer.getIcon())); .setImageDrawable(ContextCompat.getDrawable(getContext(), peer.getIcon()));
return convertView; return convertView;
} }

View File

@ -17,17 +17,6 @@ import android.os.Build;
import android.os.Bundle; import android.os.Bundle;
import android.os.IBinder; import android.os.IBinder;
import android.provider.Settings; import android.provider.Settings;
import androidx.annotation.LayoutRes;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.annotation.StringRes;
import androidx.localbroadcastmanager.content.LocalBroadcastManager;
import androidx.core.view.MenuItemCompat;
import androidx.appcompat.app.AlertDialog;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.SearchView;
import androidx.appcompat.widget.SwitchCompat;
import androidx.appcompat.widget.Toolbar;
import android.text.TextUtils; import android.text.TextUtils;
import android.util.Log; import android.util.Log;
import android.view.LayoutInflater; import android.view.LayoutInflater;
@ -45,9 +34,23 @@ import android.widget.ListView;
import android.widget.ProgressBar; import android.widget.ProgressBar;
import android.widget.TextView; import android.widget.TextView;
import android.widget.Toast; import android.widget.Toast;
import cc.mvdan.accesspoint.WifiApControl;
import androidx.annotation.LayoutRes;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.annotation.StringRes;
import androidx.appcompat.app.AlertDialog;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.SearchView;
import androidx.appcompat.widget.SwitchCompat;
import androidx.appcompat.widget.Toolbar;
import androidx.core.content.ContextCompat;
import androidx.core.view.MenuItemCompat;
import androidx.localbroadcastmanager.content.LocalBroadcastManager;
import com.google.zxing.integration.android.IntentIntegrator; import com.google.zxing.integration.android.IntentIntegrator;
import com.google.zxing.integration.android.IntentResult; import com.google.zxing.integration.android.IntentResult;
import org.fdroid.fdroid.BuildConfig; import org.fdroid.fdroid.BuildConfig;
import org.fdroid.fdroid.FDroidApp; import org.fdroid.fdroid.FDroidApp;
import org.fdroid.fdroid.NfcHelper; import org.fdroid.fdroid.NfcHelper;
@ -75,6 +78,8 @@ import java.util.Set;
import java.util.Timer; import java.util.Timer;
import java.util.TimerTask; import java.util.TimerTask;
import cc.mvdan.accesspoint.WifiApControl;
import static org.fdroid.fdroid.views.main.MainActivity.ACTION_REQUEST_SWAP; import static org.fdroid.fdroid.views.main.MainActivity.ACTION_REQUEST_SWAP;
/** /**
@ -955,19 +960,19 @@ public class SwapWorkflowActivity extends AppCompatActivity {
if (TextUtils.isEmpty(FDroidApp.bssid) && !TextUtils.isEmpty(FDroidApp.ipAddressString)) { if (TextUtils.isEmpty(FDroidApp.bssid) && !TextUtils.isEmpty(FDroidApp.ipAddressString)) {
// empty bssid with an ipAddress means hotspot mode // empty bssid with an ipAddress means hotspot mode
descriptionView.setText(R.string.swap_join_this_hotspot); descriptionView.setText(R.string.swap_join_this_hotspot);
wifiIcon.setImageDrawable(getResources().getDrawable(R.drawable.hotspot)); wifiIcon.setImageDrawable(ContextCompat.getDrawable(this, R.drawable.ic_wifi_tethering));
ssidView.setText(R.string.swap_active_hotspot); ssidView.setText(R.string.swap_active_hotspot);
tapView.setText(R.string.swap_switch_to_wifi); tapView.setText(R.string.swap_switch_to_wifi);
} else if (TextUtils.isEmpty(FDroidApp.ssid)) { } else if (TextUtils.isEmpty(FDroidApp.ssid)) {
// not connected to or setup with any wifi network // not connected to or setup with any wifi network
descriptionView.setText(R.string.swap_join_same_wifi); descriptionView.setText(R.string.swap_join_same_wifi);
wifiIcon.setImageDrawable(getResources().getDrawable(R.drawable.wifi)); wifiIcon.setImageDrawable(ContextCompat.getDrawable(this, R.drawable.ic_wifi));
ssidView.setText(R.string.swap_no_wifi_network); ssidView.setText(R.string.swap_no_wifi_network);
tapView.setText(R.string.swap_view_available_networks); tapView.setText(R.string.swap_view_available_networks);
} else { } else {
// connected to a regular wifi network // connected to a regular wifi network
descriptionView.setText(R.string.swap_join_same_wifi); descriptionView.setText(R.string.swap_join_same_wifi);
wifiIcon.setImageDrawable(getResources().getDrawable(R.drawable.wifi)); wifiIcon.setImageDrawable(ContextCompat.getDrawable(this, R.drawable.ic_wifi));
ssidView.setText(FDroidApp.ssid); ssidView.setText(FDroidApp.ssid);
tapView.setText(R.string.swap_view_available_networks); tapView.setText(R.string.swap_view_available_networks);
} }

View File

@ -3,8 +3,10 @@ package org.fdroid.fdroid.nearby.peers;
import android.bluetooth.BluetoothClass.Device; import android.bluetooth.BluetoothClass.Device;
import android.bluetooth.BluetoothDevice; import android.bluetooth.BluetoothDevice;
import android.os.Parcel; import android.os.Parcel;
import androidx.annotation.Nullable;
import android.text.TextUtils; import android.text.TextUtils;
import androidx.annotation.Nullable;
import org.fdroid.fdroid.R; import org.fdroid.fdroid.R;
public class BluetoothPeer implements Peer { public class BluetoothPeer implements Peer {
@ -44,7 +46,7 @@ public class BluetoothPeer implements Peer {
@Override @Override
public int getIcon() { public int getIcon() {
return R.drawable.ic_bluetooth_white; return R.drawable.ic_bluetooth;
} }
@Override @Override

View File

@ -3,6 +3,7 @@ package org.fdroid.fdroid.nearby.peers;
import android.net.Uri; import android.net.Uri;
import android.os.Parcel; import android.os.Parcel;
import android.text.TextUtils; import android.text.TextUtils;
import org.fdroid.fdroid.R; import org.fdroid.fdroid.R;
import org.fdroid.fdroid.data.NewRepoConfig; import org.fdroid.fdroid.data.NewRepoConfig;
@ -62,7 +63,7 @@ public class WifiPeer implements Peer {
@Override @Override
public int getIcon() { public int getIcon() {
return R.drawable.ic_network_wifi_white; return R.drawable.ic_network_wifi;
} }
@Override @Override

View File

@ -13,20 +13,19 @@ import android.graphics.PorterDuff;
import android.graphics.drawable.Drawable; import android.graphics.drawable.Drawable;
import android.net.Uri; import android.net.Uri;
import android.os.Bundle; import android.os.Bundle;
import android.text.TextUtils;
import android.util.TypedValue;
import androidx.annotation.ColorInt; import androidx.annotation.ColorInt;
import androidx.annotation.Nullable; import androidx.annotation.Nullable;
import androidx.core.content.ContextCompat;
import androidx.appcompat.app.AlertDialog; import androidx.appcompat.app.AlertDialog;
import androidx.core.content.ContextCompat;
import androidx.preference.CheckBoxPreference; import androidx.preference.CheckBoxPreference;
import androidx.preference.ListPreference; import androidx.preference.ListPreference;
import androidx.preference.Preference; import androidx.preference.Preference;
import androidx.preference.PreferenceCategory; import androidx.preference.PreferenceCategory;
import androidx.preference.PreferenceFragmentCompat; import androidx.preference.PreferenceFragmentCompat;
import android.text.TextUtils;
import android.util.TypedValue;
import info.guardianproject.panic.Panic;
import info.guardianproject.panic.PanicResponder;
import org.fdroid.fdroid.Preferences; import org.fdroid.fdroid.Preferences;
import org.fdroid.fdroid.R; import org.fdroid.fdroid.R;
import org.fdroid.fdroid.installer.PrivilegedInstaller; import org.fdroid.fdroid.installer.PrivilegedInstaller;
@ -34,6 +33,9 @@ import org.fdroid.fdroid.installer.PrivilegedInstaller;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Set; import java.util.Set;
import info.guardianproject.panic.Panic;
import info.guardianproject.panic.PanicResponder;
public class PanicPreferencesFragment extends PreferenceFragmentCompat public class PanicPreferencesFragment extends PreferenceFragmentCompat
implements SharedPreferences.OnSharedPreferenceChangeListener { implements SharedPreferences.OnSharedPreferenceChangeListener {
@ -130,9 +132,9 @@ public class PanicPreferencesFragment extends PreferenceFragmentCompat
} }
} }
} else { } else {
Preference preference = new Preference(getActivity()); Preference preference = new Preference(requireActivity());
preference.setIntent(intent); preference.setIntent(intent);
Drawable icon = getResources().getDrawable(R.drawable.ic_add_circle_outline_white); Drawable icon = ContextCompat.getDrawable(requireContext(), R.drawable.ic_add_circle_outline);
icon.setColorFilter(new LightingColorFilter(0, getResources().getColor(R.color.swap_light_grey_icon))); icon.setColorFilter(new LightingColorFilter(0, getResources().getColor(R.color.swap_light_grey_icon)));
preference.setSingleLineTitle(true); preference.setSingleLineTitle(true);
preference.setTitle(R.string.panic_add_apps_to_uninstall); preference.setTitle(R.string.panic_add_apps_to_uninstall);

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 899 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 186 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 283 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 703 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 701 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 783 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 623 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 148 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 207 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 483 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 486 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 220 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 311 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 906 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 926 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 283 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 455 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 368 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 532 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

View File

@ -0,0 +1,5 @@
<vector android:height="24dp" android:tint="#FFFFFF"
android:viewportHeight="24" android:viewportWidth="24"
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#FFFFFF" android:pathData="M13,7h-2v4L7,11v2h4v4h2v-4h4v-2h-4L13,7zM12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM12,20c-4.41,0 -8,-3.59 -8,-8s3.59,-8 8,-8 8,3.59 8,8 -3.59,8 -8,8z"/>
</vector>

View File

@ -0,0 +1,5 @@
<vector android:height="24dp" android:tint="#FFFFFF"
android:viewportHeight="24" android:viewportWidth="24"
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#FFFFFF" android:pathData="M12,4l-1.41,1.41L16.17,11H4v2h12.17l-5.58,5.59L12,20l8,-8z"/>
</vector>

View File

@ -0,0 +1,5 @@
<vector android:height="24dp" android:tint="#FFFFFF"
android:viewportHeight="24" android:viewportWidth="24"
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#FFFFFF" android:pathData="M17.71,7.71L12,2h-1v7.59L6.41,5 5,6.41 10.59,12 5,17.59 6.41,19 11,14.41L11,22h1l5.71,-5.71 -4.3,-4.29 4.3,-4.29zM13,5.83l1.88,1.88L13,9.59L13,5.83zM14.88,16.29L13,18.17v-3.76l1.88,1.88z"/>
</vector>

View File

@ -0,0 +1,5 @@
<vector android:height="24dp" android:tint="#FFFFFF"
android:viewportHeight="24" android:viewportWidth="24"
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#FFFFFF" android:pathData="M12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM10,17l-5,-5 1.41,-1.41L10,14.17l7.59,-7.59L19,8l-9,9z"/>
</vector>

View File

@ -0,0 +1,5 @@
<vector android:height="24dp" android:tint="#FFFFFF"
android:viewportHeight="24" android:viewportWidth="24"
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#FFFFFF" android:pathData="M12.01,21.49L23.64,7c-0.45,-0.34 -4.93,-4 -11.64,-4C5.28,3 0.81,6.66 0.36,7l11.63,14.49 0.01,0.01 0.01,-0.01z"/>
</vector>

View File

@ -0,0 +1,5 @@
<vector android:height="24dp" android:tint="#FFFFFF"
android:viewportHeight="24" android:viewportWidth="24"
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#FFFFFF" android:pathData="M1,9l2,2c4.97,-4.97 13.03,-4.97 18,0l2,-2C16.93,2.93 7.08,2.93 1,9zM9,17l3,3 3,-3c-1.65,-1.66 -4.34,-1.66 -6,0zM5,13l2,2c2.76,-2.76 7.24,-2.76 10,0l2,-2C15.14,9.14 8.87,9.14 5,13z"/>
</vector>

View File

@ -0,0 +1,5 @@
<vector android:height="24dp" android:tint="#FFFFFF"
android:viewportHeight="24" android:viewportWidth="24"
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#FFFFFF" android:pathData="M12,11c-1.1,0 -2,0.9 -2,2s0.9,2 2,2 2,-0.9 2,-2 -0.9,-2 -2,-2zM18,13c0,-3.31 -2.69,-6 -6,-6s-6,2.69 -6,6c0,2.22 1.21,4.15 3,5.19l1,-1.74c-1.19,-0.7 -2,-1.97 -2,-3.45 0,-2.21 1.79,-4 4,-4s4,1.79 4,4c0,1.48 -0.81,2.75 -2,3.45l1,1.74c1.79,-1.04 3,-2.97 3,-5.19zM12,3C6.48,3 2,7.48 2,13c0,3.7 2.01,6.92 4.99,8.65l1,-1.73C5.61,18.53 4,15.96 4,13c0,-4.42 3.58,-8 8,-8s8,3.58 8,8c0,2.96 -1.61,5.53 -4,6.92l1,1.73c2.99,-1.73 5,-4.95 5,-8.65 0,-5.52 -4.48,-10 -10,-10z"/>
</vector>

View File

@ -43,7 +43,7 @@
android:layout_alignParentEnd="true" android:layout_alignParentEnd="true"
android:layout_centerVertical="true" android:layout_centerVertical="true"
tools:suppress="InconsistentLayout" tools:suppress="InconsistentLayout"
android:src="@drawable/ic_add_circle_outline_white" /> android:src="@drawable/ic_add_circle_outline" />
<TwoLineListItem <TwoLineListItem
android:layout_toRightOf="@android:id/icon" android:layout_toRightOf="@android:id/icon"

View File

@ -39,7 +39,7 @@
android:layout_alignParentEnd="true" android:layout_alignParentEnd="true"
android:layout_centerVertical="true" android:layout_centerVertical="true"
tools:suppress="InconsistentLayout" tools:suppress="InconsistentLayout"
android:src="@drawable/ic_add_circle_outline_white" /> android:src="@drawable/ic_add_circle_outline" />
<TwoLineListItem <TwoLineListItem
android:layout_toEndOf="@android:id/icon" android:layout_toEndOf="@android:id/icon"

View File

@ -25,7 +25,7 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:id="@+id/wifi_icon" android:id="@+id/wifi_icon"
android:src="@drawable/wifi" android:src="@drawable/ic_wifi"
android:layout_below="@+id/text_description" android:layout_below="@+id/text_description"
android:layout_centerHorizontal="true"/> android:layout_centerHorizontal="true"/>

View File

@ -27,7 +27,7 @@
android:layout_width="24dp" android:layout_width="24dp"
android:layout_height="24dp" android:layout_height="24dp"
android:layout_centerInParent="true" android:layout_centerInParent="true"
tools:src="@drawable/ic_bluetooth_white"/> tools:src="@drawable/ic_bluetooth"/>
</RelativeLayout> </RelativeLayout>

View File

@ -27,7 +27,7 @@
android:layout_height="24dp" android:layout_height="24dp"
android:tint="@color/swap_grey_icon" android:tint="@color/swap_grey_icon"
android:contentDescription="@string/use_bluetooth" android:contentDescription="@string/use_bluetooth"
android:src="@drawable/ic_bluetooth_white"/> android:src="@drawable/ic_bluetooth"/>
<LinearLayout <LinearLayout
android:layout_width="0dp" android:layout_width="0dp"
@ -76,7 +76,7 @@
android:layout_height="24dp" android:layout_height="24dp"
android:tint="@color/swap_grey_icon" android:tint="@color/swap_grey_icon"
android:contentDescription="@string/wifi" android:contentDescription="@string/wifi"
android:src="@drawable/ic_network_wifi_white"/> android:src="@drawable/ic_network_wifi"/>
<LinearLayout <LinearLayout
android:layout_width="0dp" android:layout_width="0dp"

View File

@ -2,7 +2,7 @@
<item <item
android:id="@+id/action_next" android:id="@+id/action_next"
android:icon="@drawable/ic_arrow_forward_white" android:icon="@drawable/ic_arrow_forward"
android:title="@string/next" android:title="@string/next"
android:titleCondensed="@string/next"/> android:titleCondensed="@string/next"/>

View File

@ -2,13 +2,13 @@
<item <item
android:id="@+id/action_search" android:id="@+id/action_search"
android:icon="@drawable/ic_search_white" android:icon="@drawable/ic_search"
android:title="@string/menu_search" android:title="@string/menu_search"
android:titleCondensed="@string/menu_search"/> android:titleCondensed="@string/menu_search"/>
<item <item
android:id="@+id/action_next" android:id="@+id/action_next"
android:icon="@drawable/ic_arrow_forward_white" android:icon="@drawable/ic_arrow_forward"
android:title="@string/next" android:title="@string/next"
android:titleCondensed="@string/next"/> android:titleCondensed="@string/next"/>

View File

@ -2,7 +2,7 @@
<item <item
android:id="@+id/action_search" android:id="@+id/action_search"
android:icon="@drawable/ic_search_white" android:icon="@drawable/ic_search"
android:title="@string/menu_search" android:title="@string/menu_search"
android:titleCondensed="@string/menu_search"/> android:titleCondensed="@string/menu_search"/>

View File

@ -34,13 +34,14 @@ import android.os.AsyncTask;
import android.os.Build; import android.os.Build;
import android.os.Process; import android.os.Process;
import android.os.SystemClock; import android.os.SystemClock;
import android.text.TextUtils;
import android.util.Log;
import android.widget.Toast;
import androidx.annotation.NonNull; import androidx.annotation.NonNull;
import androidx.core.app.JobIntentService; import androidx.core.app.JobIntentService;
import androidx.core.app.NotificationCompat; import androidx.core.app.NotificationCompat;
import androidx.localbroadcastmanager.content.LocalBroadcastManager; import androidx.localbroadcastmanager.content.LocalBroadcastManager;
import android.text.TextUtils;
import android.util.Log;
import android.widget.Toast;
import org.fdroid.fdroid.data.Apk; import org.fdroid.fdroid.data.Apk;
import org.fdroid.fdroid.data.ApkProvider; import org.fdroid.fdroid.data.ApkProvider;
@ -259,7 +260,7 @@ public class UpdateService extends JobIntentService {
notificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE); notificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
notificationBuilder = new NotificationCompat.Builder(this, NotificationHelper.CHANNEL_UPDATES) notificationBuilder = new NotificationCompat.Builder(this, NotificationHelper.CHANNEL_UPDATES)
.setSmallIcon(R.drawable.ic_refresh_white) .setSmallIcon(R.drawable.ic_refresh)
.setOngoing(true) .setOngoing(true)
.setCategory(NotificationCompat.CATEGORY_SERVICE) .setCategory(NotificationCompat.CATEGORY_SERVICE)
.setContentTitle(getString(R.string.update_notification_title)); .setContentTitle(getString(R.string.update_notification_title));

View File

@ -6,7 +6,9 @@ import android.content.Context;
import android.content.DialogInterface; import android.content.DialogInterface;
import android.content.Intent; import android.content.Intent;
import android.content.res.Resources; import android.content.res.Resources;
import android.graphics.Color;
import android.graphics.Rect; import android.graphics.Rect;
import android.graphics.drawable.Drawable;
import android.net.Uri; import android.net.Uri;
import android.os.Build; import android.os.Build;
import android.text.Html; import android.text.Html;
@ -28,12 +30,14 @@ import android.widget.LinearLayout;
import android.widget.ProgressBar; import android.widget.ProgressBar;
import android.widget.TextView; import android.widget.TextView;
import android.widget.Toast; import android.widget.Toast;
import androidx.annotation.DrawableRes; import androidx.annotation.DrawableRes;
import androidx.annotation.LayoutRes; import androidx.annotation.LayoutRes;
import androidx.annotation.NonNull; import androidx.annotation.NonNull;
import androidx.appcompat.app.AlertDialog; import androidx.appcompat.app.AlertDialog;
import androidx.core.content.ContextCompat; import androidx.core.content.ContextCompat;
import androidx.core.content.FileProvider; import androidx.core.content.FileProvider;
import androidx.core.graphics.drawable.DrawableCompat;
import androidx.core.os.ConfigurationCompat; import androidx.core.os.ConfigurationCompat;
import androidx.core.os.LocaleListCompat; import androidx.core.os.LocaleListCompat;
import androidx.core.view.ViewCompat; import androidx.core.view.ViewCompat;
@ -42,6 +46,7 @@ import androidx.gridlayout.widget.GridLayout;
import androidx.recyclerview.widget.LinearLayoutManager; import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.LinearSmoothScroller; import androidx.recyclerview.widget.LinearSmoothScroller;
import androidx.recyclerview.widget.RecyclerView; import androidx.recyclerview.widget.RecyclerView;
import org.apache.commons.io.FilenameUtils; import org.apache.commons.io.FilenameUtils;
import org.fdroid.fdroid.Preferences; import org.fdroid.fdroid.Preferences;
import org.fdroid.fdroid.R; import org.fdroid.fdroid.R;
@ -830,7 +835,17 @@ public class AppDetailsRecyclerViewAdapter
* user can expand/collapse this item. * user can expand/collapse this item.
*/ */
protected void updateExpandableItem(boolean isExpanded) { protected void updateExpandableItem(boolean isExpanded) {
TextViewCompat.setCompoundDrawablesRelativeWithIntrinsicBounds(headerView, getIcon(), 0, isExpanded ? R.drawable.ic_expand_less_grey600 : R.drawable.ic_expand_more_grey600, 0); final int icon = getIcon();
Drawable iconDrawable = ContextCompat.getDrawable(headerView.getContext(), icon);
if (icon == R.drawable.ic_access_time) {
assert iconDrawable != null;
iconDrawable = DrawableCompat.wrap(iconDrawable).mutate();
DrawableCompat.setTint(iconDrawable, Color.parseColor("#B4B4B4"));
}
final Drawable expandLess = ContextCompat.getDrawable(headerView.getContext(), R.drawable.ic_expand_less);
final Drawable expandMore = ContextCompat.getDrawable(headerView.getContext(), R.drawable.ic_expand_more);
TextViewCompat.setCompoundDrawablesRelativeWithIntrinsicBounds(headerView,
iconDrawable, null, isExpanded ? expandLess : expandMore, null);
} }
} }
@ -855,7 +870,7 @@ public class AppDetailsRecyclerViewAdapter
@DrawableRes @DrawableRes
protected int getIcon() { protected int getIcon() {
return R.drawable.ic_access_time_24dp_grey600; return R.drawable.ic_access_time;
} }
} }
@ -865,7 +880,11 @@ public class AppDetailsRecyclerViewAdapter
NoVersionsViewHolder(View view) { NoVersionsViewHolder(View view) {
super(view); super(view);
headerView = (TextView) view.findViewById(R.id.information); headerView = (TextView) view.findViewById(R.id.information);
TextViewCompat.setCompoundDrawablesRelativeWithIntrinsicBounds(headerView, R.drawable.ic_access_time_24dp_grey600, 0, 0, 0); final Drawable accessTime = DrawableCompat.wrap(ContextCompat.getDrawable(headerView.getContext(),
R.drawable.ic_access_time)).mutate();
DrawableCompat.setTint(accessTime, Color.parseColor("#B4B4B4"));
TextViewCompat.setCompoundDrawablesRelativeWithIntrinsicBounds(headerView,
accessTime, null, null, null);
itemView.setOnClickListener(new View.OnClickListener() { itemView.setOnClickListener(new View.OnClickListener() {
@Override @Override
@ -956,7 +975,7 @@ public class AppDetailsRecyclerViewAdapter
@DrawableRes @DrawableRes
protected int getIcon() { protected int getIcon() {
return R.drawable.ic_lock_24dp_grey600; return R.drawable.ic_lock;
} }
} }
@ -1004,7 +1023,7 @@ public class AppDetailsRecyclerViewAdapter
// Issues button // Issues button
if (uriIsSetAndCanBeOpened(app.issueTracker)) { if (uriIsSetAndCanBeOpened(app.issueTracker)) {
addLinkItemView(contentView, R.string.menu_issues, R.drawable.ic_issues, app.issueTracker); addLinkItemView(contentView, R.string.menu_issues, R.drawable.ic_error, app.issueTracker);
} }
// Translation button // Translation button
@ -1281,7 +1300,7 @@ public class AppDetailsRecyclerViewAdapter
expandedLayout.setVisibility(expand ? View.VISIBLE : View.GONE); expandedLayout.setVisibility(expand ? View.VISIBLE : View.GONE);
versionCode.setVisibility(expand ? View.VISIBLE : View.GONE); versionCode.setVisibility(expand ? View.VISIBLE : View.GONE);
expandArrow.setImageDrawable(ContextCompat.getDrawable(context, expand ? expandArrow.setImageDrawable(ContextCompat.getDrawable(context, expand ?
R.drawable.ic_expand_less_grey600 : R.drawable.ic_expand_more_grey600)); R.drawable.ic_expand_less : R.drawable.ic_expand_more));
// This is required to make these labels // This is required to make these labels
// auto-scrollable when they are too long // auto-scrollable when they are too long

View File

@ -23,15 +23,9 @@ package org.fdroid.fdroid.views.apps;
import android.content.Context; import android.content.Context;
import android.content.Intent; import android.content.Intent;
import android.database.Cursor; import android.database.Cursor;
import android.graphics.Color;
import android.graphics.drawable.Drawable;
import android.os.Bundle; import android.os.Bundle;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.loader.app.LoaderManager;
import androidx.loader.content.CursorLoader;
import androidx.loader.content.Loader;
import androidx.appcompat.app.AppCompatActivity;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import android.view.KeyEvent; import android.view.KeyEvent;
import android.view.View; import android.view.View;
import android.view.inputmethod.EditorInfo; import android.view.inputmethod.EditorInfo;
@ -39,7 +33,20 @@ import android.view.inputmethod.InputMethodManager;
import android.widget.EditText; import android.widget.EditText;
import android.widget.ImageView; import android.widget.ImageView;
import android.widget.TextView; import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
import androidx.core.content.ContextCompat;
import androidx.core.graphics.drawable.DrawableCompat;
import androidx.loader.app.LoaderManager;
import androidx.loader.content.CursorLoader;
import androidx.loader.content.Loader;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import com.nostra13.universalimageloader.core.ImageLoader; import com.nostra13.universalimageloader.core.ImageLoader;
import org.fdroid.fdroid.FDroidApp; import org.fdroid.fdroid.FDroidApp;
import org.fdroid.fdroid.R; import org.fdroid.fdroid.R;
import org.fdroid.fdroid.Utils; import org.fdroid.fdroid.Utils;
@ -101,28 +108,22 @@ public class AppListActivity extends AppCompatActivity implements LoaderManager.
}); });
sortImage = (ImageView) findViewById(R.id.sort); sortImage = (ImageView) findViewById(R.id.sort);
if (FDroidApp.isAppThemeLight()) { final Drawable lastUpdated = DrawableCompat.wrap(ContextCompat.getDrawable(this,
sortImage.setImageResource(R.drawable.ic_last_updated_black); R.drawable.ic_access_time)).mutate();
} else { DrawableCompat.setTint(lastUpdated, FDroidApp.isAppThemeLight() ? Color.BLACK : Color.WHITE);
sortImage.setImageResource(R.drawable.ic_last_updated_white); sortImage.setImageDrawable(lastUpdated);
}
sortImage.setOnClickListener(new View.OnClickListener() { sortImage.setOnClickListener(new View.OnClickListener() {
@Override @Override
public void onClick(View view) { public void onClick(View view) {
if (sortClauseSelected.equalsIgnoreCase(SortClause.LAST_UPDATED)) { if (sortClauseSelected.equalsIgnoreCase(SortClause.LAST_UPDATED)) {
sortClauseSelected = SortClause.NAME; sortClauseSelected = SortClause.NAME;
if (FDroidApp.isAppThemeLight()) { final Drawable alphabetical = DrawableCompat.wrap(
sortImage.setImageResource(R.drawable.ic_az_black); ContextCompat.getDrawable(AppListActivity.this, R.drawable.ic_sort_by_alpha)).mutate();
} else { DrawableCompat.setTint(alphabetical, FDroidApp.isAppThemeLight() ? Color.BLACK : Color.WHITE);
sortImage.setImageResource(R.drawable.ic_az_white); sortImage.setImageDrawable(alphabetical);
}
} else { } else {
sortClauseSelected = SortClause.LAST_UPDATED; sortClauseSelected = SortClause.LAST_UPDATED;
if (FDroidApp.isAppThemeLight()) { sortImage.setImageDrawable(lastUpdated);
sortImage.setImageResource(R.drawable.ic_last_updated_black);
} else {
sortImage.setImageResource(R.drawable.ic_last_updated_white);
}
} }
getSupportLoaderManager().restartLoader(0, null, AppListActivity.this); getSupportLoaderManager().restartLoader(0, null, AppListActivity.this);
appView.scrollToPosition(0); appView.scrollToPosition(0);

Binary file not shown.

Before

Width:  |  Height:  |  Size: 555 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 124 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 370 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 155 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 466 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 484 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 427 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 151 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 152 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 364 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 294 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 206 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 366 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 372 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 381 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 291 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 505 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 368 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 93 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 746 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 742 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 265 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 112 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 314 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 360 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 290 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 128 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 126 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 259 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 962 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1018 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 199 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 155 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 249 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 246 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 778 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 277 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 373 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 714 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 97 B

Some files were not shown because too many files have changed in this diff Show More