remove ThemeUtils.getTintedDrawable (#2015)
This commit is contained in:
parent
f97d4b61c0
commit
9cdf486ceb
|
@ -22,7 +22,6 @@ import android.view.ViewGroup
|
|||
import android.widget.ArrayAdapter
|
||||
import com.keylesspalace.tusky.R
|
||||
import com.keylesspalace.tusky.entity.MastoList
|
||||
import com.keylesspalace.tusky.util.ThemeUtils
|
||||
import kotlinx.android.synthetic.main.item_picker_list.view.*
|
||||
|
||||
class ListSelectionAdapter(context: Context) : ArrayAdapter<MastoList>(context, R.layout.item_autocomplete_hashtag) {
|
||||
|
@ -34,10 +33,7 @@ class ListSelectionAdapter(context: Context) : ArrayAdapter<MastoList>(context,
|
|||
?: layoutInflater.inflate(R.layout.item_picker_list, parent, false)
|
||||
|
||||
getItem(position)?.let { list ->
|
||||
val title = view.title
|
||||
title.text = list.title
|
||||
val icon = ThemeUtils.getTintedDrawable(context, R.drawable.ic_list, R.attr.iconColor)
|
||||
title.setCompoundDrawablesRelativeWithIntrinsicBounds(icon, null, null, null)
|
||||
view.title.text = list.title
|
||||
}
|
||||
|
||||
return view
|
||||
|
|
|
@ -22,7 +22,6 @@ import android.widget.TextView
|
|||
import androidx.core.widget.TextViewCompat
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.keylesspalace.tusky.R
|
||||
import com.keylesspalace.tusky.util.ThemeUtils
|
||||
|
||||
class PreviewPollOptionsAdapter: RecyclerView.Adapter<PreviewViewHolder>() {
|
||||
|
||||
|
@ -55,9 +54,7 @@ class PreviewPollOptionsAdapter: RecyclerView.Adapter<PreviewViewHolder>() {
|
|||
R.drawable.ic_radio_button_unchecked_18dp
|
||||
}
|
||||
|
||||
val iconDrawable = ThemeUtils.getTintedDrawable(textView.context, iconId, android.R.attr.textColorTertiary)
|
||||
|
||||
TextViewCompat.setCompoundDrawablesRelativeWithIntrinsicBounds(textView, iconDrawable, null, null, null)
|
||||
TextViewCompat.setCompoundDrawablesRelativeWithIntrinsicBounds(textView, iconId, 0, 0, 0)
|
||||
|
||||
textView.text = options[position]
|
||||
|
||||
|
|
|
@ -57,7 +57,6 @@ import java.text.SimpleDateFormat;
|
|||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Objects;
|
||||
|
||||
import at.connyduck.sparkbutton.SparkButton;
|
||||
import at.connyduck.sparkbutton.helpers.Utils;
|
||||
|
@ -566,9 +565,7 @@ public abstract class StatusBaseViewHolder extends RecyclerView.ViewHolder {
|
|||
|
||||
// Set the icon next to the label.
|
||||
int drawableId = getLabelIcon(attachments.get(0).getType());
|
||||
Drawable drawable = Objects.requireNonNull(context.getDrawable(drawableId));
|
||||
ThemeUtils.setDrawableTint(context, drawable, android.R.attr.textColorTertiary);
|
||||
mediaLabel.setCompoundDrawablesWithIntrinsicBounds(drawable, null, null, null);
|
||||
mediaLabel.setCompoundDrawablesWithIntrinsicBounds(drawableId, 0, 0, 0);
|
||||
|
||||
setAttachmentClickListener(mediaLabel, listener, i, attachment, false);
|
||||
} else {
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
|
||||
package com.keylesspalace.tusky.adapter
|
||||
|
||||
import android.content.res.ColorStateList
|
||||
import android.view.LayoutInflater
|
||||
import android.view.MotionEvent
|
||||
import android.view.View
|
||||
|
@ -68,8 +69,7 @@ class TabAdapter(private var data: List<TabData>,
|
|||
} else {
|
||||
holder.itemView.textView.setText(tab.text)
|
||||
}
|
||||
val iconDrawable = ThemeUtils.getTintedDrawable(context, tab.icon, android.R.attr.textColorSecondary)
|
||||
holder.itemView.textView.setCompoundDrawablesRelativeWithIntrinsicBounds(iconDrawable, null, null, null)
|
||||
holder.itemView.textView.setCompoundDrawablesRelativeWithIntrinsicBounds(tab.icon, 0, 0, 0)
|
||||
if (small) {
|
||||
holder.itemView.textView.setOnClickListener {
|
||||
listener.onTabAdded(tab)
|
||||
|
@ -110,6 +110,7 @@ class TabAdapter(private var data: List<TabData>,
|
|||
val chip = holder.itemView.chipGroup.getChildAt(i).takeUnless { it.id == R.id.actionChip } as Chip?
|
||||
?: Chip(context).apply {
|
||||
holder.itemView.chipGroup.addView(this, holder.itemView.chipGroup.size - 1)
|
||||
chipIconTint = ColorStateList.valueOf(ThemeUtils.getColor(context, android.R.attr.textColorPrimary))
|
||||
}
|
||||
|
||||
chip.text = arg
|
||||
|
@ -118,8 +119,7 @@ class TabAdapter(private var data: List<TabData>,
|
|||
chip.chipIcon = null
|
||||
chip.setOnClickListener(null)
|
||||
} else {
|
||||
val cancelIcon = ThemeUtils.getTintedDrawable(context, R.drawable.ic_cancel_24dp, android.R.attr.textColorPrimary)
|
||||
chip.chipIcon = cancelIcon
|
||||
chip.setChipIconResource(R.drawable.ic_cancel_24dp)
|
||||
chip.setOnClickListener {
|
||||
listener.onChipClicked(tab, holder.adapterPosition, i)
|
||||
}
|
||||
|
|
|
@ -534,8 +534,7 @@ class ComposeActivity : BaseActivity(),
|
|||
Status.Visibility.UNLISTED -> R.drawable.ic_lock_open_24dp
|
||||
else -> R.drawable.ic_lock_open_24dp
|
||||
}
|
||||
val drawable = ThemeUtils.getTintedDrawable(this, iconRes, android.R.attr.textColorTertiary)
|
||||
composeToggleVisibilityButton.setImageDrawable(drawable)
|
||||
composeToggleVisibilityButton.setImageResource(iconRes)
|
||||
}
|
||||
|
||||
private fun showComposeOptions() {
|
||||
|
|
|
@ -26,13 +26,13 @@ import androidx.annotation.NonNull;
|
|||
import androidx.annotation.Nullable;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.constraintlayout.widget.ConstraintLayout;
|
||||
import androidx.core.content.ContextCompat;
|
||||
|
||||
import com.google.android.material.datepicker.CalendarConstraints;
|
||||
import com.google.android.material.datepicker.DateValidatorPointForward;
|
||||
import com.google.android.material.datepicker.MaterialDatePicker;
|
||||
import com.keylesspalace.tusky.R;
|
||||
import com.keylesspalace.tusky.fragment.TimePickerFragment;
|
||||
import com.keylesspalace.tusky.util.ThemeUtils;
|
||||
|
||||
import java.text.DateFormat;
|
||||
import java.text.ParseException;
|
||||
|
@ -106,7 +106,7 @@ public class ComposeScheduleView extends ConstraintLayout {
|
|||
}
|
||||
|
||||
private void setEditIcons() {
|
||||
Drawable icon = ThemeUtils.getTintedDrawable(getContext(), R.drawable.ic_create_24dp, android.R.attr.textColorTertiary);
|
||||
Drawable icon = ContextCompat.getDrawable(getContext(), R.drawable.ic_create_24dp);
|
||||
if (icon == null) {
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -16,10 +16,10 @@
|
|||
package com.keylesspalace.tusky.components.preference
|
||||
|
||||
import android.content.Intent
|
||||
import android.graphics.drawable.Drawable
|
||||
import android.os.Build
|
||||
import android.os.Bundle
|
||||
import android.util.Log
|
||||
import androidx.annotation.DrawableRes
|
||||
import androidx.preference.PreferenceFragmentCompat
|
||||
import com.google.android.material.snackbar.Snackbar
|
||||
import com.keylesspalace.tusky.*
|
||||
|
@ -71,7 +71,7 @@ class AccountPreferencesFragment : PreferenceFragmentCompat(), Injectable {
|
|||
|
||||
preference {
|
||||
setTitle(R.string.title_tab_preferences)
|
||||
icon = getTintedIcon(R.drawable.ic_tabs)
|
||||
setIcon(R.drawable.ic_tabs)
|
||||
setOnPreferenceClickListener {
|
||||
val intent = Intent(context, TabPreferenceActivity::class.java)
|
||||
activity?.startActivity(intent)
|
||||
|
@ -83,7 +83,7 @@ class AccountPreferencesFragment : PreferenceFragmentCompat(), Injectable {
|
|||
|
||||
preference {
|
||||
setTitle(R.string.action_view_mutes)
|
||||
icon = getTintedIcon(R.drawable.ic_mute_24dp)
|
||||
setIcon(R.drawable.ic_mute_24dp)
|
||||
setOnPreferenceClickListener {
|
||||
val intent = Intent(context, AccountListActivity::class.java)
|
||||
intent.putExtra("type", AccountListActivity.Type.MUTES)
|
||||
|
@ -112,7 +112,7 @@ class AccountPreferencesFragment : PreferenceFragmentCompat(), Injectable {
|
|||
|
||||
preference {
|
||||
setTitle(R.string.title_domain_mutes)
|
||||
icon = getTintedIcon(R.drawable.ic_mute_24dp)
|
||||
setIcon(R.drawable.ic_mute_24dp)
|
||||
setOnPreferenceClickListener {
|
||||
val intent = Intent(context, InstanceListActivity::class.java)
|
||||
activity?.startActivity(intent)
|
||||
|
@ -132,11 +132,9 @@ class AccountPreferencesFragment : PreferenceFragmentCompat(), Injectable {
|
|||
val visibility = accountManager.activeAccount?.defaultPostPrivacy
|
||||
?: Status.Visibility.PUBLIC
|
||||
value = visibility.serverString()
|
||||
icon = getIconForVisibility(visibility)
|
||||
setIcon(getIconForVisibility(visibility))
|
||||
setOnPreferenceChangeListener { _, newValue ->
|
||||
icon = getIconForVisibility(
|
||||
Status.Visibility.byString(newValue as String)
|
||||
)
|
||||
setIcon(getIconForVisibility(Status.Visibility.byString(newValue as String)))
|
||||
syncWithServer(visibility = newValue)
|
||||
eventHub.dispatch(PreferenceChangedEvent(key))
|
||||
true
|
||||
|
@ -151,9 +149,9 @@ class AccountPreferencesFragment : PreferenceFragmentCompat(), Injectable {
|
|||
val sensitivity = accountManager.activeAccount?.defaultMediaSensitivity
|
||||
?: false
|
||||
setDefaultValue(sensitivity)
|
||||
icon = getIconForSensitivity(sensitivity)
|
||||
setIcon(getIconForSensitivity(sensitivity))
|
||||
setOnPreferenceChangeListener { _, newValue ->
|
||||
icon = getIconForSensitivity(newValue as Boolean)
|
||||
setIcon(getIconForSensitivity(newValue as Boolean))
|
||||
syncWithServer(sensitive = newValue)
|
||||
eventHub.dispatch(PreferenceChangedEvent(key))
|
||||
true
|
||||
|
@ -303,30 +301,24 @@ class AccountPreferencesFragment : PreferenceFragmentCompat(), Injectable {
|
|||
}
|
||||
}
|
||||
|
||||
private fun getIconForVisibility(visibility: Status.Visibility): Drawable? {
|
||||
val drawableId = when (visibility) {
|
||||
@DrawableRes
|
||||
private fun getIconForVisibility(visibility: Status.Visibility): Int {
|
||||
return when (visibility) {
|
||||
Status.Visibility.PRIVATE -> R.drawable.ic_lock_outline_24dp
|
||||
|
||||
Status.Visibility.UNLISTED -> R.drawable.ic_lock_open_24dp
|
||||
|
||||
else -> R.drawable.ic_public_24dp
|
||||
}
|
||||
|
||||
return getTintedIcon(drawableId)
|
||||
}
|
||||
|
||||
private fun getIconForSensitivity(sensitive: Boolean): Drawable? {
|
||||
val drawableId = if (sensitive) {
|
||||
@DrawableRes
|
||||
private fun getIconForSensitivity(sensitive: Boolean): Int {
|
||||
return if (sensitive) {
|
||||
R.drawable.ic_hide_media_24dp
|
||||
} else {
|
||||
R.drawable.ic_eye_24dp
|
||||
}
|
||||
|
||||
return getTintedIcon(drawableId)
|
||||
}
|
||||
|
||||
private fun getTintedIcon(iconId: Int): Drawable? {
|
||||
return ThemeUtils.getTintedDrawable(requireContext(), iconId, R.attr.iconColor)
|
||||
}
|
||||
|
||||
private fun launchFilterActivity(filterContext: String, titleResource: Int) {
|
||||
|
|
|
@ -39,7 +39,6 @@ class PreferencesFragment : PreferenceFragmentCompat(), Injectable {
|
|||
private var httpProxyPref: Preference? = null
|
||||
|
||||
override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) {
|
||||
val context = requireContext()
|
||||
makePreferenceScreen {
|
||||
preferenceCategory(R.string.pref_title_appearance_settings) {
|
||||
listPreference {
|
||||
|
@ -115,11 +114,8 @@ class PreferencesFragment : PreferenceFragmentCompat(), Injectable {
|
|||
key = PrefKeys.SHOW_BOT_OVERLAY
|
||||
setTitle(R.string.pref_title_bot_overlay)
|
||||
isSingleLineTitle = false
|
||||
icon = ThemeUtils.getTintedDrawable(
|
||||
context,
|
||||
R.drawable.ic_bot_24dp,
|
||||
R.attr.iconColor
|
||||
)
|
||||
setIcon(R.drawable.ic_bot_24dp)
|
||||
|
||||
}
|
||||
|
||||
switchPreference {
|
||||
|
|
|
@ -23,7 +23,6 @@ import android.view.View
|
|||
import android.widget.ImageView
|
||||
import android.widget.TextView
|
||||
import androidx.annotation.DrawableRes
|
||||
import androidx.appcompat.content.res.AppCompatResources
|
||||
import com.bumptech.glide.Glide
|
||||
import com.keylesspalace.tusky.R
|
||||
import com.keylesspalace.tusky.entity.Attachment
|
||||
|
@ -220,9 +219,7 @@ class StatusViewHelper(private val itemView: View) {
|
|||
|
||||
// Set the icon next to the label.
|
||||
val drawableId = getLabelIcon(attachments[0].type)
|
||||
val drawable = AppCompatResources.getDrawable(context, drawableId)
|
||||
ThemeUtils.setDrawableTint(context, drawable!!, android.R.attr.textColorTertiary)
|
||||
mediaLabel.setCompoundDrawablesWithIntrinsicBounds(drawable, null, null, null)
|
||||
mediaLabel.setCompoundDrawablesWithIntrinsicBounds(drawableId, 0, 0, 0)
|
||||
|
||||
mediaLabel.setOnClickListener { listener.onViewMedia(null, 0) }
|
||||
}
|
||||
|
|
|
@ -22,9 +22,7 @@ import android.graphics.PorterDuff;
|
|||
import android.graphics.drawable.Drawable;
|
||||
import androidx.annotation.AttrRes;
|
||||
import androidx.annotation.ColorInt;
|
||||
import androidx.annotation.DrawableRes;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.appcompat.app.AppCompatDelegate;
|
||||
import android.util.TypedValue;
|
||||
|
||||
|
@ -59,17 +57,6 @@ public class ThemeUtils {
|
|||
return dimen;
|
||||
}
|
||||
|
||||
/** this can be replaced with drawableTint in xml once minSdkVersion >= 23 */
|
||||
@Nullable
|
||||
public static Drawable getTintedDrawable(@NonNull Context context, @DrawableRes int drawableId, @AttrRes int colorAttr) {
|
||||
Drawable drawable = context.getDrawable(drawableId);
|
||||
if(drawable == null) {
|
||||
return null;
|
||||
}
|
||||
setDrawableTint(context, drawable, colorAttr);
|
||||
return drawable;
|
||||
}
|
||||
|
||||
public static void setDrawableTint(Context context, Drawable drawable, @AttrRes int attribute) {
|
||||
drawable.setColorFilter(getColor(context, attribute), PorterDuff.Mode.SRC_IN);
|
||||
}
|
||||
|
|
|
@ -136,10 +136,10 @@
|
|||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/composeMediaPreviewBar"
|
||||
android:visibility="gone"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:scrollbars="none" />
|
||||
android:scrollbars="none"
|
||||
android:visibility="gone" />
|
||||
|
||||
<com.keylesspalace.tusky.components.compose.view.PollPreviewView
|
||||
android:id="@+id/pollPreview"
|
||||
|
@ -239,9 +239,9 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom"
|
||||
android:animateLayoutChanges="true"
|
||||
android:background="?attr/colorSurface"
|
||||
android:elevation="12dp"
|
||||
android:animateLayoutChanges="true"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingStart="8dp"
|
||||
android:paddingTop="4dp"
|
||||
|
@ -256,8 +256,8 @@
|
|||
android:layout_marginEnd="4dp"
|
||||
android:contentDescription="@string/action_add_media"
|
||||
android:padding="4dp"
|
||||
android:tooltipText="@string/action_add_media"
|
||||
app:srcCompat="@drawable/ic_attach_file_24dp" />
|
||||
app:srcCompat="@drawable/ic_attach_file_24dp"
|
||||
app:tooltipText="@string/action_add_media" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/composeToggleVisibilityButton"
|
||||
|
@ -267,7 +267,8 @@
|
|||
android:layout_marginEnd="4dp"
|
||||
android:contentDescription="@string/action_toggle_visibility"
|
||||
android:padding="4dp"
|
||||
android:tooltipText="@string/action_toggle_visibility"
|
||||
android:tint="?android:attr/textColorTertiary"
|
||||
app:tooltipText="@string/action_toggle_visibility"
|
||||
tools:src="@drawable/ic_public_24dp" />
|
||||
|
||||
<ImageButton
|
||||
|
@ -278,7 +279,7 @@
|
|||
android:layout_marginEnd="4dp"
|
||||
android:contentDescription="@string/action_hide_media"
|
||||
android:padding="4dp"
|
||||
android:tooltipText="@string/action_hide_media"
|
||||
app:tooltipText="@string/action_hide_media"
|
||||
tools:src="@drawable/ic_eye_24dp" />
|
||||
|
||||
<ImageButton
|
||||
|
@ -289,8 +290,8 @@
|
|||
android:layout_marginEnd="4dp"
|
||||
android:contentDescription="@string/action_content_warning"
|
||||
android:padding="4dp"
|
||||
android:tooltipText="@string/action_content_warning"
|
||||
app:srcCompat="@drawable/ic_cw_24dp" />
|
||||
app:srcCompat="@drawable/ic_cw_24dp"
|
||||
app:tooltipText="@string/action_content_warning" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/composeEmojiButton"
|
||||
|
@ -300,8 +301,8 @@
|
|||
android:layout_marginEnd="4dp"
|
||||
android:contentDescription="@string/action_emoji_keyboard"
|
||||
android:padding="4dp"
|
||||
android:tooltipText="@string/action_emoji_keyboard"
|
||||
app:srcCompat="@drawable/ic_emoji_24dp" />
|
||||
app:srcCompat="@drawable/ic_emoji_24dp"
|
||||
app:tooltipText="@string/action_emoji_keyboard" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/composeScheduleButton"
|
||||
|
@ -311,8 +312,8 @@
|
|||
android:layout_marginEnd="4dp"
|
||||
android:contentDescription="@string/action_schedule_toot"
|
||||
android:padding="4dp"
|
||||
android:tooltipText="@string/action_schedule_toot"
|
||||
app:srcCompat="@drawable/ic_access_time" />
|
||||
app:srcCompat="@drawable/ic_access_time"
|
||||
app:tooltipText="@string/action_schedule_toot" />
|
||||
|
||||
<Space
|
||||
android:layout_width="0dp"
|
||||
|
|
|
@ -1,8 +1,11 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/hashtag"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="16dp"
|
||||
android:textSize="?attr/status_text_medium"
|
||||
android:textStyle="normal|bold" />
|
||||
android:textStyle="normal|bold"
|
||||
app:drawableStartCompat="@drawable/ic_list"
|
||||
app:drawableTint="?attr/iconColor" />
|
||||
|
|
|
@ -340,6 +340,7 @@
|
|||
android:importantForAccessibility="no"
|
||||
android:textSize="?attr/status_text_medium"
|
||||
android:visibility="gone"
|
||||
app:drawableTint="?android:attr/textColorTertiary"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
|
@ -353,6 +354,7 @@
|
|||
android:importantForAccessibility="no"
|
||||
android:textSize="?attr/status_text_medium"
|
||||
android:visibility="gone"
|
||||
app:drawableTint="?android:attr/textColorTertiary"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/status_media_label_0" />
|
||||
|
||||
|
@ -366,6 +368,7 @@
|
|||
android:importantForAccessibility="no"
|
||||
android:textSize="?attr/status_text_medium"
|
||||
android:visibility="gone"
|
||||
app:drawableTint="?android:attr/textColorTertiary"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/status_media_label_1" />
|
||||
|
||||
|
@ -379,6 +382,7 @@
|
|||
android:importantForAccessibility="no"
|
||||
android:textSize="?attr/status_text_medium"
|
||||
android:visibility="gone"
|
||||
app:drawableTint="?android:attr/textColorTertiary"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/status_media_label_2" />
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawablePadding="4dp"
|
||||
|
@ -7,4 +8,5 @@
|
|||
android:focusableInTouchMode="false"
|
||||
android:gravity="center_vertical"
|
||||
android:lines="1"
|
||||
android:maxEms="20" />
|
||||
android:maxEms="20"
|
||||
app:drawableTint="?android:attr/textColorTertiary" />
|
|
@ -198,8 +198,8 @@
|
|||
app:layout_constraintLeft_toLeftOf="@+id/status_media_preview_container"
|
||||
app:layout_constraintTop_toTopOf="@+id/status_media_preview_container"
|
||||
app:srcCompat="@drawable/ic_eye_24dp"
|
||||
tools:visibility="visible"
|
||||
app:tint="@color/white" />
|
||||
app:tint="@color/white"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/status_sensitive_media_warning"
|
||||
|
@ -231,6 +231,7 @@
|
|||
android:gravity="center_vertical"
|
||||
android:textSize="?attr/status_text_medium"
|
||||
android:visibility="gone"
|
||||
app:drawableTint="?android:attr/textColorTertiary"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
|
|
|
@ -167,9 +167,9 @@
|
|||
android:foreground="?attr/selectableItemBackground"
|
||||
android:minHeight="80dp"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="@id/status_display_name"
|
||||
app:layout_constraintTop_toBottomOf="@+id/button_toggle_content"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
tools:visibility="gone">
|
||||
|
||||
<ImageView
|
||||
|
@ -398,6 +398,7 @@
|
|||
android:importantForAccessibility="no"
|
||||
android:textSize="?attr/status_text_medium"
|
||||
android:visibility="gone"
|
||||
app:drawableTint="?android:attr/textColorTertiary"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
|
@ -411,6 +412,7 @@
|
|||
android:importantForAccessibility="no"
|
||||
android:textSize="?attr/status_text_medium"
|
||||
android:visibility="gone"
|
||||
app:drawableTint="?android:attr/textColorTertiary"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/status_media_label_0" />
|
||||
|
||||
|
@ -424,6 +426,7 @@
|
|||
android:importantForAccessibility="no"
|
||||
android:textSize="?attr/status_text_medium"
|
||||
android:visibility="gone"
|
||||
app:drawableTint="?android:attr/textColorTertiary"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/status_media_label_1" />
|
||||
|
||||
|
@ -437,6 +440,7 @@
|
|||
android:importantForAccessibility="no"
|
||||
android:textSize="?attr/status_text_medium"
|
||||
android:visibility="gone"
|
||||
app:drawableTint="?android:attr/textColorTertiary"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/status_media_label_2" />
|
||||
|
||||
|
|
|
@ -344,6 +344,7 @@
|
|||
android:importantForAccessibility="no"
|
||||
android:textSize="?attr/status_text_medium"
|
||||
android:visibility="gone"
|
||||
app:drawableTint="?android:attr/textColorTertiary"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
|
@ -357,6 +358,7 @@
|
|||
android:importantForAccessibility="no"
|
||||
android:textSize="?attr/status_text_medium"
|
||||
android:visibility="gone"
|
||||
app:drawableTint="?android:attr/textColorTertiary"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/status_media_label_0" />
|
||||
|
||||
|
@ -370,6 +372,7 @@
|
|||
android:importantForAccessibility="no"
|
||||
android:textSize="?attr/status_text_medium"
|
||||
android:visibility="gone"
|
||||
app:drawableTint="?android:attr/textColorTertiary"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/status_media_label_1" />
|
||||
|
||||
|
@ -383,6 +386,7 @@
|
|||
android:importantForAccessibility="no"
|
||||
android:textSize="?attr/status_text_medium"
|
||||
android:visibility="gone"
|
||||
app:drawableTint="?android:attr/textColorTertiary"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/status_media_label_2" />
|
||||
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
android:paddingBottom="8dp"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
android:textSize="?attr/status_text_large"
|
||||
app:drawableTint="?android:attr/textColorSecondary"
|
||||
app:layout_constraintBottom_toTopOf="@id/chipGroup"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/imageView"
|
||||
|
|
|
@ -1,17 +1,19 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/textView"
|
||||
android:layout_width="match_parent"
|
||||
android:drawableStart="@drawable/ic_home_24dp"
|
||||
android:layout_height="48dp"
|
||||
android:gravity="center_vertical"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:drawablePadding="12dp"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center_vertical"
|
||||
android:lines="1"
|
||||
android:paddingStart="8dp"
|
||||
android:paddingEnd="8dp"
|
||||
android:lines="1"
|
||||
android:ellipsize="end"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
android:textSize="?attr/status_text_large" />
|
||||
android:textSize="?attr/status_text_large"
|
||||
app:drawableStartCompat="@drawable/ic_home_24dp"
|
||||
app:drawableTint="?android:attr/textColorSecondary" />
|
||||
|
||||
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
android:paddingBottom="16dp"
|
||||
android:textColor="?android:textColorTertiary"
|
||||
android:textSize="?attr/status_text_medium"
|
||||
app:drawableTint="?android:attr/textColorTertiary"
|
||||
app:layout_constraintBottom_toTopOf="@id/invalidScheduleWarning"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="1"
|
||||
|
@ -39,11 +40,11 @@
|
|||
android:paddingBottom="16dp"
|
||||
android:textColor="?android:textColorTertiary"
|
||||
android:textSize="?attr/status_text_medium"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="1"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
tools:text="@string/warning_scheduling_interval"
|
||||
android:visibility="gone" />
|
||||
tools:text="@string/warning_scheduling_interval" />
|
||||
|
||||
</merge>
|
|
@ -80,6 +80,8 @@
|
|||
<item name="swipeRefreshLayoutProgressSpinnerBackgroundColor">?attr/colorSurface</item>
|
||||
|
||||
<item name="chipStyle">@style/Widget.MaterialComponents.Chip.Choice</item>
|
||||
|
||||
<item name="preferenceTheme">@style/TuskyPreferenceTheme</item>
|
||||
</style>
|
||||
|
||||
<style name="ViewMediaActivity.AppBarLayout" parent="ThemeOverlay.AppCompat">
|
||||
|
@ -103,6 +105,10 @@
|
|||
<item name="tabIndicatorHeight">3dp</item>
|
||||
</style>
|
||||
|
||||
<style name="TuskyPreferenceTheme" parent="@style/PreferenceThemeOverlay.v14.Material">
|
||||
<item name="android:tint">?iconColor</item>
|
||||
</style>
|
||||
|
||||
<style name="TuskyImageButton" parent="@style/Widget.MaterialComponents.Button.UnelevatedButton">
|
||||
<item name="android:tint">?android:attr/textColorTertiary</item>
|
||||
<item name="android:background">?attr/selectableItemBackgroundBorderless</item>
|
||||
|
|
Loading…
Reference in New Issue