mirror of https://github.com/M66B/FairEmail.git
Switch to nonTransitiveRClass
This commit is contained in:
parent
228e1ffeee
commit
0f6bfa288e
|
@ -155,7 +155,7 @@ abstract class ActivityBase extends AppCompatActivity implements SharedPreferenc
|
|||
|
||||
prefs.registerOnSharedPreferenceChangeListener(this);
|
||||
|
||||
int colorPrimaryDark = Helper.resolveColor(this, R.attr.colorPrimaryDark);
|
||||
int colorPrimaryDark = Helper.resolveColor(this, androidx.appcompat.R.attr.colorPrimaryDark);
|
||||
|
||||
try {
|
||||
Drawable d = getDrawable(R.drawable.baseline_mail_24);
|
||||
|
@ -895,7 +895,7 @@ abstract class ActivityBase extends AppCompatActivity implements SharedPreferenc
|
|||
}
|
||||
|
||||
public void showActionBar(boolean show) {
|
||||
ViewGroup abv = findViewById(R.id.action_bar);
|
||||
ViewGroup abv = findViewById(androidx.appcompat.R.id.action_bar);
|
||||
if (abv == null)
|
||||
return;
|
||||
|
||||
|
|
|
@ -212,7 +212,7 @@ public class AdapterAttachment extends RecyclerView.Adapter<AdapterAttachment.Vi
|
|||
tvType.setText(sb.toString());
|
||||
|
||||
tvError.setText(attachment.error);
|
||||
tvError.setTextColor(Helper.resolveColor(context, attachment.available ? R.attr.colorWarning : R.attr.colorError));
|
||||
tvError.setTextColor(Helper.resolveColor(context, attachment.available ? R.attr.colorWarning : androidx.appcompat.R.attr.colorError));
|
||||
tvError.setVisibility(attachment.error == null ? View.GONE : View.VISIBLE);
|
||||
|
||||
if (properties != null) {
|
||||
|
|
|
@ -380,7 +380,7 @@ public class AdapterContact extends RecyclerView.Adapter<AdapterContact.ViewHold
|
|||
this.inflater = LayoutInflater.from(context);
|
||||
|
||||
this.contacts = Helper.hasPermission(context, Manifest.permission.READ_CONTACTS);
|
||||
this.colorAccent = Helper.resolveColor(context, R.attr.colorAccent);
|
||||
this.colorAccent = Helper.resolveColor(context, androidx.appcompat.R.attr.colorAccent);
|
||||
this.textColorSecondary = Helper.resolveColor(context, android.R.attr.textColorSecondary);
|
||||
|
||||
setHasStableIds(true);
|
||||
|
|
|
@ -1366,7 +1366,7 @@ public class AdapterFolder extends RecyclerView.Adapter<AdapterFolder.ViewHolder
|
|||
boolean highlight_unread = prefs.getBoolean("highlight_unread", true);
|
||||
int colorHighlight = prefs.getInt("highlight_color", Helper.resolveColor(context, R.attr.colorUnreadHighlight));
|
||||
this.colorUnread = (highlight_unread ? colorHighlight : Helper.resolveColor(context, R.attr.colorUnread));
|
||||
this.colorControlNormal = Helper.resolveColor(context, R.attr.colorControlNormal);
|
||||
this.colorControlNormal = Helper.resolveColor(context, androidx.appcompat.R.attr.colorControlNormal);
|
||||
this.colorSeparator = Helper.resolveColor(context, R.attr.colorSeparator);
|
||||
this.debug = prefs.getBoolean("debug", false);
|
||||
|
||||
|
|
|
@ -7718,7 +7718,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|||
this.colorCardBackground = Helper.resolveColor(context, R.attr.colorCardBackground);
|
||||
boolean color_stripe_wide = prefs.getBoolean("color_stripe_wide", false);
|
||||
this.colorStripeWidth = Helper.dp2pixels(context, color_stripe_wide ? 12 : 6);
|
||||
this.colorAccent = Helper.resolveColor(context, R.attr.colorAccent);
|
||||
this.colorAccent = Helper.resolveColor(context, androidx.appcompat.R.attr.colorAccent);
|
||||
this.textColorPrimary = Helper.resolveColor(context, android.R.attr.textColorPrimary);
|
||||
this.textColorSecondary = Helper.resolveColor(context, android.R.attr.textColorSecondary);
|
||||
this.textColorTertiary = Helper.resolveColor(context, android.R.attr.textColorTertiary);
|
||||
|
@ -7735,9 +7735,9 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|||
this.colorVerified = Helper.resolveColor(context, R.attr.colorVerified);
|
||||
this.colorEncrypt = Helper.resolveColor(context, R.attr.colorEncrypt);
|
||||
this.colorSeparator = Helper.resolveColor(context, R.attr.colorSeparator);
|
||||
this.colorError = Helper.resolveColor(context, R.attr.colorError);
|
||||
this.colorError = Helper.resolveColor(context, androidx.appcompat.R.attr.colorError);
|
||||
this.colorWarning = Helper.resolveColor(context, R.attr.colorWarning);
|
||||
this.colorControlNormal = Helper.resolveColor(context, R.attr.colorControlNormal);
|
||||
this.colorControlNormal = Helper.resolveColor(context, androidx.appcompat.R.attr.colorControlNormal);
|
||||
|
||||
this.hasWebView = Helper.hasWebView(context);
|
||||
this.pin = Shortcuts.can(context);
|
||||
|
|
|
@ -160,7 +160,7 @@ public class AdapterNavMenu extends RecyclerView.Adapter<AdapterNavMenu.ViewHold
|
|||
boolean highlight_unread = prefs.getBoolean("highlight_unread", true);
|
||||
int colorHighlight = prefs.getInt("highlight_color", Helper.resolveColor(context, R.attr.colorUnreadHighlight));
|
||||
this.colorUnread = (highlight_unread ? colorHighlight : Helper.resolveColor(context, R.attr.colorUnread));
|
||||
this.colorControlNormal = Helper.resolveColor(context, R.attr.colorControlNormal);
|
||||
this.colorControlNormal = Helper.resolveColor(context, androidx.appcompat.R.attr.colorControlNormal);
|
||||
this.textColorSecondary = Helper.resolveColor(context, android.R.attr.textColorSecondary);
|
||||
this.colorWarning = ColorUtils.setAlphaComponent(Helper.resolveColor(context, R.attr.colorWarning), 128);
|
||||
|
||||
|
|
|
@ -96,7 +96,7 @@ public class EditTextCompose extends FixedEditText {
|
|||
void init(Context context) {
|
||||
Helper.setKeyboardIncognitoMode(this, context);
|
||||
|
||||
colorPrimary = Helper.resolveColor(context, R.attr.colorPrimary);
|
||||
colorPrimary = Helper.resolveColor(context, androidx.appcompat.R.attr.colorPrimary);
|
||||
colorBlockquote = Helper.resolveColor(context, R.attr.colorBlockquote, colorPrimary);
|
||||
quoteGap = context.getResources().getDimensionPixelSize(R.dimen.quote_gap_size);
|
||||
quoteStripe = context.getResources().getDimensionPixelSize(R.dimen.quote_stripe_width);
|
||||
|
|
|
@ -104,7 +104,7 @@ public class EditTextMultiAutoComplete extends AppCompatMultiAutoCompleteTextVie
|
|||
|
||||
prefs = PreferenceManager.getDefaultSharedPreferences(context);
|
||||
dark = Helper.isDarkTheme(context);
|
||||
colorAccent = Helper.resolveColor(context, R.attr.colorAccent);
|
||||
colorAccent = Helper.resolveColor(context, androidx.appcompat.R.attr.colorAccent);
|
||||
colorAccent = ColorUtils.setAlphaComponent(colorAccent, 5 * 255 / 100);
|
||||
ctx = new ContextThemeWrapper(context, dark ? R.style.ChipDark : R.style.ChipLight);
|
||||
|
||||
|
|
|
@ -433,7 +433,7 @@ public class EntityAnswer implements Serializable {
|
|||
Drawable icon = context.getResources().getDrawable(R.drawable.twotone_star_24);
|
||||
icon.setBounds(0, 0, iconSize, iconSize);
|
||||
icon = icon.getConstantState().newDrawable().mutate();
|
||||
int color = Helper.resolveColor(context, R.attr.colorAccent);
|
||||
int color = Helper.resolveColor(context, androidx.appcompat.R.attr.colorAccent);
|
||||
icon.setTint(color);
|
||||
|
||||
for (EntityAnswer answer : favorites) {
|
||||
|
|
|
@ -455,13 +455,13 @@ public class EntityFolder extends EntityOrder implements Serializable {
|
|||
|
||||
static Integer getDefaultColor(String type, Context context) {
|
||||
if (EntityFolder.TRASH.equals(type) || EntityFolder.JUNK.equals(type))
|
||||
return Helper.resolveColor(context, R.attr.colorError);
|
||||
return Helper.resolveColor(context, androidx.appcompat.R.attr.colorError);
|
||||
return null;
|
||||
}
|
||||
|
||||
static Integer getDefaultColor(Long action, String type, Context context) {
|
||||
if (EntityMessage.SWIPE_ACTION_DELETE.equals(action))
|
||||
return Helper.resolveColor(context, R.attr.colorError);
|
||||
return Helper.resolveColor(context, androidx.appcompat.R.attr.colorError);
|
||||
return getDefaultColor(type, context);
|
||||
}
|
||||
|
||||
|
|
|
@ -35,12 +35,12 @@ import androidx.recyclerview.widget.RecyclerView;
|
|||
public class FixedRecyclerView extends RecyclerView {
|
||||
public FixedRecyclerView(@NonNull Context context) {
|
||||
super(context);
|
||||
initFastScrollerEx(context, null, R.attr.recyclerViewStyle);
|
||||
initFastScrollerEx(context, null, androidx.recyclerview.R.attr.recyclerViewStyle);
|
||||
}
|
||||
|
||||
public FixedRecyclerView(@NonNull Context context, @Nullable AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
initFastScrollerEx(context, attrs, R.attr.recyclerViewStyle);
|
||||
initFastScrollerEx(context, attrs, androidx.recyclerview.R.attr.recyclerViewStyle);
|
||||
}
|
||||
|
||||
public FixedRecyclerView(@NonNull Context context, @Nullable AttributeSet attrs, int defStyle) {
|
||||
|
@ -49,22 +49,22 @@ public class FixedRecyclerView extends RecyclerView {
|
|||
}
|
||||
|
||||
private void initFastScrollerEx(Context context, AttributeSet attrs, int defStyleAttr) {
|
||||
TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.RecyclerView,
|
||||
TypedArray a = context.obtainStyledAttributes(attrs, androidx.recyclerview.R.styleable.RecyclerView,
|
||||
defStyleAttr, 0);
|
||||
StateListDrawable verticalThumbDrawable = (StateListDrawable) a
|
||||
.getDrawable(R.styleable.RecyclerView_fastScrollVerticalThumbDrawable);
|
||||
.getDrawable(androidx.recyclerview.R.styleable.RecyclerView_fastScrollVerticalThumbDrawable);
|
||||
Drawable verticalTrackDrawable = a
|
||||
.getDrawable(R.styleable.RecyclerView_fastScrollVerticalTrackDrawable);
|
||||
.getDrawable(androidx.recyclerview.R.styleable.RecyclerView_fastScrollVerticalTrackDrawable);
|
||||
StateListDrawable horizontalThumbDrawable = (StateListDrawable) a
|
||||
.getDrawable(R.styleable.RecyclerView_fastScrollHorizontalThumbDrawable);
|
||||
.getDrawable(androidx.recyclerview.R.styleable.RecyclerView_fastScrollHorizontalThumbDrawable);
|
||||
Drawable horizontalTrackDrawable = a
|
||||
.getDrawable(R.styleable.RecyclerView_fastScrollHorizontalTrackDrawable);
|
||||
.getDrawable(androidx.recyclerview.R.styleable.RecyclerView_fastScrollHorizontalTrackDrawable);
|
||||
Resources resources = getContext().getResources();
|
||||
new FastScrollerEx(this, verticalThumbDrawable, verticalTrackDrawable,
|
||||
horizontalThumbDrawable, horizontalTrackDrawable,
|
||||
resources.getDimensionPixelSize(R.dimen.fastscroll_default_thickness),
|
||||
resources.getDimensionPixelSize(R.dimen.fastscroll_minimum_range),
|
||||
resources.getDimensionPixelOffset(R.dimen.fastscroll_margin));
|
||||
resources.getDimensionPixelSize(androidx.recyclerview.R.dimen.fastscroll_minimum_range),
|
||||
resources.getDimensionPixelOffset(androidx.recyclerview.R.dimen.fastscroll_margin));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -120,7 +120,7 @@ public class FragmentAbout extends FragmentBase {
|
|||
});
|
||||
|
||||
TypedValue style = new TypedValue();
|
||||
context.getTheme().resolveAttribute(R.style.TextAppearance_AppCompat_Small, style, true);
|
||||
context.getTheme().resolveAttribute(androidx.appcompat.R.style.TextAppearance_AppCompat_Small, style, true);
|
||||
|
||||
List<Contributor> contributors = Contributor.loadContributors(context);
|
||||
for (Contributor contributor : contributors) {
|
||||
|
|
|
@ -116,7 +116,7 @@ public class FragmentAccounts extends FragmentBase {
|
|||
|
||||
// Wire controls
|
||||
|
||||
int colorPrimary = Helper.resolveColor(getContext(), R.attr.colorPrimary);
|
||||
int colorPrimary = Helper.resolveColor(getContext(), androidx.appcompat.R.attr.colorPrimary);
|
||||
swipeRefresh.setColorSchemeColors(Color.WHITE, Color.WHITE, Color.WHITE);
|
||||
swipeRefresh.setProgressBackgroundColorSchemeColor(colorPrimary);
|
||||
swipeRefresh.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {
|
||||
|
|
|
@ -7384,7 +7384,7 @@ public class FragmentCompose extends FragmentBase {
|
|||
final long id = args.getLong("id");
|
||||
final boolean show_images = args.getBoolean("show_images", false);
|
||||
|
||||
int colorPrimary = Helper.resolveColor(context, R.attr.colorPrimary);
|
||||
int colorPrimary = Helper.resolveColor(context, androidx.appcompat.R.attr.colorPrimary);
|
||||
final int colorBlockquote = Helper.resolveColor(context, R.attr.colorBlockquote, colorPrimary);
|
||||
int quoteGap = context.getResources().getDimensionPixelSize(R.dimen.quote_gap_size);
|
||||
int quoteStripe = context.getResources().getDimensionPixelSize(R.dimen.quote_stripe_width);
|
||||
|
@ -7726,7 +7726,7 @@ public class FragmentCompose extends FragmentBase {
|
|||
if (identity != null && nav_color) {
|
||||
Integer color = (identity.color == null ? identity.accountColor : identity.color);
|
||||
bottom_navigation.setBackgroundColor(color == null
|
||||
? Helper.resolveColor(context, R.attr.colorPrimary) : color);
|
||||
? Helper.resolveColor(context, androidx.appcompat.R.attr.colorPrimary) : color);
|
||||
}
|
||||
|
||||
Spanned signature = null;
|
||||
|
|
|
@ -53,7 +53,7 @@ public class FragmentDialogAsk extends FragmentDialogBase {
|
|||
int faq = args.getInt("faq");
|
||||
|
||||
final Context context = getContext();
|
||||
final int colorError = Helper.resolveColor(context, R.attr.colorError);
|
||||
final int colorError = Helper.resolveColor(context, androidx.appcompat.R.attr.colorError);
|
||||
|
||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
|
||||
|
||||
|
|
|
@ -184,7 +184,7 @@ public class FragmentFolders extends FragmentBase {
|
|||
|
||||
final SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getContext());
|
||||
|
||||
int colorPrimary = Helper.resolveColor(getContext(), R.attr.colorPrimary);
|
||||
int colorPrimary = Helper.resolveColor(getContext(), androidx.appcompat.R.attr.colorPrimary);
|
||||
swipeRefresh.setColorSchemeColors(Color.WHITE, Color.WHITE, Color.WHITE);
|
||||
swipeRefresh.setProgressBackgroundColorSchemeColor(colorPrimary);
|
||||
swipeRefresh.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {
|
||||
|
|
|
@ -506,8 +506,8 @@ public class FragmentMessages extends FragmentBase
|
|||
swipe_reply = prefs.getBoolean("swipe_reply", false);
|
||||
quick_actions = prefs.getBoolean("quick_actions", true);
|
||||
|
||||
colorPrimary = Helper.resolveColor(getContext(), R.attr.colorPrimary);
|
||||
colorAccent = Helper.resolveColor(getContext(), R.attr.colorAccent);
|
||||
colorPrimary = Helper.resolveColor(getContext(), androidx.appcompat.R.attr.colorPrimary);
|
||||
colorAccent = Helper.resolveColor(getContext(), androidx.appcompat.R.attr.colorAccent);
|
||||
colorSeparator = Helper.resolveColor(getContext(), R.attr.colorSeparator);
|
||||
colorWarning = Helper.resolveColor(getContext(), R.attr.colorWarning);
|
||||
|
||||
|
@ -5642,7 +5642,7 @@ public class FragmentMessages extends FragmentBase
|
|||
|
||||
boolean filter_active = (filter_seen || filter_unflagged || filter_unknown ||
|
||||
(language_detection && !TextUtils.isEmpty(filter_language)));
|
||||
int filterColor = Helper.resolveColor(context, R.attr.colorAccent);
|
||||
int filterColor = Helper.resolveColor(context, androidx.appcompat.R.attr.colorAccent);
|
||||
float filterLighten = 0.7f - (float) ColorUtils.calculateLuminance(filterColor);
|
||||
if (filterLighten > 0)
|
||||
filterColor = ColorUtils.blendARGB(filterColor, Color.WHITE, filterLighten);
|
||||
|
|
|
@ -241,7 +241,7 @@ public class FragmentOptions extends FragmentBase {
|
|||
tabLayout.setupWithViewPager(pager);
|
||||
|
||||
final Context context = getContext();
|
||||
int colorAccent = Helper.resolveColor(context, R.attr.colorAccent);
|
||||
int colorAccent = Helper.resolveColor(context, androidx.appcompat.R.attr.colorAccent);
|
||||
for (int i = 0; i < tabLayout.getTabCount(); i++) {
|
||||
Drawable d = ContextCompat.getDrawable(context, PAGE_ICONS[i]);
|
||||
d.setColorFilter(colorAccent, PorterDuff.Mode.SRC_ATOP);
|
||||
|
|
|
@ -663,7 +663,7 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
|
|||
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
|
||||
prefs.edit().putBoolean("navbar_colorize", checked).apply();
|
||||
setNavigationBarColor(
|
||||
checked ? Helper.resolveColor(getContext(), R.attr.colorPrimaryDark) : Color.BLACK);
|
||||
checked ? Helper.resolveColor(getContext(), androidx.appcompat.R.attr.colorPrimaryDark) : Color.BLACK);
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -139,7 +139,7 @@ public class FragmentOptionsSynchronize extends FragmentBase implements SharedPr
|
|||
|
||||
final Context context = getContext();
|
||||
this.textColorTertiary = Helper.resolveColor(context, android.R.attr.textColorTertiary);
|
||||
this.colorAccent = Helper.resolveColor(context, R.attr.colorAccent);
|
||||
this.colorAccent = Helper.resolveColor(context, androidx.appcompat.R.attr.colorAccent);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -876,7 +876,7 @@ public class Helper {
|
|||
|
||||
if (color == null) {
|
||||
//window.addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
|
||||
window.setStatusBarColor(Helper.resolveColor(window.getContext(), R.attr.colorPrimaryDark));
|
||||
window.setStatusBarColor(Helper.resolveColor(window.getContext(), androidx.appcompat.R.attr.colorPrimaryDark));
|
||||
} else {
|
||||
//window.clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
|
||||
//window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
|
||||
|
@ -1108,8 +1108,8 @@ public class Helper {
|
|||
}
|
||||
} else {
|
||||
boolean navbar_colorize = prefs.getBoolean("navbar_colorize", false);
|
||||
int colorPrimary = resolveColor(context, R.attr.colorPrimary);
|
||||
int colorPrimaryDark = resolveColor(context, R.attr.colorPrimaryDark);
|
||||
int colorPrimary = resolveColor(context, androidx.appcompat.R.attr.colorPrimary);
|
||||
int colorPrimaryDark = resolveColor(context, androidx.appcompat.R.attr.colorPrimaryDark);
|
||||
|
||||
CustomTabColorSchemeParams.Builder schemes = new CustomTabColorSchemeParams.Builder()
|
||||
.setToolbarColor(colorPrimary)
|
||||
|
@ -1792,13 +1792,13 @@ public class Helper {
|
|||
try {
|
||||
if (zoom == 0)
|
||||
ta = context.obtainStyledAttributes(
|
||||
R.style.TextAppearance_AppCompat_Small, new int[]{android.R.attr.textSize});
|
||||
androidx.appcompat.R.style.TextAppearance_AppCompat_Small, new int[]{android.R.attr.textSize});
|
||||
else if (zoom == 2)
|
||||
ta = context.obtainStyledAttributes(
|
||||
R.style.TextAppearance_AppCompat_Large, new int[]{android.R.attr.textSize});
|
||||
androidx.appcompat.R.style.TextAppearance_AppCompat_Large, new int[]{android.R.attr.textSize});
|
||||
else
|
||||
ta = context.obtainStyledAttributes(
|
||||
R.style.TextAppearance_AppCompat_Medium, new int[]{android.R.attr.textSize});
|
||||
androidx.appcompat.R.style.TextAppearance_AppCompat_Medium, new int[]{android.R.attr.textSize});
|
||||
return ta.getDimension(0, 0);
|
||||
} finally {
|
||||
if (ta != null)
|
||||
|
|
|
@ -479,7 +479,7 @@ public class HtmlHelper {
|
|||
|
||||
int textSizeSmall;
|
||||
TypedArray ta = context.obtainStyledAttributes(
|
||||
R.style.TextAppearance_AppCompat_Small, new int[]{android.R.attr.textSize});
|
||||
androidx.appcompat.R.style.TextAppearance_AppCompat_Small, new int[]{android.R.attr.textSize});
|
||||
if (ta == null)
|
||||
textSizeSmall = Helper.dp2pixels(context, 6);
|
||||
else {
|
||||
|
@ -3119,8 +3119,8 @@ public class HtmlHelper {
|
|||
boolean debug = prefs.getBoolean("debug", false);
|
||||
boolean monospaced_pre = prefs.getBoolean("monospaced_pre", false);
|
||||
|
||||
final int colorPrimary = Helper.resolveColor(context, R.attr.colorPrimary);
|
||||
final int colorAccent = Helper.resolveColor(context, R.attr.colorAccent);
|
||||
final int colorPrimary = Helper.resolveColor(context, androidx.appcompat.R.attr.colorPrimary);
|
||||
final int colorAccent = Helper.resolveColor(context, androidx.appcompat.R.attr.colorAccent);
|
||||
final int colorBlockquote = Helper.resolveColor(context, R.attr.colorBlockquote, colorPrimary);
|
||||
final int colorSeparator = Helper.resolveColor(context, R.attr.colorSeparator);
|
||||
int bulletGap = context.getResources().getDimensionPixelSize(R.dimen.bullet_gap_size);
|
||||
|
|
|
@ -123,7 +123,7 @@ public class PopupMenuLifecycle extends PopupMenu {
|
|||
icon = new ColorDrawable(Color.TRANSPARENT);
|
||||
else {
|
||||
icon = icon.getConstantState().newDrawable().mutate();
|
||||
int color = Helper.resolveColor(context, R.attr.colorAccent);
|
||||
int color = Helper.resolveColor(context, androidx.appcompat.R.attr.colorAccent);
|
||||
icon.setTint(color);
|
||||
if (!menuItem.isEnabled())
|
||||
icon.setAlpha(Math.round(Helper.LOW_LIGHT * 255));
|
||||
|
|
|
@ -972,7 +972,7 @@ public class StyleHelper {
|
|||
Context context = etBody.getContext();
|
||||
Editable edit = etBody.getText();
|
||||
|
||||
int colorAccent = Helper.resolveColor(context, R.attr.colorAccent);
|
||||
int colorAccent = Helper.resolveColor(context, androidx.appcompat.R.attr.colorAccent);
|
||||
int bulletGap = context.getResources().getDimensionPixelSize(R.dimen.bullet_gap_size);
|
||||
int bulletRadius = context.getResources().getDimensionPixelSize(R.dimen.bullet_radius_size);
|
||||
int bulletIndent = context.getResources().getDimensionPixelSize(R.dimen.bullet_indent_size);
|
||||
|
@ -1104,7 +1104,7 @@ public class StyleHelper {
|
|||
Context context = etBody.getContext();
|
||||
Editable edit = etBody.getText();
|
||||
|
||||
int colorPrimary = Helper.resolveColor(context, R.attr.colorPrimary);
|
||||
int colorPrimary = Helper.resolveColor(context, androidx.appcompat.R.attr.colorPrimary);
|
||||
final int colorBlockquote = Helper.resolveColor(context, R.attr.colorBlockquote, colorPrimary);
|
||||
int quoteGap = context.getResources().getDimensionPixelSize(R.dimen.quote_gap_size);
|
||||
int quoteStripe = context.getResources().getDimensionPixelSize(R.dimen.quote_stripe_width);
|
||||
|
@ -1671,13 +1671,13 @@ public class StyleHelper {
|
|||
NumberSpan n = (NumberSpan) span;
|
||||
int bulletGap = context.getResources().getDimensionPixelSize(R.dimen.bullet_gap_size);
|
||||
int bulletIndent = context.getResources().getDimensionPixelSize(R.dimen.bullet_indent_size);
|
||||
int colorAccent = Helper.resolveColor(context, R.attr.colorAccent);
|
||||
int colorAccent = Helper.resolveColor(context, androidx.appcompat.R.attr.colorAccent);
|
||||
return (T) new NumberSpan(bulletIndent, bulletGap, colorAccent, n.getTextSize(), n.getLevel(), n.getIndex() + 1);
|
||||
} else if (BulletSpanEx.class.isAssignableFrom(type)) {
|
||||
BulletSpanEx b = (BulletSpanEx) span;
|
||||
int bulletIndent = context.getResources().getDimensionPixelSize(R.dimen.bullet_indent_size);
|
||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.P) {
|
||||
int colorAccent = Helper.resolveColor(context, R.attr.colorAccent);
|
||||
int colorAccent = Helper.resolveColor(context, androidx.appcompat.R.attr.colorAccent);
|
||||
int bulletGap = context.getResources().getDimensionPixelSize(R.dimen.bullet_gap_size);
|
||||
return (T) new BulletSpanEx(bulletIndent, bulletGap, colorAccent, b.getLevel());
|
||||
} else
|
||||
|
@ -1705,7 +1705,7 @@ public class StyleHelper {
|
|||
static void renumber(Editable text, boolean clean, Context context) {
|
||||
int bulletGap = context.getResources().getDimensionPixelSize(R.dimen.bullet_gap_size);
|
||||
int bulletIndent = context.getResources().getDimensionPixelSize(R.dimen.bullet_indent_size);
|
||||
int colorAccent = Helper.resolveColor(context, R.attr.colorAccent);
|
||||
int colorAccent = Helper.resolveColor(context, androidx.appcompat.R.attr.colorAccent);
|
||||
|
||||
Log.i("Renumber clean=" + clean + " text=" + text);
|
||||
|
||||
|
|
|
@ -59,7 +59,7 @@ public class TextViewAutoCompleteAction extends AppCompatAutoCompleteTextView {
|
|||
TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.TextViewAutoCompleteAction, 0, 0);
|
||||
drawable = a.getDrawable(R.styleable.TextViewAutoCompleteAction_end_drawable);
|
||||
}
|
||||
int colorControlNormal = Helper.resolveColor(context, R.attr.colorControlNormal);
|
||||
int colorControlNormal = Helper.resolveColor(context, androidx.appcompat.R.attr.colorControlNormal);
|
||||
drawable.setTint(colorControlNormal);
|
||||
drawable.setBounds(0, 0, drawable.getIntrinsicWidth(), drawable.getIntrinsicHeight());
|
||||
|
||||
|
|
|
@ -17,5 +17,5 @@ org.gradle.warning.mode=all
|
|||
android.useAndroidX=true
|
||||
android.enableJetifier=false
|
||||
android.defaults.buildfeatures.buildconfig=true
|
||||
android.nonTransitiveRClass=false
|
||||
android.nonTransitiveRClass=true
|
||||
android.nonFinalResIds=false
|
||||
|
|
Loading…
Reference in New Issue