Non-transitive R classes

pull/2264/head
Alex Baker 1 year ago
parent f4e5c5c72b
commit 4121163008

@ -70,9 +70,9 @@ class CriterionViewHolder(
fun setMoving(moving: Boolean) {
if (moving) {
row.setBackgroundColor(ResourceResolver.getData(context, R.attr.colorControlHighlight))
row.setBackgroundColor(ResourceResolver.getData(context, androidx.appcompat.R.attr.colorControlHighlight))
} else {
row.setBackgroundResource(ResourceResolver.getResourceId(context, R.attr.selectableItemBackground))
row.setBackgroundResource(ResourceResolver.getResourceId(context, androidx.appcompat.R.attr.selectableItemBackground))
row.background.jumpToCurrentState()
}
}

@ -47,7 +47,7 @@ class IconPickerAdapter extends ListAdapter<Integer, IconPickerHolder> {
Integer icon = CustomIcons.getIconResId(index);
if (icon != null) {
int tint = index == current
? getData(activity, R.attr.colorAccent)
? getData(activity, androidx.appcompat.R.attr.colorAccent)
: activity.getColor(R.color.icon_tint);
boolean available = index < 1000 || inventory.getHasPro();
float alpha =

@ -168,7 +168,7 @@ class CommentBarFragment : Fragment() {
private fun resetPictureButton() {
val typedValue = TypedValue()
activity.theme.resolveAttribute(R.attr.colorOnPrimary, typedValue, true)
activity.theme.resolveAttribute(com.google.android.material.R.attr.colorOnPrimary, typedValue, true)
val drawable = activity.getDrawable(R.drawable.ic_outline_photo_camera_24px)!!.mutate()
drawable.setTint(typedValue.data)
pictureButton.setImageDrawable(drawable)

@ -296,11 +296,11 @@ public class CustomRecurrenceDialog extends DialogFragment {
new int[] {android.R.attr.state_checked}, new int[] {-android.R.attr.state_checked}
},
new int[] {
ResourceResolver.getData(context, R.attr.colorOnSecondary),
ResourceResolver.getData(context, com.google.android.material.R.attr.colorOnSecondary),
context.getColor(R.color.text_primary)
});
int inset = (int) context.getResources().getDimension(R.dimen.week_button_inset);
int accentColor = ResourceResolver.getData(context, R.attr.colorAccent);
int accentColor = ResourceResolver.getData(context, androidx.appcompat.R.attr.colorAccent);
int animationDuration =
context.getResources().getInteger(android.R.integer.config_shortAnimTime);

@ -116,7 +116,7 @@ public class CheckBoxTriStates extends AppCompatCheckBox {
Drawable drawable;
int color = state == State.UNCHECKED
? getContext().getColor(R.color.icon_tint)
: getData(getContext(), R.attr.colorAccent);
: getData(getContext(), androidx.appcompat.R.attr.colorAccent);
drawable = original.mutate();
drawable.setTint(color);
drawable.setAlpha(alpha);

@ -30,8 +30,8 @@ class ViewHolderFactory @Inject constructor(
private val textColorOverdue: Int = context.getColor(R.color.overdue)
private val fontSize: Int = preferences.fontSize
private val metrics: DisplayMetrics = context.resources.displayMetrics
private val background: Int = ResourceResolver.getResourceId(context, R.attr.selectableItemBackground)
private val selectedColor: Int = ResourceResolver.getData(context, R.attr.colorControlHighlight)
private val background: Int = ResourceResolver.getResourceId(context, androidx.appcompat.R.attr.selectableItemBackground)
private val selectedColor: Int = ResourceResolver.getData(context, androidx.appcompat.R.attr.colorControlHighlight)
private val rowPaddingDp = preferences.getInt(R.string.p_rowPadding, 16)
private val rowPaddingPx: Int = AndroidUtilities.convertDpToPixels(metrics, rowPaddingDp)
private val markdown =

@ -70,7 +70,7 @@ public class ThemeAccent implements Pickable {
public ThemeAccent(Context context, int style) {
this.style = style;
Resources.Theme theme = new ContextThemeWrapper(context, style).getTheme();
this.accentColor = resolveAttribute(theme, R.attr.colorSecondary);
this.accentColor = resolveAttribute(theme, com.google.android.material.R.attr.colorSecondary);
}
private ThemeAccent(Parcel source) {

@ -20,3 +20,4 @@ org.gradle.unsafe.configuration-cache=true
android.databinding.incremental=true
kapt.incremental.apt=true
kotlin.incremental=true
android.nonTransitiveRClass=true

Loading…
Cancel
Save