diff --git a/app/app.iml b/app/app.iml index 5e46a900..401abb40 100644 --- a/app/app.iml +++ b/app/app.iml @@ -66,6 +66,7 @@ + @@ -75,6 +76,8 @@ + + diff --git a/app/src/main/java/eu/faircode/netguard/RuleAdapter.java b/app/src/main/java/eu/faircode/netguard/RuleAdapter.java index f71eae04..cd9c88f0 100644 --- a/app/src/main/java/eu/faircode/netguard/RuleAdapter.java +++ b/app/src/main/java/eu/faircode/netguard/RuleAdapter.java @@ -54,9 +54,9 @@ public class RuleAdapter extends RecyclerView.Adapter im private Context context; private boolean debuggable; - private boolean dark; private int colorText; private int colorAccent; + private int colorChanged; private List listAll = new ArrayList<>(); private List listSelected = new ArrayList<>(); @@ -153,7 +153,10 @@ public class RuleAdapter extends RecyclerView.Adapter im this.debuggable = Util.isDebuggable(context); SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context); - dark = prefs.getBoolean("dark_theme", false); + if (prefs.getBoolean("dark_theme", false)) + colorChanged = Color.argb(128, Color.red(Color.DKGRAY), Color.green(Color.DKGRAY), Color.blue(Color.DKGRAY)); + else + colorChanged = Color.argb(128, Color.red(Color.LTGRAY), Color.green(Color.LTGRAY), Color.blue(Color.LTGRAY)); colorAccent = ContextCompat.getColor(context, R.color.colorAccent); TypedArray ta = context.getTheme().obtainStyledAttributes(new int[]{android.R.attr.textColorSecondary}); @@ -214,7 +217,7 @@ public class RuleAdapter extends RecyclerView.Adapter im } }; - holder.itemView.setBackgroundColor(rule.changed ? Color.TRANSPARENT : dark ? Color.DKGRAY : Color.LTGRAY); + holder.itemView.setBackgroundColor(rule.changed ? colorChanged : Color.TRANSPARENT); holder.llApplication.setOnClickListener(llListener); diff --git a/app/src/main/res/layout/main.xml b/app/src/main/res/layout/main.xml index 7d3259ec..382073db 100644 --- a/app/src/main/res/layout/main.xml +++ b/app/src/main/res/layout/main.xml @@ -30,7 +30,7 @@ android:id="@+id/rvApplication" android:layout_width="match_parent" android:layout_height="match_parent" - android:scrollbarStyle="outsideInset" + android:scrollbarStyle="outsideOverlay" android:scrollbars="vertical" /> diff --git a/app/src/main/res/layout/rule.xml b/app/src/main/res/layout/rule.xml index f75b023d..e89c4be4 100644 --- a/app/src/main/res/layout/rule.xml +++ b/app/src/main/res/layout/rule.xml @@ -22,7 +22,8 @@ android:id="@+id/ivIcon" android:layout_width="?android:attr/listPreferredItemHeightSmall" android:layout_height="?android:attr/listPreferredItemHeightSmall" - android:layout_gravity="center_vertical" /> + android:layout_gravity="center_vertical" + android:layout_marginStart="4dp" />