0
0
mirror of https://github.com/TrianguloY/UrlChecker.git synced 2024-09-19 20:02:16 +02:00

Merge branch 'colors'

This commit is contained in:
TrianguloY 2022-07-31 10:48:56 +02:00
commit 3570415b96
19 changed files with 244 additions and 139 deletions

View File

@ -12,6 +12,7 @@ import com.trianguloy.urlchecker.R;
import com.trianguloy.urlchecker.modules.AModuleConfig;
import com.trianguloy.urlchecker.modules.AModuleData;
import com.trianguloy.urlchecker.modules.ModuleManager;
import com.trianguloy.urlchecker.utilities.AndroidUtils;
import com.trianguloy.urlchecker.utilities.Animations;
import com.trianguloy.urlchecker.utilities.GenericPref;
import com.trianguloy.urlchecker.utilities.Inflater;
@ -87,6 +88,7 @@ public class ConfigActivity extends Activity {
// configure label
final TextView title = parent.findViewById(R.id.label);
title.setText(getString(R.string.dd, getString(module.getName())));
AndroidUtils.setAsClickable(title);
// configuration of the module
final View child = Inflater.inflate(config.getLayoutId(), parent.findViewById(R.id.box), this);
@ -96,7 +98,7 @@ public class ConfigActivity extends Activity {
title.setOnClickListener(v -> {
boolean checked = child.getVisibility() == View.GONE;
child.setVisibility(checked ? View.VISIBLE : View.GONE);
title.setCompoundDrawablesWithIntrinsicBounds(checked ? R.drawable.expanded : R.drawable.collapsed, 0, 0, 0);
title.setCompoundDrawablesWithIntrinsicBounds(checked ? R.drawable.arrow_down : R.drawable.arrow_right, 0, 0, 0);
});
title.performClick(); // initial hide
}

View File

@ -156,8 +156,8 @@ class RemoveQueriesDialog extends AModuleDialog implements View.OnClickListener
private void updateMoreIndicator() {
info.setCompoundDrawablesWithIntrinsicBounds(
box.getChildCount() == 0 ? 0
: box.getVisibility() == View.VISIBLE ? R.drawable.expanded
: R.drawable.collapsed,
: box.getVisibility() == View.VISIBLE ? R.drawable.arrow_down
: R.drawable.arrow_right,
0, 0, 0);
}

View File

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android"
android:color="@color/transparent">
<item
android:bottom="5dp"
android:left="5dp"
android:right="5dp"
android:top="5dp">
<shape android:shape="rectangle">
<corners android:radius="10dp" />
<solid android:color="@color/app" />
</shape>
</item>
</layer-list>

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:bottom="5dp"
android:left="5dp"
android:top="5dp"
android:drawable="?android:attr/selectableItemBackground" />
</layer-list>

View File

@ -0,0 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android"
android:color="@color/transparent">
<!-- Normal button -->
<item
android:bottom="7dp"
android:right="7dp"
android:left="5dp"
android:top="7dp">
<shape android:shape="rectangle">
<corners
android:topRightRadius="8dp"
android:bottomRightRadius="8dp" />
<solid android:color="?android:attr/colorBackground" />
</shape>
</item>
<!-- selection button effect -->
<item
android:bottom="5dp"
android:right="5dp"
android:left="5dp"
android:top="5dp"
android:drawable="?android:attr/selectableItemBackground" />
</layer-list>

View File

@ -5,9 +5,6 @@
android:width="24dp"
xmlns:android="http://schemas.android.com/apk/res/android">
<path
android:fillColor="#fff"
android:strokeColor="#000"
android:strokeWidth="0.5"
android:strokeLineJoin="round"
android:fillColor="@color/app"
android:pathData="M7.41,8.59L12,13.17l4.59,-4.58L18,10l-6,6 -6,-6 1.41,-1.41z" />
</vector>

View File

@ -5,9 +5,6 @@
android:width="24dp"
xmlns:android="http://schemas.android.com/apk/res/android">
<path
android:fillColor="#fff"
android:strokeColor="#000"
android:strokeWidth="0.5"
android:strokeLineJoin="round"
android:fillColor="@color/app"
android:pathData="M8.59,16.59L13.17,12 8.59,7.41 10,6l6,6 -6,6 -1.41,-1.41z" />
</vector>

View File

@ -5,9 +5,6 @@
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="#fff"
android:strokeColor="#000"
android:strokeWidth="0.5"
android:strokeLineJoin="round"
android:fillColor="@color/app"
android:pathData="M 3 6 H 5 V 17 H 3 Z M 19 6 H 21 V 17 H 19 Z M 4 4 L 7 7 L 7 19 L 17 19 L 17 18 L 19 20 L 20 19 L 17 16 L 17 4 L 7 4 L 7 5 L 5 3 L 4 4 Z" />
</vector>

View File

@ -4,21 +4,12 @@
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="#fff"
android:strokeColor="#000"
android:strokeWidth="0.5"
android:strokeLineJoin="round"
android:fillColor="@color/app"
android:pathData="M7,4h10v15h-10z" />
<path
android:fillColor="#fff"
android:strokeColor="#000"
android:strokeWidth="0.5"
android:strokeLineJoin="round"
android:fillColor="@color/app"
android:pathData="M3,6h2v11h-2z" />
<path
android:fillColor="#fff"
android:strokeColor="#000"
android:strokeWidth="0.5"
android:strokeLineJoin="round"
android:fillColor="@color/app"
android:pathData="M19,6h2v11h-2z" />
</vector>

View File

@ -5,9 +5,6 @@
android:width="24dp"
xmlns:android="http://schemas.android.com/apk/res/android">
<path
android:fillColor="#fff"
android:strokeColor="#000"
android:strokeWidth="0.5"
android:strokeLineJoin="round"
android:fillColor="@color/app"
android:pathData="M9.4,16.6L4.8,12l4.6,-4.6L8,6l-6,6 6,6 1.4,-1.4zM14.6,16.6l4.6,-4.6 -4.6,-4.6L16,6l6,6 -6,6 -1.4,-1.4z" />
</vector>

View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@null" />
</layer-list>

View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@android:drawable/btn_default" />
</layer-list>

View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@android:drawable/btn_default" />
</layer-list>

View File

@ -46,72 +46,102 @@
android:layout_marginTop="@dimen/smallPadding"
android:gravity="center"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:drawablePadding="@dimen/smallPadding"
android:onClick="onClick"
android:text="@string/btn_blog"
android:textAppearance="@android:style/TextAppearance.DeviceDefault.Medium" /><ImageView
android:id="@+id/btn_openBlog"
android:layout_width="wrap_content"
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:drawablePadding="@dimen/smallPadding"
android:onClick="onClick"
android:text="@string/btn_blog"
android:textAppearance="@android:style/TextAppearance.DeviceDefault.Medium" />
<ImageButton
android:id="@+id/btn_openBlog"
style="?android:attr/buttonBarButtonStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:onClick="onClick"
android:padding="@dimen/smallPadding"
android:src="@android:drawable/ic_menu_view"
android:tint="?android:attr/colorAccent" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:onClick="onClick"
android:padding="@dimen/smallPadding"
android:src="@android:drawable/ic_menu_view" /></LinearLayout><LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/smallPadding"
android:gravity="center"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:drawablePadding="@dimen/smallPadding"
android:onClick="onClick"
android:text="@string/btn_playStore"
android:textAppearance="@android:style/TextAppearance.DeviceDefault.Medium" /><ImageView
android:id="@+id/btn_openPlay"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:onClick="onClick"
android:padding="@dimen/smallPadding"
android:src="@android:drawable/ic_menu_view" /><ImageView
android:id="@+id/btn_sharePlay"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:onClick="onClick"
android:padding="@dimen/smallPadding"
android:src="@android:drawable/ic_menu_share" /></LinearLayout><LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="@dimen/smallPadding"
android:gravity="center"
android:orientation="horizontal">
android:layout_marginTop="@dimen/smallPadding"
android:gravity="center"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:drawablePadding="@dimen/smallPadding"
android:onClick="onClick"
android:text="@string/btn_playStore"
android:textAppearance="@android:style/TextAppearance.DeviceDefault.Medium" />
<ImageButton
android:id="@+id/btn_openPlay"
style="?android:attr/buttonBarButtonStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:onClick="onClick"
android:padding="@dimen/smallPadding"
android:src="@android:drawable/ic_menu_view"
android:tint="?android:attr/colorAccent" />
<ImageButton
android:id="@+id/btn_sharePlay"
style="?android:attr/buttonBarButtonStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:onClick="onClick"
android:padding="@dimen/smallPadding"
android:src="@android:drawable/ic_menu_share"
android:tint="?android:attr/colorAccent" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="@dimen/smallPadding"
android:gravity="center"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:drawablePadding="@dimen/smallPadding"
android:onClick="onClick"
android:text="@string/btn_fDroid"
android:textAppearance="@android:style/TextAppearance.DeviceDefault.Medium" /><ImageView
android:id="@+id/btn_openDroid"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:onClick="onClick"
android:padding="@dimen/smallPadding"
android:src="@android:drawable/ic_menu_view" /><ImageView
android:id="@+id/btn_shareDroid"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:onClick="onClick"
android:padding="@dimen/smallPadding"
android:src="@android:drawable/ic_menu_share" /></LinearLayout>
android:textAppearance="@android:style/TextAppearance.DeviceDefault.Medium" />
<ImageButton
android:id="@+id/btn_openDroid"
style="?android:attr/buttonBarButtonStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:onClick="onClick"
android:padding="@dimen/smallPadding"
android:src="@android:drawable/ic_menu_view"
android:tint="?android:attr/colorAccent" />
<ImageButton
android:id="@+id/btn_shareDroid"
style="?android:attr/buttonBarButtonStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:onClick="onClick"
android:padding="@dimen/smallPadding"
android:src="@android:drawable/ic_menu_share"
android:tint="?android:attr/colorAccent" />
</LinearLayout>
</LinearLayout>
</ScrollView>

View File

@ -29,7 +29,8 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:text="@string/app_name" />
android:text="@string/app_name"
android:textAppearance="@android:style/TextAppearance.DeviceDefault.Medium" />
<TextView
android:layout_width="match_parent"

View File

@ -16,42 +16,53 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:drawableStart="@drawable/collapsed"
android:drawableLeft="@drawable/collapsed"
android:drawableStart="@drawable/arrow_right"
android:drawableLeft="@drawable/arrow_right"
android:gravity="center_vertical"
android:padding="5dp"
android:textSize="18sp"
android:textStyle="bold" /><ImageView
android:layout_width="2dp"
android:layout_height="match_parent"
android:layout_marginTop="3dp"
android:layout_marginBottom="3dp"
android:background="@android:color/darker_gray"
android:paddingBottom="2dp"
android:scaleType="centerInside" /><ImageButton
android:id="@+id/move_up"
style="?android:attr/buttonBarButtonStyle"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:adjustViewBounds="true"
android:src="@android:drawable/arrow_up_float" /><ImageButton
android:id="@+id/move_down"
style="?android:attr/buttonBarButtonStyle"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:adjustViewBounds="true"
android:src="@android:drawable/arrow_down_float" /><ImageView
android:layout_width="2dp"
android:layout_height="match_parent"
android:layout_marginTop="3dp"
android:layout_marginBottom="3dp"
android:background="@android:color/darker_gray"
android:scaleType="centerInside" /><Switch
android:id="@+id/enable"
android:layout_width="wrap_content"
android:layout_height="match_parent" />
android:textAppearance="@android:style/TextAppearance.DeviceDefault.Medium"
android:textStyle="bold" />
</LinearLayout>
<ImageView
android:layout_width="2dp"
android:layout_height="match_parent"
android:layout_marginTop="3dp"
android:layout_marginBottom="3dp"
android:background="@android:color/darker_gray"
android:paddingBottom="2dp"
android:scaleType="centerInside" />
<ImageButton
android:id="@+id/move_up"
style="?android:attr/buttonBarButtonStyle"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:adjustViewBounds="true"
android:rotation="180"
android:src="@drawable/arrow_down" />
<ImageButton
android:id="@+id/move_down"
style="?android:attr/buttonBarButtonStyle"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:adjustViewBounds="true"
android:src="@drawable/arrow_down" />
<ImageView
android:layout_width="2dp"
android:layout_height="match_parent"
android:layout_marginTop="3dp"
android:layout_marginBottom="3dp"
android:background="@android:color/darker_gray"
android:scaleType="centerInside" />
<Switch
android:id="@+id/enable"
android:layout_width="wrap_content"
android:layout_height="match_parent" />
</LinearLayout>
<FrameLayout
android:id="@+id/box"

View File

@ -10,7 +10,8 @@
android:layout_height="match_parent"
android:layout_weight="1"
android:minHeight="0dp"
android:src="@android:drawable/ic_media_rew" />
android:src="@android:drawable/ic_media_rew"
android:tint="?android:attr/colorAccent" />
<ImageButton
android:id="@+id/back"
@ -19,7 +20,8 @@
android:layout_height="match_parent"
android:layout_weight="1"
android:minHeight="0dp"
android:src="@android:drawable/ic_media_previous" />
android:src="@android:drawable/ic_media_previous"
android:tint="?android:attr/colorAccent" />
<ImageButton
android:id="@+id/list"
@ -28,7 +30,8 @@
android:layout_height="match_parent"
android:layout_weight="1"
android:minHeight="0dp"
android:src="@android:drawable/ic_menu_recent_history" />
android:src="@android:drawable/ic_menu_recent_history"
android:tint="?android:attr/colorAccent" />
<ImageButton
android:id="@+id/forward"
@ -37,7 +40,8 @@
android:layout_height="match_parent"
android:layout_weight="1"
android:minHeight="0dp"
android:src="@android:drawable/ic_media_next" />
android:src="@android:drawable/ic_media_next"
android:tint="?android:attr/colorAccent" />
<ImageButton
android:id="@+id/last"
@ -46,6 +50,7 @@
android:layout_height="match_parent"
android:layout_weight="1"
android:minHeight="0dp"
android:src="@android:drawable/ic_media_ff" />
android:src="@android:drawable/ic_media_ff"
android:tint="?android:attr/colorAccent" />
</LinearLayout>

View File

@ -11,19 +11,32 @@
android:layout_height="match_parent"
android:src="@drawable/ctabs_off" />
<Button
android:id="@+id/open"
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/mOpen_open" />
android:background="@drawable/open_both"
android:orientation="horizontal">
<ImageButton
android:id="@+id/open_with"
style="?android:attr/buttonBarButtonStyle"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:src="@android:drawable/arrow_down_float" />
<Button
android:id="@+id/open"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="@drawable/open_left"
android:text="@string/mOpen_open"
android:textColor="?android:attr/colorBackground" />
<ImageButton
android:id="@+id/open_with"
style="?android:attr/buttonBarButtonStyle"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:background="@drawable/open_right"
android:paddingRight="1dp"
android:src="@drawable/arrow_down" />
</LinearLayout>
<Button
android:id="@+id/share"

View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="app">?android:attr/colorAccent</color>
</resources>