use color attributes instead of fixed colors
This commit is contained in:
@@ -142,7 +142,7 @@ public class PushNotificationReceiver extends BroadcastReceiver{
|
|||||||
.setShowWhen(true)
|
.setShowWhen(true)
|
||||||
.setCategory(Notification.CATEGORY_SOCIAL)
|
.setCategory(Notification.CATEGORY_SOCIAL)
|
||||||
.setAutoCancel(true)
|
.setAutoCancel(true)
|
||||||
.setColor(context.getColor(R.color.primary_700));
|
.setColor(UiUtils.getThemeColor(context, R.attr.colorPrimary700));
|
||||||
switch (pn.notificationType) {
|
switch (pn.notificationType) {
|
||||||
case FAVORITE -> builder.setSmallIcon(R.drawable.ic_fluent_star_24_filled);
|
case FAVORITE -> builder.setSmallIcon(R.drawable.ic_fluent_star_24_filled);
|
||||||
case REBLOG -> builder.setSmallIcon(R.drawable.ic_fluent_arrow_repeat_all_24_filled);
|
case REBLOG -> builder.setSmallIcon(R.drawable.ic_fluent_arrow_repeat_all_24_filled);
|
||||||
|
|||||||
@@ -787,7 +787,7 @@ public abstract class BaseStatusListFragment<T extends DisplayItemsParent> exten
|
|||||||
currentMediaHiddenLayoutsWidth=width;
|
currentMediaHiddenLayoutsWidth=width;
|
||||||
String title=getString(R.string.sensitive_content);
|
String title=getString(R.string.sensitive_content);
|
||||||
TextPaint titlePaint=new TextPaint(Paint.ANTI_ALIAS_FLAG);
|
TextPaint titlePaint=new TextPaint(Paint.ANTI_ALIAS_FLAG);
|
||||||
titlePaint.setColor(getResources().getColor(R.color.gray_50));
|
titlePaint.setColor(UiUtils.getThemeColor(getContext(), R.attr.colorGray50));
|
||||||
titlePaint.setTextSize(V.dp(22));
|
titlePaint.setTextSize(V.dp(22));
|
||||||
titlePaint.setTypeface(mediumTypeface);
|
titlePaint.setTypeface(mediumTypeface);
|
||||||
mediaHiddenTitleLayout=StaticLayout.Builder.obtain(title, 0, title.length(), titlePaint, width)
|
mediaHiddenTitleLayout=StaticLayout.Builder.obtain(title, 0, title.length(), titlePaint, width)
|
||||||
@@ -798,7 +798,7 @@ public abstract class BaseStatusListFragment<T extends DisplayItemsParent> exten
|
|||||||
.setAlignment(Layout.Alignment.ALIGN_CENTER)
|
.setAlignment(Layout.Alignment.ALIGN_CENTER)
|
||||||
.build();
|
.build();
|
||||||
TextPaint textPaint=new TextPaint(Paint.ANTI_ALIAS_FLAG);
|
TextPaint textPaint=new TextPaint(Paint.ANTI_ALIAS_FLAG);
|
||||||
textPaint.setColor(getResources().getColor(R.color.gray_200));
|
textPaint.setColor(UiUtils.getThemeColor(getContext(), R.attr.colorGray200));
|
||||||
textPaint.setTextSize(V.dp(16));
|
textPaint.setTextSize(V.dp(16));
|
||||||
String text=getString(R.string.sensitive_content_explain);
|
String text=getString(R.string.sensitive_content_explain);
|
||||||
mediaHiddenTextLayout=StaticLayout.Builder.obtain(text, 0, text.length(), textPaint, width)
|
mediaHiddenTextLayout=StaticLayout.Builder.obtain(text, 0, text.length(), textPaint, width)
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
<item android:color="@color/gray_50"/>
|
<item android:color="?colorGray50"/>
|
||||||
</selector>
|
</selector>
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
<solid android:color="@color/gray_800"/>
|
<solid android:color="?colorGray800"/>
|
||||||
<corners android:radius="10dp"/>
|
<corners android:radius="10dp"/>
|
||||||
<padding android:top="16dp" android:left="16dp" android:right="16dp" android:bottom="16dp"/>
|
<padding android:top="16dp" android:left="16dp" android:right="16dp" android:bottom="16dp"/>
|
||||||
</shape>
|
</shape>
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
<solid android:color="@color/gray_25"/>
|
<solid android:color="?colorGray25"/>
|
||||||
<corners android:radius="10dp"/>
|
<corners android:radius="10dp"/>
|
||||||
<padding android:top="16dp" android:left="16dp" android:right="16dp" android:bottom="16dp"/>
|
<padding android:top="16dp" android:left="16dp" android:right="16dp" android:bottom="16dp"/>
|
||||||
</shape>
|
</shape>
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
<item>
|
<item>
|
||||||
<shape android:tint="@color/gray_800">
|
<shape android:tint="?colorGray800">
|
||||||
<solid android:color="#CC000000"/>
|
<solid android:color="#CC000000"/>
|
||||||
</shape>
|
</shape>
|
||||||
</item>
|
</item>
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24dp" android:height="24dp" android:viewportWidth="24" android:viewportHeight="24">
|
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24dp" android:height="24dp" android:viewportWidth="24" android:viewportHeight="24">
|
||||||
<path android:pathData="M20.998 6.25c0-1.795-1.454-3.25-3.25-3.25H6.25C4.455 3 3 4.455 3 6.25v11.499c0 1.795 1.455 3.25 3.25 3.25h4.914l0.356-1.424 0.02-0.076H6.25c-0.204 0-0.4-0.035-0.582-0.1l5.807-5.685 0.083-0.07c0.291-0.213 0.7-0.19 0.966 0.07l2.079 2.036 1.06-1.06-2.09-2.048-0.128-0.116c-0.878-0.738-2.187-0.7-3.02 0.116l-5.822 5.7C4.536 18.157 4.5 17.957 4.5 17.75V6.25c0-0.966 0.783-1.75 1.75-1.75h11.499c0.966 0 1.75 0.784 1.75 1.75v4.983c0.478-0.19 0.993-0.264 1.5-0.22V6.25zm-3.495 2.502c0-1.244-1.008-2.252-2.252-2.252-1.244 0-2.252 1.008-2.252 2.252 0 1.243 1.008 2.252 2.252 2.252 1.244 0 2.252-1.009 2.252-2.252zm-3.004 0C14.499 8.336 14.836 8 15.251 8s0.752 0.336 0.752 0.752c0 0.415-0.337 0.752-0.752 0.752s-0.752-0.337-0.752-0.752zm4.6 3.917l-5.902 5.901c-0.345 0.345-0.589 0.776-0.707 1.248l-0.457 1.83c-0.2 0.797 0.522 1.518 1.318 1.319l1.83-0.458c0.472-0.118 0.904-0.362 1.248-0.706L22.33 15.9c0.892-0.893 0.892-2.34 0-3.232-0.893-0.893-2.34-0.893-3.233 0z" android:fillColor="@color/gray_25"/>
|
<path android:pathData="M20.998 6.25c0-1.795-1.454-3.25-3.25-3.25H6.25C4.455 3 3 4.455 3 6.25v11.499c0 1.795 1.455 3.25 3.25 3.25h4.914l0.356-1.424 0.02-0.076H6.25c-0.204 0-0.4-0.035-0.582-0.1l5.807-5.685 0.083-0.07c0.291-0.213 0.7-0.19 0.966 0.07l2.079 2.036 1.06-1.06-2.09-2.048-0.128-0.116c-0.878-0.738-2.187-0.7-3.02 0.116l-5.822 5.7C4.536 18.157 4.5 17.957 4.5 17.75V6.25c0-0.966 0.783-1.75 1.75-1.75h11.499c0.966 0 1.75 0.784 1.75 1.75v4.983c0.478-0.19 0.993-0.264 1.5-0.22V6.25zm-3.495 2.502c0-1.244-1.008-2.252-2.252-2.252-1.244 0-2.252 1.008-2.252 2.252 0 1.243 1.008 2.252 2.252 2.252 1.244 0 2.252-1.009 2.252-2.252zm-3.004 0C14.499 8.336 14.836 8 15.251 8s0.752 0.336 0.752 0.752c0 0.415-0.337 0.752-0.752 0.752s-0.752-0.337-0.752-0.752zm4.6 3.917l-5.902 5.901c-0.345 0.345-0.589 0.776-0.707 1.248l-0.457 1.83c-0.2 0.797 0.522 1.518 1.318 1.319l1.83-0.458c0.472-0.118 0.904-0.362 1.248-0.706L22.33 15.9c0.892-0.893 0.892-2.34 0-3.232-0.893-0.893-2.34-0.893-3.233 0z" android:fillColor="?colorGray25"/>
|
||||||
</vector>
|
</vector>
|
||||||
|
|||||||
@@ -5,5 +5,5 @@
|
|||||||
android:viewportHeight="4">
|
android:viewportHeight="4">
|
||||||
<path
|
<path
|
||||||
android:pathData="M4,2C4,3.1046 3.1046,4 2,4C0.8954,4 0,3.1046 0,2C0,0.8954 0.8954,0 2,0C3.1046,0 4,0.8954 4,2ZM10,2C10,3.1046 9.1046,4 8,4C6.8954,4 6,3.1046 6,2C6,0.8954 6.8954,0 8,0C9.1046,0 10,0.8954 10,2ZM14,4C15.1046,4 16,3.1046 16,2C16,0.8954 15.1046,0 14,0C12.8954,0 12,0.8954 12,2C12,3.1046 12.8954,4 14,4Z"
|
android:pathData="M4,2C4,3.1046 3.1046,4 2,4C0.8954,4 0,3.1046 0,2C0,0.8954 0.8954,0 2,0C3.1046,0 4,0.8954 4,2ZM10,2C10,3.1046 9.1046,4 8,4C6.8954,4 6,3.1046 6,2C6,0.8954 6.8954,0 8,0C9.1046,0 10,0.8954 10,2ZM14,4C15.1046,4 16,3.1046 16,2C16,0.8954 15.1046,0 14,0C12.8954,0 12,0.8954 12,2C12,3.1046 12.8954,4 14,4Z"
|
||||||
android:fillColor="@color/gray_500"/>
|
android:fillColor="?colorGray500"/>
|
||||||
</vector>
|
</vector>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
<corners android:radius="27dp"/>
|
<corners android:radius="27dp"/>
|
||||||
<stroke android:width="2dp" android:color="@color/gray_25"/>
|
<stroke android:width="2dp" android:color="?colorGray25"/>
|
||||||
</shape>
|
</shape>
|
||||||
@@ -2,14 +2,14 @@
|
|||||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
<item android:gravity="center_vertical">
|
<item android:gravity="center_vertical">
|
||||||
<shape>
|
<shape>
|
||||||
<solid android:color="@color/gray_500"/>
|
<solid android:color="?colorGray500"/>
|
||||||
<corners android:radius="1dp"/>
|
<corners android:radius="1dp"/>
|
||||||
<size android:height="2dp"/>
|
<size android:height="2dp"/>
|
||||||
</shape>
|
</shape>
|
||||||
</item>
|
</item>
|
||||||
<item android:gravity="center_vertical" android:id="@android:id/secondaryProgress">
|
<item android:gravity="center_vertical" android:id="@android:id/secondaryProgress">
|
||||||
<clip>
|
<clip>
|
||||||
<shape android:tint="@color/gray_50">
|
<shape android:tint="?colorGray50">
|
||||||
<solid android:color="#40000000"/>
|
<solid android:color="#40000000"/>
|
||||||
<corners android:radius="1dp"/>
|
<corners android:radius="1dp"/>
|
||||||
<size android:height="2dp"/>
|
<size android:height="2dp"/>
|
||||||
@@ -19,7 +19,7 @@
|
|||||||
<item android:gravity="center_vertical" android:id="@android:id/progress">
|
<item android:gravity="center_vertical" android:id="@android:id/progress">
|
||||||
<clip>
|
<clip>
|
||||||
<shape>
|
<shape>
|
||||||
<solid android:color="@color/gray_50"/>
|
<solid android:color="?colorGray50"/>
|
||||||
<corners android:radius="1dp"/>
|
<corners android:radius="1dp"/>
|
||||||
<size android:height="2dp"/>
|
<size android:height="2dp"/>
|
||||||
</shape>
|
</shape>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="oval">
|
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="oval">
|
||||||
<solid android:color="@color/gray_25"/>
|
<solid android:color="?colorGray25"/>
|
||||||
<size android:width="18dp" android:height="18dp"/>
|
<size android:width="18dp" android:height="18dp"/>
|
||||||
</shape>
|
</shape>
|
||||||
@@ -6,7 +6,7 @@
|
|||||||
android:shape="ring"
|
android:shape="ring"
|
||||||
android:thickness="4dp"
|
android:thickness="4dp"
|
||||||
android:useLevel="true">
|
android:useLevel="true">
|
||||||
<solid android:color="@color/gray_100"/>
|
<solid android:color="?colorGray100"/>
|
||||||
</shape>
|
</shape>
|
||||||
</item>
|
</item>
|
||||||
</layer-list>
|
</layer-list>
|
||||||
@@ -42,7 +42,7 @@
|
|||||||
android:layout_margin="16dp"
|
android:layout_margin="16dp"
|
||||||
android:paddingRight="8dp"
|
android:paddingRight="8dp"
|
||||||
android:paddingLeft="8dp"
|
android:paddingLeft="8dp"
|
||||||
android:textColor="@color/gray_50t"
|
android:textColor="?colorGray50t"
|
||||||
android:textAllCaps="true"
|
android:textAllCaps="true"
|
||||||
android:fontFamily="sans-serif-medium"
|
android:fontFamily="sans-serif-medium"
|
||||||
android:textSize="14dp"
|
android:textSize="14dp"
|
||||||
|
|||||||
@@ -55,7 +55,7 @@
|
|||||||
android:layout_marginRight="8dp"
|
android:layout_marginRight="8dp"
|
||||||
android:layout_marginBottom="8dp"
|
android:layout_marginBottom="8dp"
|
||||||
android:src="@drawable/ic_pause_24"
|
android:src="@drawable/ic_pause_24"
|
||||||
android:tint="@color/gray_50"
|
android:tint="?colorGray50"
|
||||||
android:contentDescription="@string/pause"
|
android:contentDescription="@string/pause"
|
||||||
android:background="?android:selectableItemBackgroundBorderless"/>
|
android:background="?android:selectableItemBackgroundBorderless"/>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user