Icon replaces

This commit is contained in:
世界 2020-06-25 15:12:58 +00:00
parent 5eb5f9de51
commit 9196691935
No known key found for this signature in database
GPG Key ID: CD109927C34A63C4
110 changed files with 423 additions and 409 deletions

View File

@ -132,8 +132,8 @@ public class ImageReceiver implements NotificationCenter.NotificationCenterDeleg
private int param;
private Object currentParentObject;
private boolean canceledLoading;
private static PorterDuffColorFilter selectedColorFilter = new PorterDuffColorFilter(0xffdddddd, PorterDuff.Mode.MULTIPLY);
private static PorterDuffColorFilter selectedGroupColorFilter = new PorterDuffColorFilter(0xffbbbbbb, PorterDuff.Mode.MULTIPLY);
private static PorterDuffColorFilter selectedColorFilter = new PorterDuffColorFilter(0xffdddddd, PorterDuff.Mode.SRC_IN);
private static PorterDuffColorFilter selectedGroupColorFilter = new PorterDuffColorFilter(0xffbbbbbb, PorterDuff.Mode.SRC_IN);
private boolean forceLoding;
private int currentLayerNum;

View File

@ -136,7 +136,7 @@ public class LocationSharingService extends Service implements NotificationCente
builder.setContentIntent(contentIntent);
NotificationsController.checkOtherNotificationsChannel();
builder.setChannelId(NotificationsController.OTHER_NOTIFICATIONS_CHANNEL);
builder.setContentTitle(LocaleController.getString("AppName", R.string.AppName));
builder.setContentTitle(LocaleController.getString("NekoX", R.string.NekoX));
Intent stopIntent = new Intent(ApplicationLoader.applicationContext, StopLiveLocationReceiver.class);
builder.addAction(0, LocaleController.getString("StopLiveLocation", R.string.StopLiveLocation), PendingIntent.getBroadcast(ApplicationLoader.applicationContext, 2, stopIntent, PendingIntent.FLAG_UPDATE_CURRENT));
}

View File

@ -3482,7 +3482,7 @@ public class NotificationsController extends BaseController {
msgHeardIntent.putExtra("max_id", max_id);
msgHeardIntent.putExtra("currentAccount", currentAccount);
PendingIntent readPendingIntent = PendingIntent.getBroadcast(ApplicationLoader.applicationContext, internalId, msgHeardIntent, PendingIntent.FLAG_UPDATE_CURRENT);
NotificationCompat.Action readAction = new NotificationCompat.Action.Builder(R.drawable.menu_read, LocaleController.getString("MarkAsRead", R.string.MarkAsRead), readPendingIntent)
NotificationCompat.Action readAction = new NotificationCompat.Action.Builder(R.drawable.deproko_baseline_check_double_24, LocaleController.getString("MarkAsRead", R.string.MarkAsRead), readPendingIntent)
.setSemanticAction(NotificationCompat.Action.SEMANTIC_ACTION_MARK_AS_READ)
.setShowsUserInterface(false)
.build();

View File

@ -116,7 +116,7 @@ public class ActionBar extends FrameLayout {
backButtonImageView.setScaleType(ImageView.ScaleType.CENTER);
backButtonImageView.setBackgroundDrawable(Theme.createSelectorDrawable(itemsBackgroundColor));
if (itemsColor != 0) {
backButtonImageView.setColorFilter(new PorterDuffColorFilter(itemsColor, PorterDuff.Mode.MULTIPLY));
backButtonImageView.setColorFilter(new PorterDuffColorFilter(itemsColor, PorterDuff.Mode.SRC_IN));
}
backButtonImageView.setPadding(AndroidUtilities.dp(1), 0, 0, 0);
addView(backButtonImageView, LayoutHelper.createFrame(54, 54, Gravity.LEFT | Gravity.TOP));
@ -948,7 +948,7 @@ public class ActionBar extends FrameLayout {
itemsColor = color;
if (backButtonImageView != null) {
if (itemsColor != 0) {
backButtonImageView.setColorFilter(new PorterDuffColorFilter(itemsColor, PorterDuff.Mode.MULTIPLY));
backButtonImageView.setColorFilter(new PorterDuffColorFilter(itemsColor, PorterDuff.Mode.SRC_IN));
Drawable drawable = backButtonImageView.getDrawable();
if (drawable instanceof BackDrawable) {
((BackDrawable) drawable).setColor(color);

View File

@ -32,7 +32,7 @@ public class ActionBarMenuSubItem extends FrameLayout {
imageView = new ImageView(context);
imageView.setScaleType(ImageView.ScaleType.CENTER);
imageView.setColorFilter(new PorterDuffColorFilter(iconColor, PorterDuff.Mode.MULTIPLY));
imageView.setColorFilter(new PorterDuffColorFilter(iconColor, PorterDuff.Mode.SRC_IN));
addView(imageView, LayoutHelper.createFrame(LayoutHelper.WRAP_CONTENT, 40, Gravity.CENTER_VERTICAL | (LocaleController.isRTL ? Gravity.RIGHT : Gravity.LEFT)));
textView = new TextView(context);
@ -75,7 +75,7 @@ public class ActionBarMenuSubItem extends FrameLayout {
public void setIconColor(int iconColor) {
if (this.iconColor != iconColor) {
imageView.setColorFilter(new PorterDuffColorFilter(this.iconColor = iconColor, PorterDuff.Mode.MULTIPLY));
imageView.setColorFilter(new PorterDuffColorFilter(this.iconColor = iconColor, PorterDuff.Mode.SRC_IN));
}
}

View File

@ -138,7 +138,7 @@ public class AlertDialog extends Dialog implements Drawable.Callback {
imageView = new ImageView(context);
imageView.setScaleType(ImageView.ScaleType.CENTER);
imageView.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_dialogIcon), PorterDuff.Mode.MULTIPLY));
imageView.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_dialogIcon), PorterDuff.Mode.SRC_IN));
addView(imageView, LayoutHelper.createFrame(LayoutHelper.WRAP_CONTENT, 40, Gravity.CENTER_VERTICAL | (LocaleController.isRTL ? Gravity.RIGHT : Gravity.LEFT)));
textView = new TextView(context);
@ -183,7 +183,7 @@ public class AlertDialog extends Dialog implements Drawable.Callback {
backgroundPaddings = new Rect();
if (progressStyle != 3) {
shadowDrawable = context.getResources().getDrawable(R.drawable.popup_fixed_alert).mutate();
shadowDrawable.setColorFilter(new PorterDuffColorFilter(getThemeColor(Theme.key_dialogBackground), PorterDuff.Mode.MULTIPLY));
shadowDrawable.setColorFilter(new PorterDuffColorFilter(getThemeColor(Theme.key_dialogBackground), PorterDuff.Mode.SRC_IN));
shadowDrawable.getPadding(backgroundPaddings);
}
@ -200,7 +200,7 @@ public class AlertDialog extends Dialog implements Drawable.Callback {
@Override
public boolean onTouchEvent(MotionEvent event) {
if (progressViewStyle == 3) {
if (progressViewStyle > 0) {
showCancelAlert();
return false;
}
@ -209,7 +209,7 @@ public class AlertDialog extends Dialog implements Drawable.Callback {
@Override
public boolean onInterceptTouchEvent(MotionEvent ev) {
if (progressViewStyle == 3) {
if (progressViewStyle > 0) {
showCancelAlert();
return false;
}
@ -395,7 +395,7 @@ public class AlertDialog extends Dialog implements Drawable.Callback {
}
topImageView.setScaleType(ImageView.ScaleType.CENTER);
topImageView.setBackgroundDrawable(getContext().getResources().getDrawable(R.drawable.popup_fixed_top));
topImageView.getBackground().setColorFilter(new PorterDuffColorFilter(topBackgroundColor, PorterDuff.Mode.MULTIPLY));
topImageView.getBackground().setColorFilter(new PorterDuffColorFilter(topBackgroundColor, PorterDuff.Mode.SRC_IN));
topImageView.setPadding(0, 0, 0, 0);
containerView.addView(topImageView, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, topHeight, Gravity.LEFT | Gravity.TOP, -8, -8, 0, 0));
}
@ -474,6 +474,8 @@ public class AlertDialog extends Dialog implements Drawable.Callback {
}
messageTextView.setGravity((LocaleController.isRTL ? Gravity.RIGHT : Gravity.LEFT) | Gravity.TOP);
if (progressViewStyle == 1) {
setCanceledOnTouchOutside(false);
setCancelable(false);
progressViewContainer = new FrameLayout(getContext());
containerView.addView(progressViewContainer, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, 44, Gravity.LEFT | Gravity.TOP, 23, title == null ? 24 : 0, 23, 24));
@ -485,6 +487,8 @@ public class AlertDialog extends Dialog implements Drawable.Callback {
messageTextView.setEllipsize(TextUtils.TruncateAt.END);
progressViewContainer.addView(messageTextView, LayoutHelper.createFrame(LayoutHelper.WRAP_CONTENT, LayoutHelper.WRAP_CONTENT, (LocaleController.isRTL ? Gravity.RIGHT : Gravity.LEFT) | Gravity.CENTER_VERTICAL, (LocaleController.isRTL ? 0 : 62), 0, (LocaleController.isRTL ? 62 : 0), 0));
} else if (progressViewStyle == 2) {
setCanceledOnTouchOutside(false);
setCancelable(false);
containerView.addView(messageTextView, LayoutHelper.createLinear(LayoutHelper.WRAP_CONTENT, LayoutHelper.WRAP_CONTENT, (LocaleController.isRTL ? Gravity.RIGHT : Gravity.LEFT) | Gravity.TOP, 24, title == null ? 19 : 0, 24, 20));
lineProgressView = new LineProgressView(getContext());
@ -953,7 +957,7 @@ public class AlertDialog extends Dialog implements Drawable.Callback {
}
AlertDialogCell cell = itemViews.get(item);
cell.textView.setTextColor(color);
cell.imageView.setColorFilter(new PorterDuffColorFilter(icon, PorterDuff.Mode.MULTIPLY));
cell.imageView.setColorFilter(new PorterDuffColorFilter(icon, PorterDuff.Mode.SRC_IN));
}
public int getItemsCount() {
@ -1070,6 +1074,7 @@ public class AlertDialog extends Dialog implements Drawable.Callback {
}
public Builder setItems(CharSequence[] items, int[] icons, final OnClickListener onClickListener) {
// TODO: NEKOX: MIG ICONS
alertDialog.items = items;
alertDialog.itemIcons = icons;
alertDialog.onClickListener = onClickListener;

View File

@ -247,14 +247,14 @@ public class ThemeDescription {
}
} else if (drawablesToUpdate[a] instanceof CombinedDrawable) {
if ((changeFlags & FLAG_BACKGROUNDFILTER) != 0) {
((CombinedDrawable) drawablesToUpdate[a]).getBackground().setColorFilter(new PorterDuffColorFilter(color, PorterDuff.Mode.MULTIPLY));
((CombinedDrawable) drawablesToUpdate[a]).getBackground().setColorFilter(new PorterDuffColorFilter(color, PorterDuff.Mode.SRC_IN));
} else {
((CombinedDrawable) drawablesToUpdate[a]).getIcon().setColorFilter(new PorterDuffColorFilter(color, PorterDuff.Mode.MULTIPLY));
((CombinedDrawable) drawablesToUpdate[a]).getIcon().setColorFilter(new PorterDuffColorFilter(color, PorterDuff.Mode.SRC_IN));
}
} else if (drawablesToUpdate[a] instanceof AvatarDrawable) {
((AvatarDrawable) drawablesToUpdate[a]).setColor(color);
} else {
drawablesToUpdate[a].setColorFilter(new PorterDuffColorFilter(color, PorterDuff.Mode.MULTIPLY));
drawablesToUpdate[a].setColorFilter(new PorterDuffColorFilter(color, PorterDuff.Mode.SRC_IN));
}
}
}
@ -288,7 +288,7 @@ public class ThemeDescription {
} else if (drawable instanceof ShapeDrawable) {
((ShapeDrawable) drawable).getPaint().setColor(color);
} else {
drawable.setColorFilter(new PorterDuffColorFilter(color, PorterDuff.Mode.MULTIPLY));
drawable.setColorFilter(new PorterDuffColorFilter(color, PorterDuff.Mode.SRC_IN));
}
}
}
@ -398,10 +398,10 @@ public class ThemeDescription {
Theme.setSelectorDrawableColor(drawable, color, (changeFlags & FLAG_DRAWABLESELECTEDSTATE) != 0);
}
} else {
((ImageView) viewToInvalidate).setColorFilter(new PorterDuffColorFilter(color, PorterDuff.Mode.MULTIPLY));
((ImageView) viewToInvalidate).setColorFilter(new PorterDuffColorFilter(color, PorterDuff.Mode.SRC_IN));
}
} else if (viewToInvalidate instanceof BackupImageView) {
//((BackupImageView) viewToInvalidate).setResourceImageColorFilter(new PorterDuffColorFilter(color, PorterDuff.Mode.MULTIPLY));
//((BackupImageView) viewToInvalidate).setResourceImageColorFilter(new PorterDuffColorFilter(color, PorterDuff.Mode.SRC_IN));
} else if (viewToInvalidate instanceof SimpleTextView) {
SimpleTextView textView = (SimpleTextView) viewToInvalidate;
textView.setSideDrawablesColor(color);
@ -410,7 +410,7 @@ public class ThemeDescription {
if (drawables != null) {
for (int a = 0; a < drawables.length; a++) {
if (drawables[a] != null) {
drawables[a].setColorFilter(new PorterDuffColorFilter(color, PorterDuff.Mode.MULTIPLY));
drawables[a].setColorFilter(new PorterDuffColorFilter(color, PorterDuff.Mode.SRC_IN));
}
}
}
@ -521,7 +521,7 @@ public class ThemeDescription {
} else if (drawable instanceof StateListDrawable || Build.VERSION.SDK_INT >= 21 && drawable instanceof RippleDrawable) {
Theme.setSelectorDrawableColor(drawable, color, (changeFlags & FLAG_DRAWABLESELECTEDSTATE) != 0);
}
drawable.setColorFilter(new PorterDuffColorFilter(color, PorterDuff.Mode.MULTIPLY));
drawable.setColorFilter(new PorterDuffColorFilter(color, PorterDuff.Mode.SRC_IN));
}
}
} else if ((changeFlags & FLAG_CELLBACKGROUNDCOLOR) != 0) {
@ -602,7 +602,7 @@ public class ThemeDescription {
if (drawables != null) {
for (int a = 0; a < drawables.length; a++) {
if (drawables[a] != null) {
drawables[a].setColorFilter(new PorterDuffColorFilter(color, PorterDuff.Mode.MULTIPLY));
drawables[a].setColorFilter(new PorterDuffColorFilter(color, PorterDuff.Mode.SRC_IN));
}
}
}
@ -627,23 +627,23 @@ public class ThemeDescription {
Drawable drawable = imageView.getDrawable();
if (drawable instanceof CombinedDrawable) {
if ((changeFlags & FLAG_BACKGROUNDFILTER) != 0) {
((CombinedDrawable) drawable).getBackground().setColorFilter(new PorterDuffColorFilter(color, PorterDuff.Mode.MULTIPLY));
((CombinedDrawable) drawable).getBackground().setColorFilter(new PorterDuffColorFilter(color, PorterDuff.Mode.SRC_IN));
} else {
((CombinedDrawable) drawable).getIcon().setColorFilter(new PorterDuffColorFilter(color, PorterDuff.Mode.MULTIPLY));
((CombinedDrawable) drawable).getIcon().setColorFilter(new PorterDuffColorFilter(color, PorterDuff.Mode.SRC_IN));
}
} else {
imageView.setColorFilter(new PorterDuffColorFilter(color, PorterDuff.Mode.MULTIPLY));
imageView.setColorFilter(new PorterDuffColorFilter(color, PorterDuff.Mode.SRC_IN));
}
} else if (object instanceof BackupImageView) {
Drawable drawable = ((BackupImageView) object).getImageReceiver().getStaticThumb();
if (drawable instanceof CombinedDrawable) {
if ((changeFlags & FLAG_BACKGROUNDFILTER) != 0) {
((CombinedDrawable) drawable).getBackground().setColorFilter(new PorterDuffColorFilter(color, PorterDuff.Mode.MULTIPLY));
((CombinedDrawable) drawable).getBackground().setColorFilter(new PorterDuffColorFilter(color, PorterDuff.Mode.SRC_IN));
} else {
((CombinedDrawable) drawable).getIcon().setColorFilter(new PorterDuffColorFilter(color, PorterDuff.Mode.MULTIPLY));
((CombinedDrawable) drawable).getIcon().setColorFilter(new PorterDuffColorFilter(color, PorterDuff.Mode.SRC_IN));
}
} else if (drawable != null) {
drawable.setColorFilter(new PorterDuffColorFilter(color, PorterDuff.Mode.MULTIPLY));
drawable.setColorFilter(new PorterDuffColorFilter(color, PorterDuff.Mode.SRC_IN));
}
} else if (object instanceof Drawable) {
if (object instanceof LetterDrawable) {
@ -654,16 +654,16 @@ public class ThemeDescription {
}
} else if (object instanceof CombinedDrawable) {
if ((changeFlags & FLAG_BACKGROUNDFILTER) != 0) {
((CombinedDrawable) object).getBackground().setColorFilter(new PorterDuffColorFilter(color, PorterDuff.Mode.MULTIPLY));
((CombinedDrawable) object).getBackground().setColorFilter(new PorterDuffColorFilter(color, PorterDuff.Mode.SRC_IN));
} else {
((CombinedDrawable) object).getIcon().setColorFilter(new PorterDuffColorFilter(color, PorterDuff.Mode.MULTIPLY));
((CombinedDrawable) object).getIcon().setColorFilter(new PorterDuffColorFilter(color, PorterDuff.Mode.SRC_IN));
}
} else if (object instanceof StateListDrawable || Build.VERSION.SDK_INT >= 21 && object instanceof RippleDrawable) {
Theme.setSelectorDrawableColor((Drawable) object, color, (changeFlags & FLAG_DRAWABLESELECTEDSTATE) != 0);
} else if (object instanceof GradientDrawable) {
((GradientDrawable) object).setColor(color);
} else {
((Drawable) object).setColorFilter(new PorterDuffColorFilter(color, PorterDuff.Mode.MULTIPLY));
((Drawable) object).setColorFilter(new PorterDuffColorFilter(color, PorterDuff.Mode.SRC_IN));
}
} else if (object instanceof CheckBox) {
if ((changeFlags & FLAG_CHECKBOX) != 0) {

View File

@ -370,9 +370,9 @@ public class ContactsAdapter extends RecyclerListView.SectionsAdapter {
if (section == 0) {
if (needPhonebook) {
if (position == 0) {
textCell.setTextAndIcon(LocaleController.getString("InviteFriends", R.string.InviteFriends), R.drawable.menu_invite, false);
textCell.setTextAndIcon(LocaleController.getString("InviteFriends", R.string.InviteFriends), R.drawable.baseline_person_add_24, false);
} else if (position == 1) {
textCell.setTextAndIcon(LocaleController.getString("AddPeopleNearby", R.string.AddPeopleNearby), R.drawable.menu_location, false);
textCell.setTextAndIcon(LocaleController.getString("AddPeopleNearby", R.string.AddPeopleNearby), R.drawable.baseline_location_on_24, false);
}
} else if (isAdmin) {
if (isChannel) {
@ -382,11 +382,11 @@ public class ContactsAdapter extends RecyclerListView.SectionsAdapter {
}
} else {
if (position == 0) {
textCell.setTextAndIcon(LocaleController.getString("NewGroup", R.string.NewGroup), R.drawable.menu_groups, false);
textCell.setTextAndIcon(LocaleController.getString("NewGroup", R.string.NewGroup), R.drawable.baseline_group_24, false);
} else if (position == 1) {
textCell.setTextAndIcon(LocaleController.getString("NewSecretChat", R.string.NewSecretChat), R.drawable.menu_secret, false);
textCell.setTextAndIcon(LocaleController.getString("NewSecretChat", R.string.NewSecretChat), R.drawable.baseline_security_24, false);
} else if (position == 2) {
textCell.setTextAndIcon(LocaleController.getString("NewChannel", R.string.NewChannel), R.drawable.menu_broadcast, false);
textCell.setTextAndIcon(LocaleController.getString("NewChannel", R.string.NewChannel), R.drawable.baseline_bullhorn_24, false);
}
}
} else {

View File

@ -378,7 +378,7 @@ public class StickersSearchAdapter extends RecyclerListView.SelectionAdapter {
emptyImageView = new ImageView(context);
emptyImageView.setScaleType(ImageView.ScaleType.CENTER);
emptyImageView.setImageResource(R.drawable.stickers_empty);
emptyImageView.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_chat_emojiPanelEmptyText), PorterDuff.Mode.MULTIPLY));
emptyImageView.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_chat_emojiPanelEmptyText), PorterDuff.Mode.SRC_IN));
layout.addView(emptyImageView, LayoutHelper.createLinear(LayoutHelper.WRAP_CONTENT, LayoutHelper.WRAP_CONTENT));
layout.addView(new Space(context), LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, 15));

View File

@ -504,19 +504,19 @@ public class CancelAccountDeletionActivity extends BaseFragment {
if (currentType == 1) {
blackImageView = new ImageView(context);
blackImageView.setImageResource(R.drawable.sms_devices);
blackImageView.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_windowBackgroundWhiteBlackText), PorterDuff.Mode.MULTIPLY));
blackImageView.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_windowBackgroundWhiteBlackText), PorterDuff.Mode.SRC_IN));
frameLayout.addView(blackImageView, LayoutHelper.createFrame(LayoutHelper.WRAP_CONTENT, LayoutHelper.WRAP_CONTENT, Gravity.LEFT | Gravity.TOP, 0, 0, 0, 0));
blueImageView = new ImageView(context);
blueImageView.setImageResource(R.drawable.sms_bubble);
blueImageView.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_chats_actionBackground), PorterDuff.Mode.MULTIPLY));
blueImageView.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_chats_actionBackground), PorterDuff.Mode.SRC_IN));
frameLayout.addView(blueImageView, LayoutHelper.createFrame(LayoutHelper.WRAP_CONTENT, LayoutHelper.WRAP_CONTENT, Gravity.LEFT | Gravity.TOP, 0, 0, 0, 0));
titleTextView.setText(LocaleController.getString("SentAppCodeTitle", R.string.SentAppCodeTitle));
} else {
blueImageView = new ImageView(context);
blueImageView.setImageResource(R.drawable.sms_code);
blueImageView.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_chats_actionBackground), PorterDuff.Mode.MULTIPLY));
blueImageView.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_chats_actionBackground), PorterDuff.Mode.SRC_IN));
frameLayout.addView(blueImageView, LayoutHelper.createFrame(LayoutHelper.WRAP_CONTENT, LayoutHelper.WRAP_CONTENT, Gravity.LEFT | Gravity.TOP, 0, 0, 0, 0));
titleTextView.setText(LocaleController.getString("SentSmsCodeTitle", R.string.SentSmsCodeTitle));
@ -720,7 +720,7 @@ public class CancelAccountDeletionActivity extends BaseFragment {
codeField[a].setCursorWidth(1.5f);
Drawable pressedDrawable = getResources().getDrawable(R.drawable.search_dark_activated).mutate();
pressedDrawable.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_windowBackgroundWhiteInputFieldActivated), PorterDuff.Mode.MULTIPLY));
pressedDrawable.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_windowBackgroundWhiteInputFieldActivated), PorterDuff.Mode.SRC_IN));
codeField[a].setBackgroundDrawable(pressedDrawable);
codeField[a].setImeOptions(EditorInfo.IME_ACTION_NEXT | EditorInfo.IME_FLAG_NO_EXTRACT_UI);

View File

@ -61,9 +61,9 @@ public class AccountSelectCell extends FrameLayout {
addView(textView, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.MATCH_PARENT, Gravity.LEFT | Gravity.TOP, 61, 0, 56, 0));
checkImageView = new ImageView(context);
checkImageView.setImageResource(R.drawable.account_check);
checkImageView.setImageResource(R.drawable.baseline_check_24);
checkImageView.setScaleType(ImageView.ScaleType.CENTER);
checkImageView.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_chats_menuItemCheck), PorterDuff.Mode.MULTIPLY));
checkImageView.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_chats_menuItemCheck), PorterDuff.Mode.SRC_IN));
addView(checkImageView, LayoutHelper.createFrame(40, LayoutHelper.MATCH_PARENT, Gravity.RIGHT | Gravity.TOP, 0, 0, 6, 0));
}

View File

@ -69,7 +69,7 @@ public class AdminedChannelCell extends FrameLayout {
deleteButton.setScaleType(ImageView.ScaleType.CENTER);
deleteButton.setImageResource(R.drawable.msg_panel_clear);
deleteButton.setOnClickListener(onClickListener);
deleteButton.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_windowBackgroundWhiteGrayText), PorterDuff.Mode.MULTIPLY));
deleteButton.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_windowBackgroundWhiteGrayText), PorterDuff.Mode.SRC_IN));
addView(deleteButton, LayoutHelper.createFrame(48, 48, (LocaleController.isRTL ? Gravity.LEFT : Gravity.RIGHT) | Gravity.TOP, LocaleController.isRTL ? 7 : 0, 12, LocaleController.isRTL ? 0 : 7, 0));
}

View File

@ -27,7 +27,7 @@ public class ArchiveHintInnerCell extends FrameLayout {
super(context);
imageView = new ImageView(context);
imageView.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_chats_nameMessage_threeLines), PorterDuff.Mode.MULTIPLY));
imageView.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_chats_nameMessage_threeLines), PorterDuff.Mode.SRC_IN));
headerTextView = new TextView(context);
headerTextView.setTextColor(Theme.getColor(Theme.key_chats_nameMessage_threeLines));
@ -48,7 +48,7 @@ public class ArchiveHintInnerCell extends FrameLayout {
imageView2 = new ImageView(context);
imageView2.setImageResource(R.drawable.chats_archive_arrow);
imageView2.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_chats_unreadCounter), PorterDuff.Mode.MULTIPLY));
imageView2.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_chats_unreadCounter), PorterDuff.Mode.SRC_IN));
addView(imageView2, LayoutHelper.createFrame(LayoutHelper.WRAP_CONTENT, LayoutHelper.WRAP_CONTENT, Gravity.TOP | Gravity.CENTER_HORIZONTAL, 0, 20, 8, 0));
headerTextView.setText(LocaleController.getString("ArchiveHintHeader1", R.string.ArchiveHintHeader1));

View File

@ -66,8 +66,8 @@ public class BrightnessControlCell extends FrameLayout {
@Override
protected void onAttachedToWindow() {
super.onAttachedToWindow();
leftImageView.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_windowBackgroundWhiteGrayIcon), PorterDuff.Mode.MULTIPLY));
rightImageView.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_windowBackgroundWhiteGrayIcon), PorterDuff.Mode.MULTIPLY));
leftImageView.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_windowBackgroundWhiteGrayIcon), PorterDuff.Mode.SRC_IN));
rightImageView.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_windowBackgroundWhiteGrayIcon), PorterDuff.Mode.SRC_IN));
}
protected void didChangedValue(float value) {

View File

@ -428,7 +428,7 @@ public class ChatActionCell extends BaseCell {
int color = Theme.getColor(overrideBackground);
if (color != overrideColor) {
overrideColor = color;
overrideColorFilter = new PorterDuffColorFilter(overrideColor, PorterDuff.Mode.MULTIPLY);
overrideColorFilter = new PorterDuffColorFilter(overrideColor, PorterDuff.Mode.SRC_IN);
}
for (int a = 0; a < 4; a++) {
Theme.chat_cornerOuter[a].setColorFilter(overrideColorFilter);

View File

@ -33,12 +33,12 @@ public class ChatUnreadCell extends FrameLayout {
backgroundLayout = new FrameLayout(context);
backgroundLayout.setBackgroundResource(R.drawable.newmsg_divider);
backgroundLayout.getBackground().setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_chat_unreadMessagesStartBackground), PorterDuff.Mode.MULTIPLY));
backgroundLayout.getBackground().setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_chat_unreadMessagesStartBackground), PorterDuff.Mode.SRC_IN));
addView(backgroundLayout, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, 27, Gravity.LEFT | Gravity.TOP, 0, 7, 0, 0));
imageView = new ImageView(context);
imageView.setImageResource(R.drawable.ic_ab_new);
imageView.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_chat_unreadMessagesStartArrowIcon), PorterDuff.Mode.MULTIPLY));
imageView.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_chat_unreadMessagesStartArrowIcon), PorterDuff.Mode.SRC_IN));
imageView.setPadding(0, AndroidUtilities.dp(2), 0, 0);
backgroundLayout.addView(imageView, LayoutHelper.createFrame(LayoutHelper.WRAP_CONTENT, LayoutHelper.WRAP_CONTENT, Gravity.RIGHT | Gravity.CENTER_VERTICAL, 0, 0, 10, 0));

View File

@ -58,9 +58,7 @@ public class DrawerActionCell extends FrameLayout {
try {
textView.setText(text);
Drawable drawable = getResources().getDrawable(resId).mutate();
if (drawable != null) {
drawable.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_chats_menuItemIcon), PorterDuff.Mode.MULTIPLY));
}
drawable.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_chats_menuItemIcon), PorterDuff.Mode.SRC_IN));
textView.setCompoundDrawablesWithIntrinsicBounds(drawable, null, null, null);
} catch (Throwable e) {
FileLog.e(e);

View File

@ -59,7 +59,7 @@ public class EmojiReplacementCell extends FrameLayout {
Drawable background = getBackground();
if (background != null) {
background.setAlpha(230);
background.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_chat_stickersHintPanel), PorterDuff.Mode.MULTIPLY));
background.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_chat_stickersHintPanel), PorterDuff.Mode.SRC_IN));
}
}

View File

@ -94,7 +94,7 @@ public class FeaturedStickerSetCell extends FrameLayout {
addView(addButton, LayoutHelper.createFrameRelatively(LayoutHelper.WRAP_CONTENT, 28, Gravity.TOP | Gravity.END, 0, 18, 14, 0));
checkImage = new ImageView(context);
checkImage.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_featuredStickers_addedIcon), PorterDuff.Mode.MULTIPLY));
checkImage.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_featuredStickers_addedIcon), PorterDuff.Mode.SRC_IN));
checkImage.setImageResource(R.drawable.sticker_added);
addView(checkImage, LayoutHelper.createFrame(19, 14));
}

View File

@ -34,7 +34,7 @@ public class GroupCreateSectionCell extends FrameLayout {
setBackgroundColor(Theme.getColor(Theme.key_graySection));
drawable = getResources().getDrawable(R.drawable.shadowdown);
drawable.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_groupcreate_sectionShadow), PorterDuff.Mode.MULTIPLY));
drawable.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_groupcreate_sectionShadow), PorterDuff.Mode.SRC_IN));
textView = new TextView(getContext());
textView.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 14);

View File

@ -36,7 +36,7 @@ public class InviteTextCell extends FrameLayout {
imageView = new ImageView(context);
imageView.setScaleType(ImageView.ScaleType.CENTER);
imageView.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_windowBackgroundWhiteGrayIcon), PorterDuff.Mode.MULTIPLY));
imageView.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_windowBackgroundWhiteGrayIcon), PorterDuff.Mode.SRC_IN));
addView(imageView);
}

View File

@ -61,7 +61,7 @@ public class LanguageCell extends FrameLayout {
addView(textView2, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.MATCH_PARENT, (LocaleController.isRTL ? Gravity.RIGHT : Gravity.LEFT) | Gravity.TOP, LocaleController.isRTL ? 23 + 48 : 23, (isDialog ? 25 : 29), LocaleController.isRTL ? 23 : 23 + 48, 0));
checkImage = new ImageView(context);
checkImage.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_featuredStickers_addedIcon), PorterDuff.Mode.MULTIPLY));
checkImage.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_featuredStickers_addedIcon), PorterDuff.Mode.SRC_IN));
checkImage.setImageResource(R.drawable.sticker_added);
addView(checkImage, LayoutHelper.createFrame(19, 14, (LocaleController.isRTL ? Gravity.LEFT : Gravity.RIGHT) | Gravity.CENTER_VERTICAL, 23, 0, 23, 0));
}

View File

@ -38,7 +38,7 @@ public class LocationLoadingCell extends FrameLayout {
imageView = new ImageView(context);
imageView.setImageResource(R.drawable.location_empty);
imageView.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_dialogEmptyImage), PorterDuff.Mode.MULTIPLY));
imageView.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_dialogEmptyImage), PorterDuff.Mode.SRC_IN));
addView(imageView, LayoutHelper.createFrame(LayoutHelper.WRAP_CONTENT, LayoutHelper.WRAP_CONTENT, Gravity.CENTER, 0, 0, 0, 24));
textView = new TextView(context);

View File

@ -43,7 +43,7 @@ public class LocationPoweredCell extends FrameLayout {
imageView = new ImageView(context);
imageView.setImageResource(R.drawable.foursquare);
imageView.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_windowBackgroundWhiteGrayText3), PorterDuff.Mode.MULTIPLY));
imageView.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_windowBackgroundWhiteGrayText3), PorterDuff.Mode.SRC_IN));
imageView.setPadding(0, AndroidUtilities.dp(2), 0, 0);
linearLayout.addView(imageView, LayoutHelper.createLinear(35, LayoutHelper.WRAP_CONTENT));

View File

@ -45,7 +45,7 @@ public class ManageChatTextCell extends FrameLayout {
imageView = new ImageView(context);
imageView.setScaleType(ImageView.ScaleType.CENTER);
imageView.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_windowBackgroundWhiteGrayIcon), PorterDuff.Mode.MULTIPLY));
imageView.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_windowBackgroundWhiteGrayIcon), PorterDuff.Mode.SRC_IN));
addView(imageView);
}
@ -94,7 +94,7 @@ public class ManageChatTextCell extends FrameLayout {
public void setColors(String icon, String text) {
textView.setTextColor(Theme.getColor(text));
textView.setTag(text);
imageView.setColorFilter(new PorterDuffColorFilter(Theme.getColor(icon), PorterDuff.Mode.MULTIPLY));
imageView.setColorFilter(new PorterDuffColorFilter(Theme.getColor(icon), PorterDuff.Mode.SRC_IN));
imageView.setTag(icon);
}

View File

@ -97,7 +97,7 @@ public class ManageChatUserCell extends FrameLayout {
optionsButton.setFocusable(false);
optionsButton.setBackgroundDrawable(Theme.createSelectorDrawable(Theme.getColor(Theme.key_stickers_menuSelector)));
optionsButton.setImageResource(R.drawable.ic_ab_other);
optionsButton.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_stickers_menu), PorterDuff.Mode.MULTIPLY));
optionsButton.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_stickers_menu), PorterDuff.Mode.SRC_IN));
optionsButton.setScaleType(ImageView.ScaleType.CENTER);
addView(optionsButton, LayoutHelper.createFrame(52, 64, (LocaleController.isRTL ? Gravity.LEFT : Gravity.RIGHT) | Gravity.TOP));
optionsButton.setOnClickListener(v -> delegate.onOptionsButtonCheck(ManageChatUserCell.this, true));

View File

@ -52,7 +52,7 @@ public class NotificationsCheckCell extends FrameLayout {
moveImageView.setFocusable(false);
moveImageView.setScaleType(ImageView.ScaleType.CENTER);
moveImageView.setImageResource(R.drawable.poll_reorder);
moveImageView.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_windowBackgroundWhiteGrayIcon), PorterDuff.Mode.MULTIPLY));
moveImageView.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_windowBackgroundWhiteGrayIcon), PorterDuff.Mode.SRC_IN));
addView(moveImageView, LayoutHelper.createFrame(48, 48, (LocaleController.isRTL ? Gravity.RIGHT : Gravity.LEFT) | Gravity.CENTER_VERTICAL, 6, 0, 6, 0));
}

View File

@ -71,7 +71,7 @@ public class PhotoAttachCameraCell extends FrameLayout {
@Override
protected void onAttachedToWindow() {
super.onAttachedToWindow();
imageView.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_dialogCameraIcon), PorterDuff.Mode.MULTIPLY));
imageView.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_dialogCameraIcon), PorterDuff.Mode.SRC_IN));
}
public void updateBitmap() {

View File

@ -35,12 +35,12 @@ public class PhotoAttachPermissionCell extends FrameLayout {
imageView = new ImageView(context);
imageView.setScaleType(ImageView.ScaleType.CENTER);
imageView.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_chat_attachPermissionImage), PorterDuff.Mode.MULTIPLY));
imageView.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_chat_attachPermissionImage), PorterDuff.Mode.SRC_IN));
addView(imageView, LayoutHelper.createFrame(44, 44, Gravity.CENTER, 5, 0, 0, 27));
imageView2 = new ImageView(context);
imageView2.setScaleType(ImageView.ScaleType.CENTER);
imageView2.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_chat_attachPermissionMark), PorterDuff.Mode.MULTIPLY));
imageView2.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_chat_attachPermissionMark), PorterDuff.Mode.SRC_IN));
addView(imageView2, LayoutHelper.createFrame(44, 44, Gravity.CENTER, 5, 0, 0, 27));
textView = new TextView(context);

View File

@ -146,7 +146,7 @@ public class PollEditTextCell extends FrameLayout {
moveImageView.setFocusable(false);
moveImageView.setScaleType(ImageView.ScaleType.CENTER);
moveImageView.setImageResource(R.drawable.poll_reorder);
moveImageView.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_windowBackgroundWhiteGrayIcon), PorterDuff.Mode.MULTIPLY));
moveImageView.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_windowBackgroundWhiteGrayIcon), PorterDuff.Mode.SRC_IN));
addView(moveImageView, LayoutHelper.createFrame(48, 48, (LocaleController.isRTL ? Gravity.RIGHT : Gravity.LEFT) | Gravity.TOP, 6, 2, 6, 0));
deleteImageView = new ImageView(context);
@ -155,7 +155,7 @@ public class PollEditTextCell extends FrameLayout {
deleteImageView.setBackgroundDrawable(Theme.createSelectorDrawable(Theme.getColor(Theme.key_stickers_menuSelector)));
deleteImageView.setImageResource(R.drawable.poll_remove);
deleteImageView.setOnClickListener(onDelete);
deleteImageView.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_windowBackgroundWhiteGrayIcon), PorterDuff.Mode.MULTIPLY));
deleteImageView.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_windowBackgroundWhiteGrayIcon), PorterDuff.Mode.SRC_IN));
deleteImageView.setContentDescription(LocaleController.getString("Delete", R.string.Delete));
addView(deleteImageView, LayoutHelper.createFrame(48, 50, (LocaleController.isRTL ? Gravity.LEFT : Gravity.RIGHT) | Gravity.TOP, LocaleController.isRTL ? 3 : 0, 0, LocaleController.isRTL ? 0 : 3, 0));

View File

@ -58,7 +58,7 @@ public class SendLocationCell extends FrameLayout {
if (live) {
rect = new RectF();
Drawable drawable = new ShareLocationDrawable(context, 4);
drawable.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_location_sendLiveLocationIcon), PorterDuff.Mode.MULTIPLY));
drawable.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_location_sendLiveLocationIcon), PorterDuff.Mode.SRC_IN));
CombinedDrawable combinedDrawable = new CombinedDrawable(circle, drawable);
combinedDrawable.setCustomSize(AndroidUtilities.dp(42), AndroidUtilities.dp(42));
imageView.setBackgroundDrawable(combinedDrawable);
@ -66,7 +66,7 @@ public class SendLocationCell extends FrameLayout {
setWillNotDraw(false);
} else {
Drawable drawable = getResources().getDrawable(R.drawable.pin);
drawable.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_location_sendLocationIcon), PorterDuff.Mode.MULTIPLY));
drawable.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_location_sendLocationIcon), PorterDuff.Mode.SRC_IN));
CombinedDrawable combinedDrawable = new CombinedDrawable(circle, drawable);
combinedDrawable.setCustomSize(AndroidUtilities.dp(42), AndroidUtilities.dp(42));
combinedDrawable.setIconSize(AndroidUtilities.dp(24), AndroidUtilities.dp(24));

View File

@ -95,7 +95,7 @@ public class SettingsSearchCell extends FrameLayout {
imageView = new ImageView(context);
imageView.setScaleType(ImageView.ScaleType.CENTER);
imageView.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_windowBackgroundWhiteGrayIcon), PorterDuff.Mode.MULTIPLY));
imageView.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_windowBackgroundWhiteGrayIcon), PorterDuff.Mode.SRC_IN));
addView(imageView, LayoutHelper.createFrame(48, 48, LocaleController.isRTL ? Gravity.RIGHT : Gravity.LEFT, 10, 8, 10, 0));
}
@ -117,7 +117,7 @@ public class SettingsSearchCell extends FrameLayout {
builder.append(" > ");
Drawable drawable = getContext().getResources().getDrawable(R.drawable.settings_arrow).mutate();
drawable.setBounds(0, 0, drawable.getIntrinsicWidth(), drawable.getIntrinsicHeight());
drawable.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_windowBackgroundWhiteGrayText2), PorterDuff.Mode.MULTIPLY));
drawable.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_windowBackgroundWhiteGrayText2), PorterDuff.Mode.SRC_IN));
builder.setSpan(new VerticalImageSpan(drawable), builder.length() - 2, builder.length() - 1, SpannableStringBuilder.SPAN_EXCLUSIVE_EXCLUSIVE);
}
builder.append(value[a]);
@ -154,7 +154,7 @@ public class SettingsSearchCell extends FrameLayout {
builder.append(" > ");
Drawable drawable = getContext().getResources().getDrawable(R.drawable.settings_arrow).mutate();
drawable.setBounds(0, 0, drawable.getIntrinsicWidth(), drawable.getIntrinsicHeight());
drawable.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_windowBackgroundWhiteBlackText), PorterDuff.Mode.MULTIPLY));
drawable.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_windowBackgroundWhiteBlackText), PorterDuff.Mode.SRC_IN));
builder.setSpan(new VerticalImageSpan(drawable), builder.length() - 2, builder.length() - 1, SpannableStringBuilder.SPAN_EXCLUSIVE_EXCLUSIVE);
}
builder.append(value[a]);
@ -171,7 +171,7 @@ public class SettingsSearchCell extends FrameLayout {
builder.append(" > ");
Drawable drawable = getContext().getResources().getDrawable(R.drawable.settings_arrow).mutate();
drawable.setBounds(0, 0, drawable.getIntrinsicWidth(), drawable.getIntrinsicHeight());
drawable.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_windowBackgroundWhiteGrayText2), PorterDuff.Mode.MULTIPLY));
drawable.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_windowBackgroundWhiteGrayText2), PorterDuff.Mode.SRC_IN));
builder.setSpan(new VerticalImageSpan(drawable), builder.length() - 2, builder.length() - 1, SpannableStringBuilder.SPAN_EXCLUSIVE_EXCLUSIVE);
}
builder.append(value[a]);

View File

@ -136,7 +136,7 @@ public class SharedDocumentCell extends FrameLayout implements DownloadControlle
statusImageView = new ImageView(context);
statusImageView.setVisibility(INVISIBLE);
statusImageView.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_sharedMedia_startStopLoadIcon), PorterDuff.Mode.MULTIPLY));
statusImageView.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_sharedMedia_startStopLoadIcon), PorterDuff.Mode.SRC_IN));
if (isPickerCell) {
addView(statusImageView, LayoutHelper.createFrame(LayoutHelper.WRAP_CONTENT, LayoutHelper.WRAP_CONTENT, (LocaleController.isRTL ? Gravity.RIGHT : Gravity.LEFT) | Gravity.TOP, LocaleController.isRTL ? 8 : 72, 39, LocaleController.isRTL ? 72 : 8, 0));
} else {

View File

@ -160,7 +160,7 @@ public class SharingLiveLocationCell extends FrameLayout {
name = messageObject.messageOwner.media.title;
Drawable drawable = getResources().getDrawable(R.drawable.pin);
drawable.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_location_sendLocationIcon), PorterDuff.Mode.MULTIPLY));
drawable.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_location_sendLocationIcon), PorterDuff.Mode.SRC_IN));
int color = Theme.getColor(Theme.key_location_placeLocationBackground);
Drawable circle = Theme.createSimpleSelectorCircleDrawable(AndroidUtilities.dp(42), color, color);
CombinedDrawable combinedDrawable = new CombinedDrawable(circle, drawable);

View File

@ -105,7 +105,7 @@ public class StickerCell extends FrameLayout {
Drawable background = getBackground();
if (background != null) {
background.setAlpha(230);
background.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_chat_stickersHintPanel), PorterDuff.Mode.MULTIPLY));
background.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_chat_stickersHintPanel), PorterDuff.Mode.SRC_IN));
}
}

View File

@ -95,7 +95,7 @@ public class StickerSetCell extends FrameLayout {
optionsButton.setScaleType(ImageView.ScaleType.CENTER);
optionsButton.setBackgroundDrawable(Theme.createSelectorDrawable(Theme.getColor(Theme.key_stickers_menuSelector)));
if (option == 1) {
optionsButton.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_stickers_menu), PorterDuff.Mode.MULTIPLY));
optionsButton.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_stickers_menu), PorterDuff.Mode.SRC_IN));
optionsButton.setImageResource(R.drawable.msg_actions);
addView(optionsButton, LayoutHelper.createFrame(40, 40, (LocaleController.isRTL ? Gravity.LEFT : Gravity.RIGHT) | Gravity.CENTER_VERTICAL));
@ -104,7 +104,7 @@ public class StickerSetCell extends FrameLayout {
reorderButton.setVisibility(GONE);
reorderButton.setScaleType(ImageView.ScaleType.CENTER);
reorderButton.setImageResource(R.drawable.list_reorder);
reorderButton.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_stickers_menu), PorterDuff.Mode.MULTIPLY));
reorderButton.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_stickers_menu), PorterDuff.Mode.SRC_IN));
addView(reorderButton, LayoutHelper.createFrameRelatively(58, 58, Gravity.END));
checkBox = new CheckBox2(context, 21);
@ -113,7 +113,7 @@ public class StickerSetCell extends FrameLayout {
checkBox.setDrawBackgroundAsArc(3);
addView(checkBox, LayoutHelper.createFrameRelatively(24, 24, Gravity.START, 34, 30, 0, 0));
} else if (option == 3) {
optionsButton.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_featuredStickers_addedIcon), PorterDuff.Mode.MULTIPLY));
optionsButton.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_featuredStickers_addedIcon), PorterDuff.Mode.SRC_IN));
optionsButton.setImageResource(R.drawable.sticker_added);
addView(optionsButton, LayoutHelper.createFrame(40, 40, (LocaleController.isRTL ? Gravity.LEFT : Gravity.RIGHT) | Gravity.TOP, (LocaleController.isRTL ? 10 : 0), 9, (LocaleController.isRTL ? 0 : 10), 0));
}

View File

@ -86,7 +86,7 @@ public class StickerSetNameCell extends FrameLayout {
buttonView = new ImageView(context);
buttonView.setScaleType(ImageView.ScaleType.CENTER);
buttonView.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_chat_emojiPanelStickerSetNameIcon), PorterDuff.Mode.MULTIPLY));
buttonView.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_chat_emojiPanelStickerSetNameIcon), PorterDuff.Mode.SRC_IN));
if (supportRtl) {
lp = LayoutHelper.createFrameRelatively(24, 24, Gravity.TOP | Gravity.END, 0, 0, 16, 0);
} else {

View File

@ -67,7 +67,7 @@ public class TextSettingsCell extends FrameLayout {
valueImageView = new ImageView(context);
valueImageView.setScaleType(ImageView.ScaleType.CENTER);
valueImageView.setVisibility(INVISIBLE);
valueImageView.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_windowBackgroundWhiteGrayIcon), PorterDuff.Mode.MULTIPLY));
valueImageView.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_windowBackgroundWhiteGrayIcon), PorterDuff.Mode.SRC_IN));
addView(valueImageView, LayoutHelper.createFrame(LayoutHelper.WRAP_CONTENT, LayoutHelper.WRAP_CONTENT, (LocaleController.isRTL ? Gravity.LEFT : Gravity.RIGHT) | Gravity.CENTER_VERTICAL, padding, 0, padding, 0));
}

View File

@ -68,7 +68,7 @@ public class ThemeCell extends FrameLayout {
addView(textView, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.MATCH_PARENT, (LocaleController.isRTL ? Gravity.RIGHT : Gravity.LEFT) | Gravity.TOP, LocaleController.isRTL ? 53 + 48 + 4 : 60, 0, LocaleController.isRTL ? 60 : 53 + 48 + 4, 0));
checkImage = new ImageView(context);
checkImage.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_featuredStickers_addedIcon), PorterDuff.Mode.MULTIPLY));
checkImage.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_featuredStickers_addedIcon), PorterDuff.Mode.SRC_IN));
checkImage.setImageResource(R.drawable.sticker_added);
if (!isNightTheme) {
@ -78,7 +78,7 @@ public class ThemeCell extends FrameLayout {
optionsButton.setFocusable(false);
optionsButton.setBackgroundDrawable(Theme.createSelectorDrawable(Theme.getColor(Theme.key_stickers_menuSelector)));
optionsButton.setImageResource(R.drawable.ic_ab_other);
optionsButton.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_stickers_menu), PorterDuff.Mode.MULTIPLY));
optionsButton.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_stickers_menu), PorterDuff.Mode.SRC_IN));
optionsButton.setScaleType(ImageView.ScaleType.CENTER);
optionsButton.setContentDescription(LocaleController.getString("AccDescrMoreOptions", R.string.AccDescrMoreOptions));
addView(optionsButton, LayoutHelper.createFrame(48, 48, (LocaleController.isRTL ? Gravity.LEFT : Gravity.RIGHT) | Gravity.TOP));
@ -90,7 +90,7 @@ public class ThemeCell extends FrameLayout {
@Override
protected void onAttachedToWindow() {
super.onAttachedToWindow();
checkImage.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_featuredStickers_addedIcon), PorterDuff.Mode.MULTIPLY));
checkImage.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_featuredStickers_addedIcon), PorterDuff.Mode.SRC_IN));
textView.setTextColor(Theme.getColor(Theme.key_windowBackgroundWhiteBlackText));
}

View File

@ -47,7 +47,7 @@ public class ThemeTypeCell extends FrameLayout {
addView(textView, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.MATCH_PARENT, (LocaleController.isRTL ? Gravity.RIGHT : Gravity.LEFT) | Gravity.TOP, LocaleController.isRTL ? 23 + 48 : 21, 0, LocaleController.isRTL ? 21 : 23, 0));
checkImage = new ImageView(context);
checkImage.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_featuredStickers_addedIcon), PorterDuff.Mode.MULTIPLY));
checkImage.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_featuredStickers_addedIcon), PorterDuff.Mode.SRC_IN));
checkImage.setImageResource(R.drawable.sticker_added);
addView(checkImage, LayoutHelper.createFrame(19, 14, (LocaleController.isRTL ? Gravity.LEFT : Gravity.RIGHT) | Gravity.CENTER_VERTICAL, 23, 0, 23, 0));
}

View File

@ -346,8 +346,8 @@ public class ThemesHorizontalListCell extends RecyclerListView implements Notifi
}
private void applyTheme() {
inDrawable.setColorFilter(new PorterDuffColorFilter(themeInfo.getPreviewInColor(), PorterDuff.Mode.MULTIPLY));
outDrawable.setColorFilter(new PorterDuffColorFilter(themeInfo.getPreviewOutColor(), PorterDuff.Mode.MULTIPLY));
inDrawable.setColorFilter(new PorterDuffColorFilter(themeInfo.getPreviewInColor(), PorterDuff.Mode.SRC_IN));
outDrawable.setColorFilter(new PorterDuffColorFilter(themeInfo.getPreviewOutColor(), PorterDuff.Mode.SRC_IN));
if (themeInfo.pathToFile == null) {
updateColors(false);
optionsDrawable = null;
@ -410,7 +410,7 @@ public class ThemesHorizontalListCell extends RecyclerListView implements Notifi
if (themeInfo.info.document != null) {
themeInfo.themeLoaded = false;
placeholderAlpha = 1.0f;
loadingDrawable = getResources().getDrawable(R.drawable.msg_theme).mutate();
loadingDrawable = getResources().getDrawable(R.drawable.baseline_palette_24).mutate();
Theme.setDrawableColor(loadingDrawable, loadingColor = Theme.getColor(Theme.key_windowBackgroundWhiteGrayText7));
if (!fileExists) {
String name = FileLoader.getAttachFileName(themeInfo.info.document);
@ -527,8 +527,8 @@ public class ThemesHorizontalListCell extends RecyclerListView implements Notifi
paint.setColor(blend(oldBackColor, backColor));
if (accentColorChanged) {
inDrawable.setColorFilter(new PorterDuffColorFilter(blend(oldInColor, inColor), PorterDuff.Mode.MULTIPLY));
outDrawable.setColorFilter(new PorterDuffColorFilter(blend(oldOutColor, outColor), PorterDuff.Mode.MULTIPLY));
inDrawable.setColorFilter(new PorterDuffColorFilter(blend(oldInColor, inColor), PorterDuff.Mode.SRC_IN));
outDrawable.setColorFilter(new PorterDuffColorFilter(blend(oldOutColor, outColor), PorterDuff.Mode.SRC_IN));
accentColorChanged = false;
}

View File

@ -31,7 +31,7 @@ public class TooManyCommunitiesHintCell extends FrameLayout {
super(context);
imageView = new ImageView(context);
imageView.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_chats_nameMessage_threeLines), PorterDuff.Mode.MULTIPLY));
imageView.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_chats_nameMessage_threeLines), PorterDuff.Mode.SRC_IN));
headerTextView = new TextView(context);
headerTextView.setTextColor(Theme.getColor(Theme.key_chats_nameMessage_threeLines));

View File

@ -117,7 +117,7 @@ public class UserCell extends FrameLayout {
imageView = new ImageView(context);
imageView.setScaleType(ImageView.ScaleType.CENTER);
imageView.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_windowBackgroundWhiteGrayIcon), PorterDuff.Mode.MULTIPLY));
imageView.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_windowBackgroundWhiteGrayIcon), PorterDuff.Mode.SRC_IN));
imageView.setVisibility(GONE);
addView(imageView, LayoutHelper.createFrame(LayoutParams.WRAP_CONTENT, LayoutHelper.WRAP_CONTENT, (LocaleController.isRTL ? Gravity.RIGHT : Gravity.LEFT) | Gravity.CENTER_VERTICAL, LocaleController.isRTL ? 0 : 16, 0, LocaleController.isRTL ? 16 : 0, 0));

View File

@ -87,7 +87,7 @@ public class UserCell2 extends FrameLayout {
imageView = new ImageView(context);
imageView.setScaleType(ImageView.ScaleType.CENTER);
imageView.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_windowBackgroundWhiteGrayIcon), PorterDuff.Mode.MULTIPLY));
imageView.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_windowBackgroundWhiteGrayIcon), PorterDuff.Mode.SRC_IN));
imageView.setVisibility(GONE);
addView(imageView, LayoutHelper.createFrame(LayoutParams.WRAP_CONTENT, LayoutHelper.WRAP_CONTENT, (LocaleController.isRTL ? Gravity.RIGHT : Gravity.LEFT) | Gravity.CENTER_VERTICAL, LocaleController.isRTL ? 0 : 16, 0, LocaleController.isRTL ? 16 : 0, 0));

View File

@ -890,19 +890,19 @@ public class ChangePhoneActivity extends BaseFragment {
if (currentType == 1) {
blackImageView = new ImageView(context);
blackImageView.setImageResource(R.drawable.sms_devices);
blackImageView.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_windowBackgroundWhiteBlackText), PorterDuff.Mode.MULTIPLY));
blackImageView.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_windowBackgroundWhiteBlackText), PorterDuff.Mode.SRC_IN));
frameLayout.addView(blackImageView, LayoutHelper.createFrame(LayoutHelper.WRAP_CONTENT, LayoutHelper.WRAP_CONTENT, Gravity.LEFT | Gravity.TOP, 0, 0, 0, 0));
blueImageView = new ImageView(context);
blueImageView.setImageResource(R.drawable.sms_bubble);
blueImageView.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_chats_actionBackground), PorterDuff.Mode.MULTIPLY));
blueImageView.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_chats_actionBackground), PorterDuff.Mode.SRC_IN));
frameLayout.addView(blueImageView, LayoutHelper.createFrame(LayoutHelper.WRAP_CONTENT, LayoutHelper.WRAP_CONTENT, Gravity.LEFT | Gravity.TOP, 0, 0, 0, 0));
titleTextView.setText(LocaleController.getString("SentAppCodeTitle", R.string.SentAppCodeTitle));
} else {
blueImageView = new ImageView(context);
blueImageView.setImageResource(R.drawable.sms_code);
blueImageView.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_chats_actionBackground), PorterDuff.Mode.MULTIPLY));
blueImageView.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_chats_actionBackground), PorterDuff.Mode.SRC_IN));
frameLayout.addView(blueImageView, LayoutHelper.createFrame(LayoutHelper.WRAP_CONTENT, LayoutHelper.WRAP_CONTENT, Gravity.LEFT | Gravity.TOP, 0, 0, 0, 0));
titleTextView.setText(LocaleController.getString("SentSmsCodeTitle", R.string.SentSmsCodeTitle));
@ -1112,7 +1112,7 @@ public class ChangePhoneActivity extends BaseFragment {
codeField[a].setCursorWidth(1.5f);
Drawable pressedDrawable = getResources().getDrawable(R.drawable.search_dark_activated).mutate();
pressedDrawable.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_windowBackgroundWhiteInputFieldActivated), PorterDuff.Mode.MULTIPLY));
pressedDrawable.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_windowBackgroundWhiteInputFieldActivated), PorterDuff.Mode.SRC_IN));
codeField[a].setBackgroundDrawable(pressedDrawable);
codeField[a].setImeOptions(EditorInfo.IME_ACTION_NEXT | EditorInfo.IME_FLAG_NO_EXTRACT_UI);

View File

@ -16,6 +16,8 @@ import android.content.Context;
import android.content.Intent;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.PorterDuff;
import android.graphics.PorterDuffColorFilter;
import android.os.Bundle;
import android.os.Vibrator;
import android.text.Editable;
@ -433,7 +435,8 @@ public class ChatEditActivity extends BaseFragment implements ImageUpdater.Image
}
};
avatarEditor.setScaleType(ImageView.ScaleType.CENTER);
avatarEditor.setImageResource(R.drawable.menu_camera_av);
avatarEditor.setImageResource(R.drawable.deproko_baseline_camera_26);
avatarEditor.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_actionBarDefaultIcon), PorterDuff.Mode.SRC_IN));
avatarEditor.setEnabled(false);
avatarEditor.setClickable(false);
frameLayout.addView(avatarEditor, LayoutHelper.createFrame(64, 64, Gravity.TOP | (LocaleController.isRTL ? Gravity.RIGHT : Gravity.LEFT), LocaleController.isRTL ? 0 : 16, 12, LocaleController.isRTL ? 16 : 0, 12));
@ -594,12 +597,12 @@ public class ChatEditActivity extends BaseFragment implements ImageUpdater.Image
buttons[a].setTag(a);
buttons[a].setBackgroundDrawable(Theme.getSelectorDrawable(false));
if (a == 0) {
buttons[a].setTextAndValue(LocaleController.getString("ChatHistoryVisible", R.string.ChatHistoryVisible), LocaleController.getString("ChatHistoryVisibleInfo", R.string.ChatHistoryVisibleInfo), true, !historyHidden);
buttons[a].setTextAndValueAndCheck(LocaleController.getString("ChatHistoryVisible", R.string.ChatHistoryVisible), LocaleController.getString("ChatHistoryVisibleInfo", R.string.ChatHistoryVisibleInfo), true, !historyHidden);
} else {
if (ChatObject.isChannel(currentChat)) {
buttons[a].setTextAndValue(LocaleController.getString("ChatHistoryHidden", R.string.ChatHistoryHidden), LocaleController.getString("ChatHistoryHiddenInfo", R.string.ChatHistoryHiddenInfo), false, historyHidden);
buttons[a].setTextAndValueAndCheck(LocaleController.getString("ChatHistoryHidden", R.string.ChatHistoryHidden), LocaleController.getString("ChatHistoryHiddenInfo", R.string.ChatHistoryHiddenInfo), false, historyHidden);
} else {
buttons[a].setTextAndValue(LocaleController.getString("ChatHistoryHidden", R.string.ChatHistoryHidden), LocaleController.getString("ChatHistoryHiddenInfo2", R.string.ChatHistoryHiddenInfo2), false, historyHidden);
buttons[a].setTextAndValueAndCheck(LocaleController.getString("ChatHistoryHidden", R.string.ChatHistoryHidden), LocaleController.getString("ChatHistoryHiddenInfo2", R.string.ChatHistoryHiddenInfo2), false, historyHidden);
}
}
linearLayoutInviteContainer.addView(buttons[a], LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT));
@ -681,7 +684,7 @@ public class ChatEditActivity extends BaseFragment implements ImageUpdater.Image
if (ChatObject.isChannel(currentChat) && ChatObject.hasAdminRights(currentChat)) {
logCell = new TextCell(context);
logCell.setTextAndIcon(LocaleController.getString("EventLog", R.string.EventLog), R.drawable.group_log, false);
logCell.setTextAndIcon(LocaleController.getString("EventLog", R.string.EventLog), R.drawable.baseline_content_paste_18, false);
logCell.setBackgroundDrawable(Theme.getSelectorDrawable(false));
logCell.setOnClickListener(v -> presentFragment(new ChannelAdminLogActivity(currentChat)));
}
@ -897,7 +900,7 @@ public class ChatEditActivity extends BaseFragment implements ImageUpdater.Image
int reqId = getConnectionsManager().sendRequest(req, (response, error) -> AndroidUtilities.runOnUIThread(() -> {
TLRPC.TL_channels_channelParticipants res = (TLRPC.TL_channels_channelParticipants) response;
realAdminCount = res.count;
adminCell.setTextAndValueAndIcon(LocaleController.getString("ChannelAdministrators", R.string.ChannelAdministrators), String.format("%d", res.count), R.drawable.actions_addadmin, true);
adminCell.setTextAndValueAndIcon(LocaleController.getString("ChannelAdministrators", R.string.ChannelAdministrators), String.format("%d", res.count), R.drawable.baseline_stars_18, true);
}));
getConnectionsManager().bindRequestToGuid(reqId, classGuid);
}
@ -1171,13 +1174,13 @@ public class ChatEditActivity extends BaseFragment implements ImageUpdater.Image
if (membersCell != null) {
if (info != null) {
if (isChannel) {
membersCell.setTextAndValueAndIcon(LocaleController.getString("ChannelSubscribers", R.string.ChannelSubscribers), String.format("%d", info.participants_count), R.drawable.actions_viewmembers, true);
membersCell.setTextAndValueAndIcon(LocaleController.getString("ChannelSubscribers", R.string.ChannelSubscribers), String.format("%d", info.participants_count), R.drawable.baseline_group_24, true);
blockCell.setTextAndValueAndIcon(LocaleController.getString("ChannelBlacklist", R.string.ChannelBlacklist), String.format("%d", Math.max(info.banned_count, info.kicked_count)), R.drawable.actions_removed, logCell != null && logCell.getVisibility() == View.VISIBLE);
} else {
if (ChatObject.isChannel(currentChat)) {
membersCell.setTextAndValueAndIcon(LocaleController.getString("ChannelMembers", R.string.ChannelMembers), String.format("%d", info.participants_count), R.drawable.actions_viewmembers, logCell != null && logCell.getVisibility() == View.VISIBLE);
membersCell.setTextAndValueAndIcon(LocaleController.getString("ChannelMembers", R.string.ChannelMembers), String.format("%d", info.participants_count), R.drawable.baseline_group_24, logCell != null && logCell.getVisibility() == View.VISIBLE);
} else {
membersCell.setTextAndValueAndIcon(LocaleController.getString("ChannelMembers", R.string.ChannelMembers), String.format("%d", info.participants.participants.size()), R.drawable.actions_viewmembers, logCell != null && logCell.getVisibility() == View.VISIBLE);
membersCell.setTextAndValueAndIcon(LocaleController.getString("ChannelMembers", R.string.ChannelMembers), String.format("%d", info.participants.participants.size()), R.drawable.baseline_group_24, logCell != null && logCell.getVisibility() == View.VISIBLE);
}
int count = 0;
if (currentChat.default_banned_rights != null) {
@ -1211,25 +1214,27 @@ public class ChatEditActivity extends BaseFragment implements ImageUpdater.Image
} else {
count = 9;
}
blockCell.setTextAndValueAndIcon(LocaleController.getString("ChannelPermissions", R.string.ChannelPermissions), String.format("%d/%d", count, 9), R.drawable.actions_permissions, true);
blockCell.setTextAndValueAndIcon(LocaleController.getString("ChannelPermissions", R.string.ChannelPermissions), count + " / 9", R.drawable.baseline_block_24, true);
}
if (ChatObject.isChannel(currentChat) && !ChatObject.hasAdminRights(currentChat) && info.participants.participants.size() != info.participants_count && realAdminCount == 0) {
adminCell.setTextAndIcon(LocaleController.getString("ChannelAdministrators", R.string.ChannelAdministrators), R.drawable.actions_addadmin, true);
} else {
adminCell.setTextAndValueAndIcon(LocaleController.getString("ChannelAdministrators", R.string.ChannelAdministrators), String.format("%d", ChatObject.isChannel(currentChat) ? ChatObject.hasAdminRights(currentChat) ? info.admins_count : realAdminCount == 0 ? getChannelAdminCount() : realAdminCount : getAdminCount()), R.drawable.actions_addadmin, true);
}
if (ChatObject.isChannel(currentChat) && !ChatObject.hasAdminRights(currentChat) && info.participants.participants.size() != info.participants_count) {
getRealChannelAdminCount();
if (info.participants != null) {
if (ChatObject.isChannel(currentChat) && !ChatObject.hasAdminRights(currentChat) && info.participants.participants.size() != info.participants_count && realAdminCount == 0) {
adminCell.setTextAndIcon(LocaleController.getString("ChannelAdministrators", R.string.ChannelAdministrators), R.drawable.baseline_stars_18, true);
} else {
adminCell.setTextAndValueAndIcon(LocaleController.getString("ChannelAdministrators", R.string.ChannelAdministrators), String.format("%d", ChatObject.isChannel(currentChat) ? ChatObject.hasAdminRights(currentChat) ? info.admins_count : realAdminCount == 0 ? getChannelAdminCount() : realAdminCount : getAdminCount()), R.drawable.baseline_stars_18, true);
}
if (ChatObject.isChannel(currentChat) && !ChatObject.hasAdminRights(currentChat) && info.participants.participants.size() != info.participants_count) {
getRealChannelAdminCount();
}
}
} else {
if (isChannel) {
membersCell.setTextAndIcon(LocaleController.getString("ChannelSubscribers", R.string.ChannelSubscribers), R.drawable.actions_viewmembers, true);
membersCell.setTextAndIcon(LocaleController.getString("ChannelSubscribers", R.string.ChannelSubscribers), R.drawable.baseline_group_24, true);
blockCell.setTextAndIcon(LocaleController.getString("ChannelBlacklist", R.string.ChannelBlacklist), R.drawable.actions_removed, logCell != null && logCell.getVisibility() == View.VISIBLE);
} else {
membersCell.setTextAndIcon(LocaleController.getString("ChannelMembers", R.string.ChannelMembers), R.drawable.actions_viewmembers, logCell != null && logCell.getVisibility() == View.VISIBLE);
blockCell.setTextAndIcon(LocaleController.getString("ChannelPermissions", R.string.ChannelPermissions), R.drawable.actions_permissions, true);
membersCell.setTextAndIcon(LocaleController.getString("ChannelMembers", R.string.ChannelMembers), R.drawable.baseline_group_24, logCell != null && logCell.getVisibility() == View.VISIBLE);
blockCell.setTextAndIcon(LocaleController.getString("ChannelPermissions", R.string.ChannelPermissions), R.drawable.baseline_block_24, true);
}
adminCell.setTextAndIcon(LocaleController.getString("ChannelAdministrators", R.string.ChannelAdministrators), R.drawable.actions_addadmin, true);
adminCell.setTextAndIcon(LocaleController.getString("ChannelAdministrators", R.string.ChannelAdministrators), R.drawable.baseline_stars_18, true);
}
}

View File

@ -788,14 +788,14 @@ public class ChatLinkActivity extends BaseFragment implements NotificationCenter
if (isChannel) {
if (info.linked_chat_id != 0) {
actionCell.setColors(Theme.key_windowBackgroundWhiteRedText5, Theme.key_windowBackgroundWhiteRedText5);
actionCell.setText(LocaleController.getString("DiscussionUnlinkGroup", R.string.DiscussionUnlinkGroup), null, R.drawable.actions_remove_user, false);
actionCell.setText(LocaleController.getString("DiscussionUnlinkGroup", R.string.DiscussionUnlinkGroup), null, R.drawable.baseline_remove_circle_24, false);
} else {
actionCell.setColors(Theme.key_windowBackgroundWhiteBlueIcon, Theme.key_windowBackgroundWhiteBlueButton);
actionCell.setText(LocaleController.getString("DiscussionCreateGroup", R.string.DiscussionCreateGroup), null, R.drawable.menu_groups, true);
actionCell.setText(LocaleController.getString("DiscussionCreateGroup", R.string.DiscussionCreateGroup), null, R.drawable.baseline_group_24, true);
}
} else {
actionCell.setColors(Theme.key_windowBackgroundWhiteRedText5, Theme.key_windowBackgroundWhiteRedText5);
actionCell.setText(LocaleController.getString("DiscussionUnlinkChannel", R.string.DiscussionUnlinkChannel), null, R.drawable.actions_remove_user, false);
actionCell.setText(LocaleController.getString("DiscussionUnlinkChannel", R.string.DiscussionUnlinkChannel), null, R.drawable.baseline_remove_circle_24, false);
}
break;
}

View File

@ -696,7 +696,7 @@ public class ChatRightsEditActivity extends BaseFragment {
ImageView dotImageView = new ImageView(getParentActivity());
dotImageView.setImageResource(R.drawable.list_circle);
dotImageView.setPadding(LocaleController.isRTL ? AndroidUtilities.dp(11) : 0, AndroidUtilities.dp(9), LocaleController.isRTL ? 0 : AndroidUtilities.dp(11), 0);
dotImageView.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_dialogTextBlack), PorterDuff.Mode.MULTIPLY));
dotImageView.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_dialogTextBlack), PorterDuff.Mode.SRC_IN));
messageTextView = new TextView(getParentActivity());
messageTextView.setTextColor(Theme.getColor(Theme.key_dialogTextBlack));
@ -718,7 +718,7 @@ public class ChatRightsEditActivity extends BaseFragment {
dotImageView = new ImageView(getParentActivity());
dotImageView.setImageResource(R.drawable.list_circle);
dotImageView.setPadding(LocaleController.isRTL ? AndroidUtilities.dp(11) : 0, AndroidUtilities.dp(9), LocaleController.isRTL ? 0 : AndroidUtilities.dp(11), 0);
dotImageView.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_dialogTextBlack), PorterDuff.Mode.MULTIPLY));
dotImageView.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_dialogTextBlack), PorterDuff.Mode.SRC_IN));
messageTextView = new TextView(getParentActivity());
messageTextView.setTextColor(Theme.getColor(Theme.key_dialogTextBlack));

View File

@ -1321,7 +1321,7 @@ public class ChatUsersActivity extends BaseFragment implements NotificationCente
return true;
}
items.add(editingAdmin ? LocaleController.getString("EditAdminRights", R.string.EditAdminRights) : LocaleController.getString("SetAsAdmin", R.string.SetAsAdmin));
icons.add(R.drawable.actions_addadmin);
icons.add(R.drawable.baseline_stars_18);
actions.add(0);
}
boolean hasRemove = false;
@ -1332,15 +1332,15 @@ public class ChatUsersActivity extends BaseFragment implements NotificationCente
if (!isChannel) {
if (ChatObject.isChannel(currentChat)) {
items.add(LocaleController.getString("ChangePermissions", R.string.ChangePermissions));
icons.add(R.drawable.actions_permissions);
icons.add(R.drawable.baseline_block_24);
actions.add(1);
}
items.add(LocaleController.getString("KickFromGroup", R.string.KickFromGroup));
icons.add(R.drawable.actions_remove_user);
icons.add(R.drawable.baseline_remove_circle_24);
actions.add(2);
} else {
items.add(LocaleController.getString("ChannelRemoveUser", R.string.ChannelRemoveUser));
icons.add(R.drawable.actions_remove_user);
icons.add(R.drawable.baseline_remove_circle_24);
actions.add(2);
}
hasRemove = true;
@ -1383,8 +1383,8 @@ public class ChatUsersActivity extends BaseFragment implements NotificationCente
LocaleController.getString("ChannelEditPermissions", R.string.ChannelEditPermissions),
LocaleController.getString("ChannelDeleteFromList", R.string.ChannelDeleteFromList)};
icons = new int[]{
R.drawable.actions_permissions,
R.drawable.chats_delete};
R.drawable.baseline_block_24,
R.drawable.baseline_delete_24};
} else if (type == TYPE_BANNED && ChatObject.canBlockUsers(currentChat)) {
if (resultOnly) {
return true;
@ -1393,8 +1393,8 @@ public class ChatUsersActivity extends BaseFragment implements NotificationCente
ChatObject.canAddUsers(currentChat) ? (isChannel ? LocaleController.getString("ChannelAddToChannel", R.string.ChannelAddToChannel) : LocaleController.getString("ChannelAddToGroup", R.string.ChannelAddToGroup)) : null,
LocaleController.getString("ChannelDeleteFromList", R.string.ChannelDeleteFromList)};
icons = new int[]{
R.drawable.actions_addmember2,
R.drawable.chats_delete};
R.drawable.baseline_person_add_24,
R.drawable.baseline_delete_24};
} else if (type == TYPE_ADMIN && ChatObject.canAddAdmins(currentChat) && canEdit) {
if (resultOnly) {
return true;
@ -1404,13 +1404,13 @@ public class ChatUsersActivity extends BaseFragment implements NotificationCente
LocaleController.getString("EditAdminRights", R.string.EditAdminRights),
LocaleController.getString("ChannelRemoveUserAdmin", R.string.ChannelRemoveUserAdmin)};
icons = new int[]{
R.drawable.actions_addadmin,
R.drawable.actions_remove_user};
R.drawable.baseline_stars_18,
R.drawable.baseline_remove_circle_24};
} else {
items = new CharSequence[]{
LocaleController.getString("ChannelRemoveUserAdmin", R.string.ChannelRemoveUserAdmin)};
icons = new int[]{
R.drawable.actions_remove_user};
R.drawable.baseline_remove_circle_24};
}
} else {
items = null;
@ -2484,7 +2484,7 @@ public class ChatUsersActivity extends BaseFragment implements NotificationCente
ImageView imageView = new ImageView(mContext);
imageView.setImageResource(R.drawable.group_ban_empty);
imageView.setScaleType(ImageView.ScaleType.CENTER);
imageView.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_emptyListPlaceholder), PorterDuff.Mode.MULTIPLY));
imageView.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_emptyListPlaceholder), PorterDuff.Mode.SRC_IN));
linearLayout.addView(imageView, LayoutHelper.createLinear(LayoutHelper.WRAP_CONTENT, LayoutHelper.WRAP_CONTENT, Gravity.CENTER_HORIZONTAL));
TextView textView = new TextView(mContext);
@ -2681,22 +2681,22 @@ public class ChatUsersActivity extends BaseFragment implements NotificationCente
if (position == addNewRow) {
if (type == TYPE_KICKED) {
actionCell.setColors(Theme.key_windowBackgroundWhiteBlueIcon, Theme.key_windowBackgroundWhiteBlueButton);
actionCell.setText(LocaleController.getString("ChannelAddException", R.string.ChannelAddException), null, R.drawable.actions_addmember2, participantsStartRow != -1);
actionCell.setText(LocaleController.getString("ChannelAddException", R.string.ChannelAddException), null, R.drawable.baseline_person_add_24, participantsStartRow != -1);
} else if (type == TYPE_BANNED) {
actionCell.setText(LocaleController.getString("ChannelBlockUser", R.string.ChannelBlockUser), null, R.drawable.actions_removed, false);
} else if (type == TYPE_ADMIN) {
actionCell.setColors(Theme.key_windowBackgroundWhiteBlueIcon, Theme.key_windowBackgroundWhiteBlueButton);
actionCell.setText(LocaleController.getString("ChannelAddAdmin", R.string.ChannelAddAdmin), null, R.drawable.add_admin, true);
actionCell.setText(LocaleController.getString("ChannelAddAdmin", R.string.ChannelAddAdmin), null, R.drawable.baseline_stars_24, true);
} else if (type == TYPE_USERS) {
actionCell.setColors(Theme.key_windowBackgroundWhiteBlueIcon, Theme.key_windowBackgroundWhiteBlueButton);
if (isChannel) {
actionCell.setText(LocaleController.getString("AddSubscriber", R.string.AddSubscriber), null, R.drawable.actions_addmember2, membersHeaderRow == -1 && !participants.isEmpty());
actionCell.setText(LocaleController.getString("AddSubscriber", R.string.AddSubscriber), null, R.drawable.baseline_person_add_24, membersHeaderRow == -1 && !participants.isEmpty());
} else {
actionCell.setText(LocaleController.getString("AddMember", R.string.AddMember), null, R.drawable.actions_addmember2, membersHeaderRow == -1 && !participants.isEmpty());
actionCell.setText(LocaleController.getString("AddMember", R.string.AddMember), null, R.drawable.baseline_person_add_24, membersHeaderRow == -1 && !participants.isEmpty());
}
}
} else if (position == recentActionsRow) {
actionCell.setText(LocaleController.getString("EventLog", R.string.EventLog), null, R.drawable.group_log, false);
actionCell.setText(LocaleController.getString("EventLog", R.string.EventLog), null, R.drawable.baseline_content_paste_18, false);
} else if (position == addNew2Row) {
actionCell.setText(LocaleController.getString("ChannelInviteViaLink", R.string.ChannelInviteViaLink), null, R.drawable.profile_link, true);
}

View File

@ -119,7 +119,7 @@ public class AdminLogFilterAlert extends BottomSheet {
allAdminsRow = rowCount;
shadowDrawable = context.getResources().getDrawable(R.drawable.sheet_shadow_round).mutate();
shadowDrawable.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_dialogBackground), PorterDuff.Mode.MULTIPLY));
shadowDrawable.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_dialogBackground), PorterDuff.Mode.SRC_IN));
containerView = new FrameLayout(context) {

View File

@ -159,7 +159,7 @@ public class AudioPlayerAlert extends BottomSheet implements NotificationCenter.
parentActivity = (LaunchActivity) context;
noCoverDrawable = context.getResources().getDrawable(R.drawable.nocover).mutate();
noCoverDrawable.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_player_placeholder), PorterDuff.Mode.MULTIPLY));
noCoverDrawable.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_player_placeholder), PorterDuff.Mode.SRC_IN));
TAG = DownloadController.getInstance(currentAccount).generateObserverTag();
NotificationCenter.getInstance(currentAccount).addObserver(this, NotificationCenter.messagePlayingDidReset);
@ -169,7 +169,7 @@ public class AudioPlayerAlert extends BottomSheet implements NotificationCenter.
NotificationCenter.getInstance(currentAccount).addObserver(this, NotificationCenter.musicDidLoad);
shadowDrawable = context.getResources().getDrawable(R.drawable.sheet_shadow).mutate();
shadowDrawable.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_player_background), PorterDuff.Mode.MULTIPLY));
shadowDrawable.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_player_background), PorterDuff.Mode.SRC_IN));
paint.setColor(Theme.getColor(Theme.key_player_placeholderBackground));
containerView = new FrameLayout(context) {
@ -304,7 +304,7 @@ public class AudioPlayerAlert extends BottomSheet implements NotificationCenter.
ActionBarMenu menu = actionBar.createMenu();
menuItem = menu.addItem(0, R.drawable.ic_ab_other);
menuItem.addSubItem(1, R.drawable.msg_forward, LocaleController.getString("Forward", R.string.Forward));
menuItem.addSubItem(2, R.drawable.msg_shareout, LocaleController.getString("ShareFile", R.string.ShareFile));
menuItem.addSubItem(2, R.drawable.baseline_share_24, LocaleController.getString("ShareFile", R.string.ShareFile));
menuItem.addSubItem(4, R.drawable.msg_message, LocaleController.getString("ShowInChat", R.string.ShowInChat));
menuItem.setContentDescription(LocaleController.getString("AccDescrMoreOptions", R.string.AccDescrMoreOptions));
menuItem.setTranslationX(AndroidUtilities.dp(48));
@ -488,7 +488,7 @@ public class AudioPlayerAlert extends BottomSheet implements NotificationCenter.
optionsButton.setAdditionalYOffset(-AndroidUtilities.dp(120));
playerLayout.addView(optionsButton, LayoutHelper.createFrame(40, 40, Gravity.TOP | Gravity.RIGHT, 0, 19, 10, 0));
optionsButton.addSubItem(1, R.drawable.msg_forward, LocaleController.getString("Forward", R.string.Forward));
optionsButton.addSubItem(2, R.drawable.msg_shareout, LocaleController.getString("ShareFile", R.string.ShareFile));
optionsButton.addSubItem(2, R.drawable.baseline_share_24, LocaleController.getString("ShareFile", R.string.ShareFile));
optionsButton.addSubItem(4, R.drawable.msg_message, LocaleController.getString("ShowInChat", R.string.ShowInChat));
optionsButton.setOnClickListener(v -> optionsButton.toggleSubMenu());
optionsButton.setDelegate(this::onSubItemClick);
@ -767,9 +767,9 @@ public class AudioPlayerAlert extends BottomSheet implements NotificationCenter.
private void updatePlaybackButton() {
float currentPlaybackSpeed = MediaController.getInstance().getPlaybackSpeed(true);
if (currentPlaybackSpeed > 1) {
playbackSpeedButton.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_inappPlayerPlayPause), PorterDuff.Mode.MULTIPLY));
playbackSpeedButton.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_inappPlayerPlayPause), PorterDuff.Mode.SRC_IN));
} else {
playbackSpeedButton.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_inappPlayerClose), PorterDuff.Mode.MULTIPLY));
playbackSpeedButton.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_inappPlayerClose), PorterDuff.Mode.SRC_IN));
}
}
@ -1059,22 +1059,22 @@ public class AudioPlayerAlert extends BottomSheet implements NotificationCenter.
private void updateShuffleButton() {
if (SharedConfig.shuffleMusic) {
Drawable drawable = getContext().getResources().getDrawable(R.drawable.pl_shuffle).mutate();
drawable.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_player_buttonActive), PorterDuff.Mode.MULTIPLY));
drawable.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_player_buttonActive), PorterDuff.Mode.SRC_IN));
shuffleButton.setIcon(drawable);
shuffleButton.setContentDescription(LocaleController.getString("Shuffle", R.string.Shuffle));
} else {
Drawable drawable = getContext().getResources().getDrawable(R.drawable.music_reverse).mutate();
if (SharedConfig.playOrderReversed) {
drawable.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_player_buttonActive), PorterDuff.Mode.MULTIPLY));
drawable.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_player_buttonActive), PorterDuff.Mode.SRC_IN));
} else {
drawable.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_player_button), PorterDuff.Mode.MULTIPLY));
drawable.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_player_button), PorterDuff.Mode.SRC_IN));
}
shuffleButton.setIcon(drawable);
shuffleButton.setContentDescription(LocaleController.getString("ReverseOrder", R.string.ReverseOrder));
}
playOrderButtons[0].setColorFilter(new PorterDuffColorFilter(Theme.getColor(SharedConfig.playOrderReversed ? Theme.key_player_buttonActive : Theme.key_player_button), PorterDuff.Mode.MULTIPLY));
playOrderButtons[1].setColorFilter(new PorterDuffColorFilter(Theme.getColor(SharedConfig.shuffleMusic ? Theme.key_player_buttonActive : Theme.key_player_button), PorterDuff.Mode.MULTIPLY));
playOrderButtons[0].setColorFilter(new PorterDuffColorFilter(Theme.getColor(SharedConfig.playOrderReversed ? Theme.key_player_buttonActive : Theme.key_player_button), PorterDuff.Mode.SRC_IN));
playOrderButtons[1].setColorFilter(new PorterDuffColorFilter(Theme.getColor(SharedConfig.shuffleMusic ? Theme.key_player_buttonActive : Theme.key_player_button), PorterDuff.Mode.SRC_IN));
}
private void updateRepeatButton() {
@ -1082,17 +1082,17 @@ public class AudioPlayerAlert extends BottomSheet implements NotificationCenter.
if (mode == 0) {
repeatButton.setImageResource(R.drawable.pl_repeat);
repeatButton.setTag(Theme.key_player_button);
repeatButton.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_player_button), PorterDuff.Mode.MULTIPLY));
repeatButton.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_player_button), PorterDuff.Mode.SRC_IN));
repeatButton.setContentDescription(LocaleController.getString("AccDescrRepeatOff", R.string.AccDescrRepeatOff));
} else if (mode == 1) {
repeatButton.setImageResource(R.drawable.pl_repeat);
repeatButton.setTag(Theme.key_player_buttonActive);
repeatButton.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_player_buttonActive), PorterDuff.Mode.MULTIPLY));
repeatButton.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_player_buttonActive), PorterDuff.Mode.SRC_IN));
repeatButton.setContentDescription(LocaleController.getString("AccDescrRepeatList", R.string.AccDescrRepeatList));
} else if (mode == 2) {
repeatButton.setImageResource(R.drawable.pl_repeat1);
repeatButton.setTag(Theme.key_player_buttonActive);
repeatButton.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_player_buttonActive), PorterDuff.Mode.MULTIPLY));
repeatButton.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_player_buttonActive), PorterDuff.Mode.SRC_IN));
repeatButton.setContentDescription(LocaleController.getString("AccDescrRepeatOne", R.string.AccDescrRepeatOne));
}
}

View File

@ -100,7 +100,7 @@ public class BackupImageView extends View {
public void setImageResource(int resId, int color) {
Drawable drawable = getResources().getDrawable(resId);
if (drawable != null) {
drawable.setColorFilter(new PorterDuffColorFilter(color, PorterDuff.Mode.MULTIPLY));
drawable.setColorFilter(new PorterDuffColorFilter(color, PorterDuff.Mode.SRC_IN));
}
imageReceiver.setImageBitmap(drawable);
invalidate();

View File

@ -468,7 +468,7 @@ public final class Bulletin {
final int undoInfoColor = Theme.getColor(Theme.key_undo_infoColor);
imageView = new ImageView(context);
imageView.setColorFilter(new PorterDuffColorFilter(undoInfoColor, PorterDuff.Mode.MULTIPLY));
imageView.setColorFilter(new PorterDuffColorFilter(undoInfoColor, PorterDuff.Mode.SRC_IN));
addView(imageView, LayoutHelper.createFrameRelatively(24, 24, Gravity.START | Gravity.CENTER_VERTICAL, 16, 12, 16, 12));
textView = new TextView(context);
@ -572,7 +572,7 @@ public final class Bulletin {
final ImageView undoImageView = new ImageView(getContext());
undoImageView.setOnClickListener(v -> undo());
undoImageView.setImageResource(R.drawable.chats_undo);
undoImageView.setColorFilter(new PorterDuffColorFilter(undoCancelColor, PorterDuff.Mode.MULTIPLY));
undoImageView.setColorFilter(new PorterDuffColorFilter(undoCancelColor, PorterDuff.Mode.SRC_IN));
undoImageView.setBackground(Theme.createSelectorDrawable((undoCancelColor & 0x00ffffff) | 0x19000000));
ViewHelper.setPaddingRelative(undoImageView, 0, 12, 0, 12);
addView(undoImageView, LayoutHelper.createFrameRelatively(56, 48, Gravity.CENTER_VERTICAL));

View File

@ -145,7 +145,7 @@ public class ChatAttachAlertAudioLayout extends ChatAttachAlert.AttachAlertLayou
emptyImageView = new ImageView(context);
emptyImageView.setImageResource(R.drawable.music_empty);
emptyImageView.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_dialogEmptyImage), PorterDuff.Mode.MULTIPLY));
emptyImageView.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_dialogEmptyImage), PorterDuff.Mode.SRC_IN));
emptyView.addView(emptyImageView, LayoutHelper.createLinear(LayoutHelper.WRAP_CONTENT, LayoutHelper.WRAP_CONTENT));
emptyTitleTextView = new TextView(context);

View File

@ -48,6 +48,11 @@ import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
import androidx.recyclerview.widget.DefaultItemAnimator;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.LinearSmoothScroller;
import androidx.recyclerview.widget.RecyclerView;
import org.osmdroid.api.IGeoPoint;
import org.osmdroid.api.IMapController;
import org.osmdroid.events.MapListener;
@ -96,11 +101,6 @@ import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import androidx.recyclerview.widget.DefaultItemAnimator;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.LinearSmoothScroller;
import androidx.recyclerview.widget.RecyclerView;
public class ChatAttachAlertLocationLayout extends ChatAttachAlert.AttachAlertLayout implements NotificationCenter.NotificationCenterDelegate {
private ImageView locationButton;
@ -184,6 +184,7 @@ public class ChatAttachAlertLocationLayout extends ChatAttachAlert.AttachAlertLa
private final static int map_list_menu_cartodark = 4;
private MyLocationNewOverlay myLocationOverlay;
public final static int LOCATION_TYPE_SEND = 0;
public final static int LOCATION_TYPE_SEND_WITH_LIVE = 1;
@ -258,7 +259,7 @@ public class ChatAttachAlertLocationLayout extends ChatAttachAlert.AttachAlertLa
lastPressedMarkerView = new FrameLayout(context);
lastPressedMarkerView.setBackgroundResource(R.drawable.venue_tooltip);
lastPressedMarkerView.getBackground().setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_dialogBackground), PorterDuff.Mode.MULTIPLY));
lastPressedMarkerView.getBackground().setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_dialogBackground), PorterDuff.Mode.SRC_IN));
frameLayout.addView(lastPressedMarkerView, LayoutHelper.createFrame(LayoutHelper.WRAP_CONTENT, 71));
lastPressedMarkerView.setAlpha(0.0f);
lastPressedMarkerView.setOnClickListener(v -> {
@ -344,7 +345,7 @@ public class ChatAttachAlertLocationLayout extends ChatAttachAlert.AttachAlertLa
views.put(marker, frameLayout);
final IMapController controller = mapView.getController();
controller.animateTo(marker.getPosition(),mapView.getZoomLevelDouble(),300L);
controller.animateTo(marker.getPosition(), mapView.getZoomLevelDouble(), 300L);
}
public void removeInfoView(Marker marker) {
@ -364,7 +365,7 @@ public class ChatAttachAlertLocationLayout extends ChatAttachAlert.AttachAlertLa
for (HashMap.Entry<Marker, View> entry : views.entrySet()) {
Marker marker = entry.getKey();
View view = entry.getValue();
Point point = projection.toPixels(marker.getPosition(),null);
Point point = projection.toPixels(marker.getPosition(), null);
view.setTranslationX(point.x - view.getMeasuredWidth() / 2);
view.setTranslationY(point.y - view.getMeasuredHeight() + AndroidUtilities.dp(22));
}
@ -397,7 +398,6 @@ public class ChatAttachAlertLocationLayout extends ChatAttachAlert.AttachAlertLa
searchAdapter.destroy();
}
ActionBarMenu menu = parentAlert.actionBar.createMenu();
overlayView = new MapOverlayView(context);
@ -509,7 +509,7 @@ public class ChatAttachAlertLocationLayout extends ChatAttachAlert.AttachAlertLa
Drawable drawable = Theme.createSimpleSelectorRoundRectDrawable(AndroidUtilities.dp(40), Theme.getColor(Theme.key_location_actionBackground), Theme.getColor(Theme.key_location_actionPressedBackground));
if (Build.VERSION.SDK_INT < 21) {
Drawable shadowDrawable = context.getResources().getDrawable(R.drawable.places_btn).mutate();
shadowDrawable.setColorFilter(new PorterDuffColorFilter(0xff000000, PorterDuff.Mode.MULTIPLY));
shadowDrawable.setColorFilter(new PorterDuffColorFilter(0xff000000, PorterDuff.Mode.SRC_IN));
CombinedDrawable combinedDrawable = new CombinedDrawable(shadowDrawable, drawable, AndroidUtilities.dp(2), AndroidUtilities.dp(2));
combinedDrawable.setFullsize(true);
drawable = combinedDrawable;
@ -553,7 +553,7 @@ public class ChatAttachAlertLocationLayout extends ChatAttachAlert.AttachAlertLa
drawable = Theme.createSimpleSelectorCircleDrawable(AndroidUtilities.dp(40), Theme.getColor(Theme.key_location_actionBackground), Theme.getColor(Theme.key_location_actionPressedBackground));
if (Build.VERSION.SDK_INT < 21) {
Drawable shadowDrawable = context.getResources().getDrawable(R.drawable.floating_shadow_profile).mutate();
shadowDrawable.setColorFilter(new PorterDuffColorFilter(0xff000000, PorterDuff.Mode.MULTIPLY));
shadowDrawable.setColorFilter(new PorterDuffColorFilter(0xff000000, PorterDuff.Mode.SRC_IN));
CombinedDrawable combinedDrawable = new CombinedDrawable(shadowDrawable, drawable, 0, 0);
combinedDrawable.setIconSize(AndroidUtilities.dp(40), AndroidUtilities.dp(40));
drawable = combinedDrawable;
@ -586,7 +586,7 @@ public class ChatAttachAlertLocationLayout extends ChatAttachAlert.AttachAlertLa
ITileSource tileSource = new XYTileSource(
"Wikimedia", 0, 19,
256, ".png",
new String[] {"https://maps.wikimedia.org/osm-intl/"},
new String[]{"https://maps.wikimedia.org/osm-intl/"},
"© OpenStreetMap contributors");
attributionOverlay.setText(Html.fromHtml("© <a href=\"https://www.openstreetmap.org/copyright\">OpenStreetMap</a> contributors"));
mapView.setTileSource(tileSource);
@ -605,13 +605,12 @@ public class ChatAttachAlertLocationLayout extends ChatAttachAlert.AttachAlertLa
mapView.setTileSource(tileSource);
}
});
mapViewClip.addView(getAttributionOverlay(context), LayoutHelper.createFrame(LayoutHelper.WRAP_CONTENT, LayoutHelper.WRAP_CONTENT, (LocaleController.isRTL ? Gravity.RIGHT : Gravity.LEFT) | Gravity.BOTTOM, LocaleController.isRTL ? 0 : 4, 0, LocaleController.isRTL ? 4 : 0, 20));
locationButton = new ImageView(context);
drawable = Theme.createSimpleSelectorCircleDrawable(AndroidUtilities.dp(40), Theme.getColor(Theme.key_location_actionBackground), Theme.getColor(Theme.key_location_actionPressedBackground));
if (Build.VERSION.SDK_INT < 21) {
Drawable shadowDrawable = context.getResources().getDrawable(R.drawable.floating_shadow_profile).mutate();
shadowDrawable.setColorFilter(new PorterDuffColorFilter(0xff000000, PorterDuff.Mode.MULTIPLY));
shadowDrawable.setColorFilter(new PorterDuffColorFilter(0xff000000, PorterDuff.Mode.SRC_IN));
CombinedDrawable combinedDrawable = new CombinedDrawable(shadowDrawable, drawable, 0, 0);
combinedDrawable.setIconSize(AndroidUtilities.dp(40), AndroidUtilities.dp(40));
drawable = combinedDrawable;
@ -631,7 +630,7 @@ public class ChatAttachAlertLocationLayout extends ChatAttachAlert.AttachAlertLa
locationButton.setBackgroundDrawable(drawable);
locationButton.setImageResource(R.drawable.location_current);
locationButton.setScaleType(ImageView.ScaleType.CENTER);
locationButton.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_location_actionActiveIcon), PorterDuff.Mode.MULTIPLY));
locationButton.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_location_actionActiveIcon), PorterDuff.Mode.SRC_IN));
locationButton.setTag(Theme.key_location_actionActiveIcon);
locationButton.setContentDescription(LocaleController.getString("AccDescrMyLocation", R.string.AccDescrMyLocation));
FrameLayout.LayoutParams layoutParams1 = LayoutHelper.createFrame(Build.VERSION.SDK_INT >= 21 ? 40 : 44, Build.VERSION.SDK_INT >= 21 ? 40 : 44, Gravity.RIGHT | Gravity.BOTTOM, 0, 0, 12, 12);
@ -647,7 +646,7 @@ public class ChatAttachAlertLocationLayout extends ChatAttachAlert.AttachAlertLa
}
}
if (myLocation != null && mapView != null) {
locationButton.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_location_actionActiveIcon), PorterDuff.Mode.MULTIPLY));
locationButton.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_location_actionActiveIcon), PorterDuff.Mode.SRC_IN));
locationButton.setTag(Theme.key_location_actionActiveIcon);
adapter.setCustomLocation(null);
userLocationMoved = false;
@ -675,7 +674,7 @@ public class ChatAttachAlertLocationLayout extends ChatAttachAlert.AttachAlertLa
emptyImageView = new ImageView(context);
emptyImageView.setImageResource(R.drawable.location_empty);
emptyImageView.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_dialogEmptyImage), PorterDuff.Mode.MULTIPLY));
emptyImageView.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_dialogEmptyImage), PorterDuff.Mode.SRC_IN));
emptyView.addView(emptyImageView, LayoutHelper.createLinear(LayoutHelper.WRAP_CONTENT, LayoutHelper.WRAP_CONTENT));
emptyTitleTextView = new TextView(context);
@ -799,7 +798,7 @@ public class ChatAttachAlertLocationLayout extends ChatAttachAlert.AttachAlertLa
} else if (object instanceof LiveLocation) {
LiveLocation liveLocation = (LiveLocation) object;
final IMapController controller = mapView.getController();
controller.animateTo(liveLocation.marker.getPosition(), mapView.getMaxZoomLevel() -2,null);
controller.animateTo(liveLocation.marker.getPosition(), mapView.getMaxZoomLevel() - 2, null);
}
}
});
@ -847,7 +846,7 @@ public class ChatAttachAlertLocationLayout extends ChatAttachAlert.AttachAlertLa
}
if (ev.getAction() == MotionEvent.ACTION_MOVE) {
if (!userLocationMoved) {
locationButton.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_location_actionIcon), PorterDuff.Mode.MULTIPLY));
locationButton.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_location_actionIcon), PorterDuff.Mode.SRC_IN));
locationButton.setTag(Theme.key_location_actionIcon);
userLocationMoved = true;
}
@ -1150,6 +1149,7 @@ public class ChatAttachAlertLocationLayout extends ChatAttachAlert.AttachAlertLa
}
private Bitmap[] bitmapCache = new Bitmap[7];
private Bitmap createPlaceBitmap(int num) {
if (bitmapCache[num % 7] != null) {
return bitmapCache[num % 7];
@ -1198,7 +1198,7 @@ public class ChatAttachAlertLocationLayout extends ChatAttachAlert.AttachAlertLa
public boolean onMarkerClick(Marker marker, MapView mapView) {
markerImageView.setVisibility(View.INVISIBLE);
if (!userLocationMoved) {
locationButton.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_location_actionIcon), PorterDuff.Mode.MULTIPLY));
locationButton.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_location_actionIcon), PorterDuff.Mode.SRC_IN));
locationButton.setTag(Theme.key_location_actionIcon);
userLocationMoved = true;
}

View File

@ -34,6 +34,7 @@ import android.view.accessibility.AccessibilityEvent;
import android.view.animation.DecelerateInterpolator;
import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
import org.telegram.messenger.AndroidUtilities;
@ -421,7 +422,7 @@ public class ChatAttachAlertPhotoLayout extends ChatAttachAlert.AttachAlertLayou
super(alert, context);
NotificationCenter.getGlobalInstance().addObserver(this, NotificationCenter.albumsDidLoad);
NotificationCenter.getGlobalInstance().addObserver(this, NotificationCenter.cameraInitied);
FrameLayout container = alert.getContainer();
LinearLayout container = alert.getContainer();
cameraDrawable = context.getResources().getDrawable(R.drawable.instant_camera).mutate();
@ -441,7 +442,7 @@ public class ChatAttachAlertPhotoLayout extends ChatAttachAlert.AttachAlertLayou
dropDown.setText(LocaleController.getString("ChatGallery", R.string.ChatGallery));
dropDown.setTypeface(AndroidUtilities.getTypeface("fonts/rmedium.ttf"));
dropDownDrawable = context.getResources().getDrawable(R.drawable.ic_arrow_drop_down).mutate();
dropDownDrawable.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_dialogTextBlack), PorterDuff.Mode.MULTIPLY));
dropDownDrawable.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_dialogTextBlack), PorterDuff.Mode.SRC_IN));
dropDown.setCompoundDrawablePadding(AndroidUtilities.dp(4));
dropDown.setPadding(0, 0, AndroidUtilities.dp(10), 0);
dropDownContainer.addView(dropDown, LayoutHelper.createFrame(LayoutHelper.WRAP_CONTENT, LayoutHelper.WRAP_CONTENT, Gravity.CENTER_VERTICAL, 16, 0, 0, 0));
@ -450,7 +451,7 @@ public class ChatAttachAlertPhotoLayout extends ChatAttachAlert.AttachAlertLayou
parentAlert.selectedMenuItem.addSubItem(group, LocaleController.getString("SendWithoutGrouping", R.string.SendWithoutGrouping));
parentAlert.selectedMenuItem.addSubItem(compress, LocaleController.getString("SendWithoutCompression", R.string.SendWithoutCompression));
parentAlert.selectedMenuItem.addSubItem(open_in, R.drawable.msg_openin, LocaleController.getString("OpenInExternalApp", R.string.OpenInExternalApp));
parentAlert.selectedMenuItem.addSubItem(open_in, R.drawable.baseline_open_in_browser_24, LocaleController.getString("OpenInExternalApp", R.string.OpenInExternalApp));
gridView = new RecyclerListView(context) {
@Override
@ -650,7 +651,7 @@ public class ChatAttachAlertPhotoLayout extends ChatAttachAlert.AttachAlertLayou
recordTime = new TextView(context);
recordTime.setBackgroundResource(R.drawable.system);
recordTime.getBackground().setColorFilter(new PorterDuffColorFilter(0x66000000, PorterDuff.Mode.MULTIPLY));
recordTime.getBackground().setColorFilter(new PorterDuffColorFilter(0x66000000, PorterDuff.Mode.SRC_IN));
recordTime.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 15);
recordTime.setTypeface(AndroidUtilities.getTypeface("fonts/rmedium.ttf"));
recordTime.setAlpha(0.0f);
@ -1589,7 +1590,7 @@ public class ChatAttachAlertPhotoLayout extends ChatAttachAlert.AttachAlertLayou
cameraView.setClipToOutline(true);
}
cameraView.setContentDescription(LocaleController.getString("AccDescrInstantCamera", R.string.AccDescrInstantCamera));
parentAlert.getContainer().addView(cameraView, 1, new FrameLayout.LayoutParams(itemSize, itemSize));
parentAlert.getContainer().addView(cameraView, 1, new LinearLayout.LayoutParams(itemSize, itemSize));
cameraView.setDelegate(new CameraView.CameraViewDelegate() {
@Override
public void onCameraCreated(Camera camera) {
@ -1669,7 +1670,7 @@ public class ChatAttachAlertPhotoLayout extends ChatAttachAlert.AttachAlertLayou
cameraIcon.setWillNotDraw(false);
cameraIcon.setClipChildren(true);
}
parentAlert.getContainer().addView(cameraIcon, 2, new FrameLayout.LayoutParams(itemSize, itemSize));
parentAlert.getContainer().addView(cameraIcon, 2, new LinearLayout.LayoutParams(itemSize, itemSize));
cameraView.setAlpha(mediaEnabled ? 1.0f : 0.2f);
cameraView.setEnabled(mediaEnabled);
@ -1864,7 +1865,7 @@ public class ChatAttachAlertPhotoLayout extends ChatAttachAlert.AttachAlertLayou
zoomControlHideRunnable = null;
}
if (animated) {
FrameLayout.LayoutParams layoutParams = (FrameLayout.LayoutParams) cameraView.getLayoutParams();
LinearLayout.LayoutParams layoutParams = (LinearLayout.LayoutParams) cameraView.getLayoutParams();
animateCameraValues[0] = layoutParams.topMargin = (int) cameraView.getTranslationY();
cameraView.setLayoutParams(layoutParams);
cameraView.setTranslationY(0);
@ -1966,7 +1967,7 @@ public class ChatAttachAlertPhotoLayout extends ChatAttachAlert.AttachAlertLayou
cameraView.setTranslationX(0);
cameraView.setTranslationY(0);
}
FrameLayout.LayoutParams layoutParams = (FrameLayout.LayoutParams) cameraView.getLayoutParams();
LinearLayout.LayoutParams layoutParams = (LinearLayout.LayoutParams) cameraView.getLayoutParams();
layoutParams.width = (int) (startWidth + (endWidth - startWidth) * value);
layoutParams.height = (int) (startHeight + (endHeight - startHeight) * value);
if (value != 0) {
@ -2088,16 +2089,16 @@ public class ChatAttachAlertPhotoLayout extends ChatAttachAlert.AttachAlertLayou
int finalWidth = itemSize - cameraViewOffsetX;
int finalHeight = itemSize - cameraViewOffsetY - cameraViewOffsetBottomY;
FrameLayout.LayoutParams layoutParams;
LinearLayout.LayoutParams layoutParams;
if (!cameraOpened) {
cameraView.setClipTop(cameraViewOffsetY);
cameraView.setClipBottom(cameraViewOffsetBottomY);
layoutParams = (FrameLayout.LayoutParams) cameraView.getLayoutParams();
layoutParams = (LinearLayout.LayoutParams) cameraView.getLayoutParams();
if (layoutParams.height != finalHeight || layoutParams.width != finalWidth) {
layoutParams.width = finalWidth;
layoutParams.height = finalHeight;
cameraView.setLayoutParams(layoutParams);
final FrameLayout.LayoutParams layoutParamsFinal = layoutParams;
final LinearLayout.LayoutParams layoutParamsFinal = layoutParams;
AndroidUtilities.runOnUIThread(() -> {
if (cameraView != null) {
cameraView.setLayoutParams(layoutParamsFinal);
@ -2106,12 +2107,12 @@ public class ChatAttachAlertPhotoLayout extends ChatAttachAlert.AttachAlertLayou
}
}
layoutParams = (FrameLayout.LayoutParams) cameraIcon.getLayoutParams();
layoutParams = (LinearLayout.LayoutParams) cameraIcon.getLayoutParams();
if (layoutParams.height != finalHeight || layoutParams.width != finalWidth) {
layoutParams.width = finalWidth;
layoutParams.height = finalHeight;
cameraIcon.setLayoutParams(layoutParams);
final FrameLayout.LayoutParams layoutParamsFinal = layoutParams;
final LinearLayout.LayoutParams layoutParamsFinal = layoutParams;
AndroidUtilities.runOnUIThread(() -> {
if (cameraIcon != null) {
cameraIcon.setLayoutParams(layoutParamsFinal);
@ -2328,7 +2329,7 @@ public class ChatAttachAlertPhotoLayout extends ChatAttachAlert.AttachAlertLayou
gridView.setGlowColor(Theme.getColor(Theme.key_dialogScrollGlow));
RecyclerView.ViewHolder holder = gridView.findViewHolderForAdapterPosition(0);
if (holder != null && holder.itemView instanceof PhotoAttachCameraCell) {
((PhotoAttachCameraCell) holder.itemView).getImageView().setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_dialogCameraIcon), PorterDuff.Mode.MULTIPLY));
((PhotoAttachCameraCell) holder.itemView).getImageView().setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_dialogCameraIcon), PorterDuff.Mode.SRC_IN));
}
dropDown.setTextColor(Theme.getColor(Theme.key_dialogTextBlack));

View File

@ -792,8 +792,8 @@ public class ChatAttachAlertPollLayout extends ChatAttachAlert.AttachAlertLayout
textCell.setColors(null, Theme.key_windowBackgroundWhiteBlueText4);
Drawable drawable1 = mContext.getResources().getDrawable(R.drawable.poll_add_circle);
Drawable drawable2 = mContext.getResources().getDrawable(R.drawable.poll_add_plus);
drawable1.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_switchTrackChecked), PorterDuff.Mode.MULTIPLY));
drawable2.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_checkboxCheck), PorterDuff.Mode.MULTIPLY));
drawable1.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_switchTrackChecked), PorterDuff.Mode.SRC_IN));
drawable2.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_checkboxCheck), PorterDuff.Mode.SRC_IN));
CombinedDrawable combinedDrawable = new CombinedDrawable(drawable1, drawable2);
textCell.setTextAndIcon(LocaleController.getString("AddAnOption", R.string.AddAnOption), combinedDrawable, false);
break;

View File

@ -88,7 +88,7 @@ public class ChatBigEmptyView extends LinearLayout {
addView(linearLayout, LayoutHelper.createLinear(LayoutHelper.WRAP_CONTENT, LayoutHelper.WRAP_CONTENT, LocaleController.isRTL ? Gravity.RIGHT : Gravity.LEFT, 0, 8, 0, 0));
ImageView imageView = new ImageView(context);
imageView.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_chat_serviceText), PorterDuff.Mode.MULTIPLY));
imageView.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_chat_serviceText), PorterDuff.Mode.SRC_IN));
if (type == EMPTY_VIEW_TYPE_SECRET) {
imageView.setImageResource(R.drawable.ic_lock_white);
} else if (type == EMPTY_VIEW_TYPE_SAVED) {
@ -171,7 +171,7 @@ public class ChatBigEmptyView extends LinearLayout {
textViews.get(a).setTextColor(color);
}
for (int a = 0; a < imageViews.size(); a++) {
imageViews.get(a).setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_chat_serviceText), PorterDuff.Mode.MULTIPLY));
imageViews.get(a).setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_chat_serviceText), PorterDuff.Mode.SRC_IN));
}
}

View File

@ -137,7 +137,7 @@ public class CheckBox extends View {
public void setColor(int backgroundColor, int checkColor) {
color = backgroundColor;
checkDrawable.setColorFilter(new PorterDuffColorFilter(checkColor, PorterDuff.Mode.MULTIPLY));
checkDrawable.setColorFilter(new PorterDuffColorFilter(checkColor, PorterDuff.Mode.SRC_IN));
textPaint.setColor(checkColor);
invalidate();
}
@ -148,7 +148,7 @@ public class CheckBox extends View {
}
public void setCheckColor(int checkColor) {
checkDrawable.setColorFilter(new PorterDuffColorFilter(checkColor, PorterDuff.Mode.MULTIPLY));
checkDrawable.setColorFilter(new PorterDuffColorFilter(checkColor, PorterDuff.Mode.SRC_IN));
textPaint.setColor(checkColor);
invalidate();
}

View File

@ -263,7 +263,7 @@ public class ColorPicker extends FrameLayout {
exchangeButton = new ImageView(getContext());
exchangeButton.setBackground(Theme.createSelectorDrawable(Theme.getColor(Theme.key_dialogButtonSelector), 1));
exchangeButton.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_windowBackgroundWhiteBlackText), PorterDuff.Mode.MULTIPLY));
exchangeButton.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_windowBackgroundWhiteBlackText), PorterDuff.Mode.SRC_IN));
exchangeButton.setScaleType(ImageView.ScaleType.CENTER);
exchangeButton.setVisibility(GONE);
exchangeButton.setOnClickListener(v -> {
@ -287,7 +287,7 @@ public class ColorPicker extends FrameLayout {
clearButton = new ImageView(getContext());
clearButton.setBackground(Theme.createSelectorDrawable(Theme.getColor(Theme.key_dialogButtonSelector), 1));
clearButton.setImageDrawable(new CloseProgressDrawable2());
clearButton.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_windowBackgroundWhiteBlackText), PorterDuff.Mode.MULTIPLY));
clearButton.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_windowBackgroundWhiteBlackText), PorterDuff.Mode.SRC_IN));
clearButton.setScaleType(ImageView.ScaleType.CENTER);
clearButton.setVisibility(GONE);
clearButton.setOnClickListener(v -> {
@ -343,9 +343,9 @@ public class ColorPicker extends FrameLayout {
menuItem.setLongClickEnabled(false);
menuItem.setIcon(R.drawable.ic_ab_other);
menuItem.setContentDescription(LocaleController.getString("AccDescrMoreOptions", R.string.AccDescrMoreOptions));
menuItem.addSubItem(item_edit, R.drawable.msg_edit, LocaleController.getString("OpenInEditor", R.string.OpenInEditor));
menuItem.addSubItem(item_share, R.drawable.msg_share, LocaleController.getString("ShareTheme", R.string.ShareTheme));
menuItem.addSubItem(item_delete, R.drawable.msg_delete, LocaleController.getString("DeleteTheme", R.string.DeleteTheme));
menuItem.addSubItem(item_edit, R.drawable.baseline_edit_24, LocaleController.getString("OpenInEditor", R.string.OpenInEditor));
menuItem.addSubItem(item_share, R.drawable.baseline_forward_24, LocaleController.getString("ShareTheme", R.string.ShareTheme));
menuItem.addSubItem(item_delete, R.drawable.baseline_delete_24, LocaleController.getString("DeleteTheme", R.string.DeleteTheme));
menuItem.setMenuYOffset(-AndroidUtilities.dp(80));
menuItem.setSubMenuOpenSide(2);
menuItem.setDelegate(id -> {
@ -496,7 +496,7 @@ public class ColorPicker extends FrameLayout {
LinearGradient gradientShader = new LinearGradient(0, 0, width, 0, new int[]{Color.RED, Color.YELLOW, Color.GREEN, Color.CYAN, Color.BLUE, Color.MAGENTA, Color.RED}, null, Shader.TileMode.CLAMP);
LinearGradient alphaShader = new LinearGradient(0, (height / 3), 0, height, new int[]{Color.WHITE, Color.TRANSPARENT}, null, Shader.TileMode.CLAMP);
ComposeShader composeShader = new ComposeShader(alphaShader, gradientShader, PorterDuff.Mode.MULTIPLY);
ComposeShader composeShader = new ComposeShader(alphaShader, gradientShader, PorterDuff.Mode.SRC_IN);
colorWheelPaint.setShader(composeShader);

View File

@ -123,7 +123,7 @@ public class CropRotationWheel extends FrameLayout {
}
public void setAspectLock(boolean enabled) {
aspectRatioButton.setColorFilter(enabled ? new PorterDuffColorFilter(0xff51bdf3, PorterDuff.Mode.MULTIPLY) : null);
aspectRatioButton.setColorFilter(enabled ? new PorterDuffColorFilter(0xff51bdf3, PorterDuff.Mode.SRC_IN) : null);
}
@Override

View File

@ -136,13 +136,13 @@ public class EditTextEmoji extends FrameLayout implements NotificationCenter.Not
}
emojiButton = new ImageView(context);
emojiButton.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_chat_messagePanelIcons), PorterDuff.Mode.MULTIPLY));
emojiButton.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_chat_messagePanelIcons), PorterDuff.Mode.SRC_IN));
emojiButton.setScaleType(ImageView.ScaleType.CENTER_INSIDE);
if (style == STYLE_FRAGMENT) {
emojiButton.setImageResource(R.drawable.smiles_tab_smiles);
addView(emojiButton, LayoutHelper.createFrame(48, 48, Gravity.CENTER_VERTICAL | (LocaleController.isRTL ? Gravity.LEFT : Gravity.RIGHT), 0, 0, 0, 7));
} else {
emojiButton.setImageResource(R.drawable.input_smile);
emojiButton.setImageResource(R.drawable.baseline_emoticon_24);
addView(emojiButton, LayoutHelper.createFrame(48, 48, Gravity.CENTER_VERTICAL | Gravity.LEFT, 0, 0, 0, 0));
}
if (Build.VERSION.SDK_INT >= 21) {
@ -246,7 +246,7 @@ public class EditTextEmoji extends FrameLayout implements NotificationCenter.Not
editText.setHintTextColor(Theme.getColor(Theme.key_dialogTextHint));
editText.setTextColor(Theme.getColor(Theme.key_dialogTextBlack));
}
emojiButton.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_chat_messagePanelIcons), PorterDuff.Mode.MULTIPLY));
emojiButton.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_chats_menuItemText), PorterDuff.Mode.SRC_IN));
if (emojiView != null) {
emojiView.updateColors();
}
@ -353,7 +353,7 @@ public class EditTextEmoji extends FrameLayout implements NotificationCenter.Not
if (sizeNotifierLayout != null) {
emojiPadding = currentHeight;
sizeNotifierLayout.requestLayout();
emojiButton.setImageResource(R.drawable.input_keyboard);
emojiButton.setImageResource(R.drawable.baseline_keyboard_24);
onWindowSizeChanged();
}
} else {
@ -361,7 +361,7 @@ public class EditTextEmoji extends FrameLayout implements NotificationCenter.Not
if (currentStyle == STYLE_FRAGMENT) {
emojiButton.setImageResource(R.drawable.smiles_tab_smiles);
} else {
emojiButton.setImageResource(R.drawable.input_smile);
emojiButton.setImageResource(R.drawable.baseline_emoticon_24);
}
}
if (emojiView != null) {
@ -431,7 +431,7 @@ public class EditTextEmoji extends FrameLayout implements NotificationCenter.Not
@Override
public void onClearEmojiRecent() {
AlertDialog.Builder builder = new AlertDialog.Builder(getContext());
builder.setTitle(LocaleController.getString("AppName", R.string.AppName));
builder.setTitle(LocaleController.getString("NekoX", R.string.NekoX));
builder.setMessage(LocaleController.getString("ClearRecentEmoji", R.string.ClearRecentEmoji));
builder.setPositiveButton(LocaleController.getString("ClearButton", R.string.ClearButton).toUpperCase(), (dialogInterface, i) -> emojiView.clearRecentEmoji());
builder.setNegativeButton(LocaleController.getString("Cancel", R.string.Cancel), null);
@ -458,10 +458,10 @@ public class EditTextEmoji extends FrameLayout implements NotificationCenter.Not
if (height > AndroidUtilities.dp(50) && keyboardVisible && !AndroidUtilities.isInMultiwindow && !AndroidUtilities.isTablet()) {
if (isWidthGreater) {
keyboardHeightLand = height;
MessagesController.getGlobalEmojiSettings().edit().putInt("kbd_height_land3", keyboardHeightLand).commit();
MessagesController.getGlobalEmojiSettings().edit().putInt("kbd_height_land3", keyboardHeightLand).apply();
} else {
keyboardHeight = height;
MessagesController.getGlobalEmojiSettings().edit().putInt("kbd_height", keyboardHeight).commit();
MessagesController.getGlobalEmojiSettings().edit().putInt("kbd_height", keyboardHeight).apply();
}
}

View File

@ -720,7 +720,7 @@ public class EmbedBottomSheet extends BottomSheet {
pipButton.setImageResource(R.drawable.video_pip);
pipButton.setEnabled(false);
pipButton.setAlpha(0.5f);
pipButton.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_dialogTextBlue4), PorterDuff.Mode.MULTIPLY));
pipButton.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_dialogTextBlue4), PorterDuff.Mode.SRC_IN));
pipButton.setBackgroundDrawable(Theme.createSelectorDrawable(Theme.getColor(Theme.key_dialogButtonSelector), 0));
imageButtonsContainer.addView(pipButton, LayoutHelper.createFrame(48, 48, Gravity.TOP | Gravity.LEFT, 0, 0, 4, 0));
pipButton.setOnClickListener(v -> {
@ -790,7 +790,7 @@ public class EmbedBottomSheet extends BottomSheet {
ImageView copyButton = new ImageView(context);
copyButton.setScaleType(ImageView.ScaleType.CENTER);
copyButton.setImageResource(R.drawable.video_copy);
copyButton.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_dialogTextBlue4), PorterDuff.Mode.MULTIPLY));
copyButton.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_dialogTextBlue4), PorterDuff.Mode.SRC_IN));
copyButton.setBackgroundDrawable(Theme.createSelectorDrawable(Theme.getColor(Theme.key_dialogButtonSelector), 0));
imageButtonsContainer.addView(copyButton, LayoutHelper.createFrame(48, 48, Gravity.TOP | Gravity.LEFT));
copyButton.setOnClickListener(copyClickListener);

View File

@ -427,7 +427,7 @@ public class EmojiView extends FrameLayout implements NotificationCenter.Notific
searchIconImageView = new ImageView(context);
searchIconImageView.setScaleType(ImageView.ScaleType.CENTER);
searchIconImageView.setImageResource(R.drawable.smiles_inputsearch);
searchIconImageView.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_chat_emojiSearchIcon), PorterDuff.Mode.MULTIPLY));
searchIconImageView.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_chat_emojiSearchIcon), PorterDuff.Mode.SRC_IN));
addView(searchIconImageView, LayoutHelper.createFrame(36, 36, Gravity.LEFT | Gravity.TOP, 16, 14, 0, 0));
clearSearchImageView = new ImageView(context);
@ -437,7 +437,7 @@ public class EmojiView extends FrameLayout implements NotificationCenter.Notific
clearSearchImageView.setScaleX(0.1f);
clearSearchImageView.setScaleY(0.1f);
clearSearchImageView.setAlpha(0.0f);
clearSearchImageView.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_chat_emojiSearchIcon), PorterDuff.Mode.MULTIPLY));
clearSearchImageView.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_chat_emojiSearchIcon), PorterDuff.Mode.SRC_IN));
addView(clearSearchImageView, LayoutHelper.createFrame(36, 36, Gravity.RIGHT | Gravity.TOP, 14, 14, 14, 0));
clearSearchImageView.setOnClickListener(v -> {
searchEditText.setText("");
@ -1781,7 +1781,7 @@ public class EmojiView extends FrameLayout implements NotificationCenter.Notific
}
};
backspaceButton.setImageResource(R.drawable.smiles_tab_clear);
backspaceButton.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_chat_emojiPanelBackspace), PorterDuff.Mode.MULTIPLY));
backspaceButton.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_chat_emojiPanelBackspace), PorterDuff.Mode.SRC_IN));
backspaceButton.setScaleType(ImageView.ScaleType.CENTER);
backspaceButton.setContentDescription(LocaleController.getString("AccDescrBackspace", R.string.AccDescrBackspace));
backspaceButton.setFocusable(true);
@ -1818,7 +1818,7 @@ public class EmojiView extends FrameLayout implements NotificationCenter.Notific
stickerSettingsButton = new ImageView(context);
stickerSettingsButton.setImageResource(R.drawable.smiles_tab_settings);
stickerSettingsButton.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_chat_emojiPanelBackspace), PorterDuff.Mode.MULTIPLY));
stickerSettingsButton.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_chat_emojiPanelBackspace), PorterDuff.Mode.SRC_IN));
stickerSettingsButton.setScaleType(ImageView.ScaleType.CENTER);
stickerSettingsButton.setFocusable(true);
if (Build.VERSION.SDK_INT >= 21) {
@ -1905,7 +1905,7 @@ public class EmojiView extends FrameLayout implements NotificationCenter.Notific
searchButton = new ImageView(context);
searchButton.setImageResource(R.drawable.smiles_tab_search);
searchButton.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_chat_emojiPanelBackspace), PorterDuff.Mode.MULTIPLY));
searchButton.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_chat_emojiPanelBackspace), PorterDuff.Mode.SRC_IN));
searchButton.setScaleType(ImageView.ScaleType.CENTER);
searchButton.setContentDescription(LocaleController.getString("Search", R.string.Search));
searchButton.setFocusable(true);
@ -1943,7 +1943,7 @@ public class EmojiView extends FrameLayout implements NotificationCenter.Notific
Drawable drawable = Theme.createSimpleSelectorCircleDrawable(AndroidUtilities.dp(56), Theme.getColor(Theme.key_chat_emojiPanelBackground), Theme.getColor(Theme.key_chat_emojiPanelBackground));
if (Build.VERSION.SDK_INT < 21) {
Drawable shadowDrawable = context.getResources().getDrawable(R.drawable.floating_shadow).mutate();
shadowDrawable.setColorFilter(new PorterDuffColorFilter(0xff000000, PorterDuff.Mode.MULTIPLY));
shadowDrawable.setColorFilter(new PorterDuffColorFilter(0xff000000, PorterDuff.Mode.SRC_IN));
CombinedDrawable combinedDrawable = new CombinedDrawable(shadowDrawable, drawable, 0, 0);
combinedDrawable.setIconSize(AndroidUtilities.dp(40), AndroidUtilities.dp(40));
drawable = combinedDrawable;
@ -2772,7 +2772,7 @@ public class EmojiView extends FrameLayout implements NotificationCenter.Notific
}
if (currentPage != newPage) {
currentPage = newPage;
MessagesController.getGlobalEmojiSettings().edit().putInt("selected_page", newPage).commit();
MessagesController.getGlobalEmojiSettings().edit().putInt("selected_page", newPage).apply();
}
}
@ -3074,7 +3074,7 @@ public class EmojiView extends FrameLayout implements NotificationCenter.Notific
if (AndroidUtilities.isInMultiwindow || forseMultiwindowLayout) {
Drawable background = getBackground();
if (background != null) {
background.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_chat_emojiPanelBackground), PorterDuff.Mode.MULTIPLY));
background.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_chat_emojiPanelBackground), PorterDuff.Mode.SRC_IN));
}
} else {
setBackgroundColor(Theme.getColor(Theme.key_chat_emojiPanelBackground));
@ -3105,8 +3105,8 @@ public class EmojiView extends FrameLayout implements NotificationCenter.Notific
}
searchField.backgroundView.setBackgroundColor(Theme.getColor(Theme.key_chat_emojiPanelBackground));
searchField.shadowView.setBackgroundColor(Theme.getColor(Theme.key_chat_emojiPanelShadowLine));
searchField.clearSearchImageView.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_chat_emojiSearchIcon), PorterDuff.Mode.MULTIPLY));
searchField.searchIconImageView.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_chat_emojiSearchIcon), PorterDuff.Mode.MULTIPLY));
searchField.clearSearchImageView.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_chat_emojiSearchIcon), PorterDuff.Mode.SRC_IN));
searchField.searchIconImageView.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_chat_emojiSearchIcon), PorterDuff.Mode.SRC_IN));
Theme.setDrawableColorByKey(searchField.searchBackground.getBackground(), Theme.key_chat_emojiSearchBackground);
searchField.searchBackground.invalidate();
searchField.searchEditText.setHintTextColor(Theme.getColor(Theme.key_chat_emojiSearchIcon));
@ -3132,17 +3132,17 @@ public class EmojiView extends FrameLayout implements NotificationCenter.Notific
gifTabs.setBackgroundColor(Theme.getColor(Theme.key_chat_emojiPanelBackground));
}
if (backspaceButton != null) {
backspaceButton.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_chat_emojiPanelBackspace), PorterDuff.Mode.MULTIPLY));
backspaceButton.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_chat_emojiPanelBackspace), PorterDuff.Mode.SRC_IN));
if (emojiSearchField == null) {
Theme.setSelectorDrawableColor(backspaceButton.getBackground(), Theme.getColor(Theme.key_chat_emojiPanelBackground), false);
Theme.setSelectorDrawableColor(backspaceButton.getBackground(), Theme.getColor(Theme.key_chat_emojiPanelBackground), true);
}
}
if (stickerSettingsButton != null) {
stickerSettingsButton.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_chat_emojiPanelBackspace), PorterDuff.Mode.MULTIPLY));
stickerSettingsButton.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_chat_emojiPanelBackspace), PorterDuff.Mode.SRC_IN));
}
if (searchButton != null) {
searchButton.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_chat_emojiPanelBackspace), PorterDuff.Mode.MULTIPLY));
searchButton.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_chat_emojiPanelBackspace), PorterDuff.Mode.SRC_IN));
}
if (shadowLine != null) {
shadowLine.setBackgroundColor(Theme.getColor(Theme.key_chat_emojiPanelShadowLine));
@ -3152,7 +3152,7 @@ public class EmojiView extends FrameLayout implements NotificationCenter.Notific
mediaBanTooltip.setTextColor(Theme.getColor(Theme.key_chat_gifSaveHintText));
}
if (gifSearchAdapter != null) {
gifSearchAdapter.progressEmptyView.imageView.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_chat_emojiPanelEmptyText), PorterDuff.Mode.MULTIPLY));
gifSearchAdapter.progressEmptyView.imageView.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_chat_emojiPanelEmptyText), PorterDuff.Mode.SRC_IN));
gifSearchAdapter.progressEmptyView.textView.setTextColor(Theme.getColor(Theme.key_chat_emojiPanelEmptyText));
gifSearchAdapter.progressEmptyView.progressView.setProgressColor(Theme.getColor(Theme.key_progressCircle));
}
@ -3186,7 +3186,7 @@ public class EmojiView extends FrameLayout implements NotificationCenter.Notific
setElevation(AndroidUtilities.dp(2));
}
setBackgroundResource(R.drawable.smiles_popup);
getBackground().setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_chat_emojiPanelBackground), PorterDuff.Mode.MULTIPLY));
getBackground().setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_chat_emojiPanelBackground), PorterDuff.Mode.SRC_IN));
if (needEmojiSearch) {
bottomTabContainerBackground.setBackgroundDrawable(null);
}
@ -3711,7 +3711,7 @@ public class EmojiView extends FrameLayout implements NotificationCenter.Notific
delegate.onStickersGroupClick(info.id);
}
} else {
MessagesController.getEmojiSettings(currentAccount).edit().putLong("group_hide_stickers_" + info.id, info.stickerset != null ? info.stickerset.id : 0).commit();
MessagesController.getEmojiSettings(currentAccount).edit().putLong("group_hide_stickers_" + info.id, info.stickerset != null ? info.stickerset.id : 0).apply();
updateStickerTabs();
if (stickersGridAdapter != null) {
stickersGridAdapter.notifyDataSetChanged();
@ -4069,7 +4069,7 @@ public class EmojiView extends FrameLayout implements NotificationCenter.Notific
ImageView imageView = new ImageView(getContext());
imageView.setScaleType(ImageView.ScaleType.CENTER);
imageView.setImageResource(R.drawable.smiles_panel_question);
imageView.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_chat_emojiPanelEmptyText), PorterDuff.Mode.MULTIPLY));
imageView.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_chat_emojiPanelEmptyText), PorterDuff.Mode.SRC_IN));
frameLayout.addView(imageView, LayoutHelper.createFrame(48, 48, Gravity.BOTTOM | Gravity.RIGHT));
imageView.setOnClickListener(new OnClickListener() {
@Override
@ -4949,7 +4949,7 @@ public class EmojiView extends FrameLayout implements NotificationCenter.Notific
imageView = new ImageView(getContext());
imageView.setScaleType(ImageView.ScaleType.CENTER);
imageView.setImageResource(R.drawable.gif_empty);
imageView.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_chat_emojiPanelEmptyText), PorterDuff.Mode.MULTIPLY));
imageView.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_chat_emojiPanelEmptyText), PorterDuff.Mode.SRC_IN));
addView(imageView, LayoutHelper.createFrame(LayoutHelper.WRAP_CONTENT, LayoutHelper.WRAP_CONTENT, Gravity.CENTER, 0, 0, 0, 59));
textView = new TextView(getContext());
@ -5308,7 +5308,7 @@ public class EmojiView extends FrameLayout implements NotificationCenter.Notific
ImageView imageView = new ImageView(context);
imageView.setScaleType(ImageView.ScaleType.CENTER);
imageView.setImageResource(R.drawable.stickers_empty);
imageView.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_chat_emojiPanelEmptyText), PorterDuff.Mode.MULTIPLY));
imageView.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_chat_emojiPanelEmptyText), PorterDuff.Mode.SRC_IN));
frameLayout.addView(imageView, LayoutHelper.createFrame(LayoutHelper.WRAP_CONTENT, LayoutHelper.WRAP_CONTENT, Gravity.CENTER, 0, 0, 0, 59));
TextView textView = new TextView(context);

View File

@ -77,7 +77,7 @@ public class EmptyTextProgressView extends FrameLayout {
} else {
Drawable drawable = getContext().getResources().getDrawable(resId).mutate();
if (drawable != null) {
drawable.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_emptyListPlaceholder), PorterDuff.Mode.MULTIPLY));
drawable.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_emptyListPlaceholder), PorterDuff.Mode.SRC_IN));
}
textView.setCompoundDrawablesWithIntrinsicBounds(null, drawable, null, null);
textView.setCompoundDrawablePadding(AndroidUtilities.dp(1));

View File

@ -389,32 +389,32 @@ public class FiltersListBottomSheet extends BottomSheet implements NotificationC
public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) {
BottomSheet.BottomSheetCell cell = (BottomSheet.BottomSheetCell) holder.itemView;
if (position < dialogFilters.size()) {
cell.getImageView().setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_dialogIcon), PorterDuff.Mode.MULTIPLY));
cell.getImageView().setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_dialogIcon), PorterDuff.Mode.SRC_IN));
MessagesController.DialogFilter filter = dialogFilters.get(position);
cell.setTextColor(Theme.getColor(Theme.key_dialogTextBlack));
int icon;
if ((filter.flags & MessagesController.DIALOG_FILTER_FLAG_ALL_CHATS) == (MessagesController.DIALOG_FILTER_FLAG_CONTACTS | MessagesController.DIALOG_FILTER_FLAG_NON_CONTACTS)) {
icon = R.drawable.menu_private;
icon = R.drawable.baseline_person_24;
} else if ((filter.flags & MessagesController.DIALOG_FILTER_FLAG_EXCLUDE_READ) != 0 && (filter.flags & MessagesController.DIALOG_FILTER_FLAG_ALL_CHATS) == MessagesController.DIALOG_FILTER_FLAG_ALL_CHATS) {
icon = R.drawable.menu_unread;
} else if ((filter.flags & MessagesController.DIALOG_FILTER_FLAG_ALL_CHATS) == MessagesController.DIALOG_FILTER_FLAG_CHANNELS) {
icon = R.drawable.menu_broadcast;
icon = R.drawable.baseline_notifications_24;
} else if ((filter.flags & MessagesController.DIALOG_FILTER_FLAG_ALL_CHATS) == MessagesController.DIALOG_FILTER_FLAG_GROUPS) {
icon = R.drawable.menu_groups;
icon = R.drawable.baseline_group_24;
} else if ((filter.flags & MessagesController.DIALOG_FILTER_FLAG_ALL_CHATS) == MessagesController.DIALOG_FILTER_FLAG_CONTACTS) {
icon = R.drawable.menu_contacts;
icon = R.drawable.baseline_contact_phone_24;
} else if ((filter.flags & MessagesController.DIALOG_FILTER_FLAG_ALL_CHATS) == MessagesController.DIALOG_FILTER_FLAG_BOTS) {
icon = R.drawable.menu_bots;
icon = R.drawable.deproko_baseline_bots_24;
} else {
icon = R.drawable.menu_folders;
icon = R.drawable.baseline_folder_24;
}
cell.setTextAndIcon(filter.name, icon);
} else {
cell.getImageView().setColorFilter(null);
Drawable drawable1 = context.getResources().getDrawable(R.drawable.poll_add_circle);
Drawable drawable2 = context.getResources().getDrawable(R.drawable.poll_add_plus);
drawable1.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_switchTrackChecked), PorterDuff.Mode.MULTIPLY));
drawable2.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_checkboxCheck), PorterDuff.Mode.MULTIPLY));
drawable1.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_switchTrackChecked), PorterDuff.Mode.SRC_IN));
drawable2.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_checkboxCheck), PorterDuff.Mode.SRC_IN));
CombinedDrawable combinedDrawable = new CombinedDrawable(drawable1, drawable2);
cell.setTextColor(Theme.getColor(Theme.key_windowBackgroundWhiteBlueText4));
cell.setTextAndIcon(LocaleController.getString("CreateNewFilter", R.string.CreateNewFilter), combinedDrawable);

View File

@ -166,7 +166,7 @@ public class FireworksOverlay extends View {
heartDrawable = new Drawable[heartColors.length];
for (int a = 0; a < heartDrawable.length; a++) {
heartDrawable[a] = ApplicationLoader.applicationContext.getResources().getDrawable(R.drawable.heart_confetti).mutate();
heartDrawable[a].setColorFilter(new PorterDuffColorFilter(heartColors[a], PorterDuff.Mode.MULTIPLY));
heartDrawable[a].setColorFilter(new PorterDuffColorFilter(heartColors[a], PorterDuff.Mode.SRC_IN));
}
}

View File

@ -107,7 +107,7 @@ public class FragmentContextView extends FrameLayout implements NotificationCent
playButton = new ImageView(context);
playButton.setScaleType(ImageView.ScaleType.CENTER);
playButton.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_inappPlayerPlayPause), PorterDuff.Mode.MULTIPLY));
playButton.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_inappPlayerPlayPause), PorterDuff.Mode.SRC_IN));
addView(playButton, LayoutHelper.createFrame(36, 36, Gravity.TOP | Gravity.LEFT));
playButton.setOnClickListener(v -> {
if (currentStyle == 0) {
@ -150,7 +150,7 @@ public class FragmentContextView extends FrameLayout implements NotificationCent
closeButton = new ImageView(context);
closeButton.setImageResource(R.drawable.miniplayer_close);
closeButton.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_inappPlayerClose), PorterDuff.Mode.MULTIPLY));
closeButton.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_inappPlayerClose), PorterDuff.Mode.SRC_IN));
closeButton.setScaleType(ImageView.ScaleType.CENTER);
addView(closeButton, LayoutHelper.createFrame(36, 36, Gravity.RIGHT | Gravity.TOP));
closeButton.setOnClickListener(v -> {
@ -262,9 +262,9 @@ public class FragmentContextView extends FrameLayout implements NotificationCent
}
float currentPlaybackSpeed = MediaController.getInstance().getPlaybackSpeed(isMusic);
if (currentPlaybackSpeed > 1) {
playbackSpeedButton.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_inappPlayerPlayPause), PorterDuff.Mode.MULTIPLY));
playbackSpeedButton.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_inappPlayerPlayPause), PorterDuff.Mode.SRC_IN));
} else {
playbackSpeedButton.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_inappPlayerClose), PorterDuff.Mode.MULTIPLY));
playbackSpeedButton.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_inappPlayerClose), PorterDuff.Mode.SRC_IN));
}
}

View File

@ -194,7 +194,7 @@ public class GroupCreateSpan extends View {
colors[5] = Color.blue(color);
colors[6] = Color.alpha(back);
colors[7] = Color.alpha(color);
deleteDrawable.setColorFilter(new PorterDuffColorFilter(delete, PorterDuff.Mode.MULTIPLY));
deleteDrawable.setColorFilter(new PorterDuffColorFilter(delete, PorterDuff.Mode.SRC_IN));
backPaint.setColor(back);
}

View File

@ -84,13 +84,13 @@ public class HintView extends FrameLayout {
imageView = new ImageView(context);
imageView.setImageResource(R.drawable.tooltip_sound);
imageView.setScaleType(ImageView.ScaleType.CENTER);
imageView.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_chat_gifSaveHintText), PorterDuff.Mode.MULTIPLY));
imageView.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_chat_gifSaveHintText), PorterDuff.Mode.SRC_IN));
addView(imageView, LayoutHelper.createFrame(38, 34, Gravity.LEFT | Gravity.TOP, 7, 7, 0, 0));
}
arrowImageView = new ImageView(context);
arrowImageView.setImageResource(topArrow ? R.drawable.tooltip_arrow_up : R.drawable.tooltip_arrow);
arrowImageView.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_chat_gifSaveHintBackground), PorterDuff.Mode.MULTIPLY));
arrowImageView.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_chat_gifSaveHintBackground), PorterDuff.Mode.SRC_IN));
addView(arrowImageView, LayoutHelper.createFrame(14, 6, Gravity.LEFT | (topArrow ? Gravity.TOP : Gravity.BOTTOM), 0, 0, 0, 0));
}

View File

@ -105,18 +105,18 @@ public class ImageUpdater implements NotificationCenter.NotificationCenterDelega
if (searchAvailable) {
if (hasAvatar) {
items = new CharSequence[]{LocaleController.getString("ChooseTakePhoto", R.string.ChooseTakePhoto), LocaleController.getString("ChooseFromGallery", R.string.ChooseFromGallery), LocaleController.getString("ChooseFromSearch", R.string.ChooseFromSearch), LocaleController.getString("DeletePhoto", R.string.DeletePhoto)};
icons = new int[]{R.drawable.menu_camera, R.drawable.profile_photos, R.drawable.menu_search, R.drawable.chats_delete};
icons = new int[]{R.drawable.deproko_baseline_camera_26, R.drawable.baseline_image_24, R.drawable.baseline_search_24, R.drawable.baseline_delete_24};
} else {
items = new CharSequence[]{LocaleController.getString("ChooseTakePhoto", R.string.ChooseTakePhoto), LocaleController.getString("ChooseFromGallery", R.string.ChooseFromGallery), LocaleController.getString("ChooseFromSearch", R.string.ChooseFromSearch)};
icons = new int[]{R.drawable.menu_camera, R.drawable.profile_photos, R.drawable.menu_search};
icons = new int[]{R.drawable.deproko_baseline_camera_26, R.drawable.baseline_image_24, R.drawable.baseline_search_24};
}
} else {
if (hasAvatar) {
items = new CharSequence[]{LocaleController.getString("ChooseTakePhoto", R.string.ChooseTakePhoto), LocaleController.getString("ChooseFromGallery", R.string.ChooseFromGallery), LocaleController.getString("DeletePhoto", R.string.DeletePhoto)};
icons = new int[]{R.drawable.menu_camera, R.drawable.profile_photos, R.drawable.chats_delete};
icons = new int[]{R.drawable.deproko_baseline_camera_26, R.drawable.baseline_image_24, R.drawable.baseline_delete_24};
} else {
items = new CharSequence[]{LocaleController.getString("ChooseTakePhoto", R.string.ChooseTakePhoto), LocaleController.getString("ChooseFromGallery", R.string.ChooseFromGallery)};
icons = new int[]{R.drawable.menu_camera, R.drawable.profile_photos};
icons = new int[]{R.drawable.deproko_baseline_camera_26, R.drawable.baseline_image_24};
}
}

View File

@ -136,7 +136,7 @@ public class MediaActionDrawable extends Drawable {
paint2.setColor(value | 0xff000000);
paint3.setColor(value | 0xff000000);
textPaint.setColor(value | 0xff000000);
colorFilter = new PorterDuffColorFilter(value, PorterDuff.Mode.MULTIPLY);
colorFilter = new PorterDuffColorFilter(value, PorterDuff.Mode.SRC_IN);
}
public void setBackColor(int value) {

View File

@ -171,7 +171,7 @@ public class PhonebookShareAlert extends BottomSheet {
imageView = new ImageView(context);
imageView.setScaleType(ImageView.ScaleType.CENTER);
imageView.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_windowBackgroundWhiteGrayIcon), PorterDuff.Mode.MULTIPLY));
imageView.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_windowBackgroundWhiteGrayIcon), PorterDuff.Mode.SRC_IN));
addView(imageView, LayoutHelper.createFrame(LayoutHelper.WRAP_CONTENT, LayoutHelper.WRAP_CONTENT, (LocaleController.isRTL ? Gravity.RIGHT : Gravity.LEFT) | Gravity.TOP, LocaleController.isRTL ? 0 : 20, 20, LocaleController.isRTL ? 20 : 0, 0));
if (!isImport) {
@ -1018,19 +1018,19 @@ public class PhonebookShareAlert extends BottomSheet {
int icon;
if (position >= phoneStartRow && position < phoneEndRow) {
item = phones.get(position - phoneStartRow);
icon = R.drawable.menu_calls;
icon = R.drawable.baseline_call_24;
} else {
item = other.get(position - vcardStartRow);
if (item.type == 1) {
icon = R.drawable.menu_mail;
icon = R.drawable.baseline_alternate_email_24;
} else if (item.type == 2) {
icon = R.drawable.menu_location;
icon = R.drawable.baseline_location_on_24;
} else if (item.type == 3) {
icon = R.drawable.msg_link;
icon = R.drawable.baseline_link_24;
} else if (item.type == 4) {
icon = R.drawable.profile_info;
} else if (item.type == 5) {
icon = R.drawable.menu_date;
icon = R.drawable.baseline_date_range_24;
} else if (item.type == 6) {
if ("ORG".equalsIgnoreCase(item.getRawType(true))) {
icon = R.drawable.menu_work;

View File

@ -425,12 +425,12 @@ public class PhotoFilterView extends FrameLayout implements FilterShaders.Filter
tuneItem = new ImageView(context);
tuneItem.setScaleType(ImageView.ScaleType.CENTER);
tuneItem.setImageResource(R.drawable.photo_tools);
tuneItem.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_dialogFloatingButton), PorterDuff.Mode.MULTIPLY));
tuneItem.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_dialogFloatingButton), PorterDuff.Mode.SRC_IN));
tuneItem.setBackgroundDrawable(Theme.createSelectorDrawable(Theme.ACTION_BAR_WHITE_SELECTOR_COLOR));
linearLayout.addView(tuneItem, LayoutHelper.createLinear(56, 48));
tuneItem.setOnClickListener(v -> {
selectedTool = 0;
tuneItem.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_dialogFloatingButton), PorterDuff.Mode.MULTIPLY));
tuneItem.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_dialogFloatingButton), PorterDuff.Mode.SRC_IN));
blurItem.setColorFilter(null);
curveItem.setColorFilter(null);
switchMode();
@ -444,7 +444,7 @@ public class PhotoFilterView extends FrameLayout implements FilterShaders.Filter
blurItem.setOnClickListener(v -> {
selectedTool = 1;
tuneItem.setColorFilter(null);
blurItem.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_dialogFloatingButton), PorterDuff.Mode.MULTIPLY));
blurItem.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_dialogFloatingButton), PorterDuff.Mode.SRC_IN));
curveItem.setColorFilter(null);
switchMode();
});
@ -461,7 +461,7 @@ public class PhotoFilterView extends FrameLayout implements FilterShaders.Filter
selectedTool = 2;
tuneItem.setColorFilter(null);
blurItem.setColorFilter(null);
curveItem.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_dialogFloatingButton), PorterDuff.Mode.MULTIPLY));
curveItem.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_dialogFloatingButton), PorterDuff.Mode.SRC_IN));
switchMode();
});
@ -593,13 +593,13 @@ public class PhotoFilterView extends FrameLayout implements FilterShaders.Filter
doneTextView.setTextColor(Theme.getColor(Theme.key_dialogFloatingButton));
}
if (tuneItem != null && tuneItem.getColorFilter() != null) {
tuneItem.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_dialogFloatingButton), PorterDuff.Mode.MULTIPLY));
tuneItem.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_dialogFloatingButton), PorterDuff.Mode.SRC_IN));
}
if (blurItem != null && blurItem.getColorFilter() != null) {
blurItem.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_dialogFloatingButton), PorterDuff.Mode.MULTIPLY));
blurItem.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_dialogFloatingButton), PorterDuff.Mode.SRC_IN));
}
if (curveItem != null && curveItem.getColorFilter() != null) {
curveItem.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_dialogFloatingButton), PorterDuff.Mode.MULTIPLY));
curveItem.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_dialogFloatingButton), PorterDuff.Mode.SRC_IN));
}
updateSelectedBlurType();
}
@ -607,7 +607,7 @@ public class PhotoFilterView extends FrameLayout implements FilterShaders.Filter
private void updateSelectedBlurType() {
if (blurType == 0) {
Drawable drawable = blurOffButton.getContext().getResources().getDrawable(R.drawable.blur_off).mutate();
drawable.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_dialogFloatingButton), PorterDuff.Mode.MULTIPLY));
drawable.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_dialogFloatingButton), PorterDuff.Mode.SRC_IN));
blurOffButton.setCompoundDrawablesWithIntrinsicBounds(null, drawable, null, null);
blurOffButton.setTextColor(Theme.getColor(Theme.key_dialogFloatingButton));
@ -621,7 +621,7 @@ public class PhotoFilterView extends FrameLayout implements FilterShaders.Filter
blurOffButton.setTextColor(0xffffffff);
Drawable drawable = blurOffButton.getContext().getResources().getDrawable(R.drawable.blur_radial).mutate();
drawable.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_dialogFloatingButton), PorterDuff.Mode.MULTIPLY));
drawable.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_dialogFloatingButton), PorterDuff.Mode.SRC_IN));
blurRadialButton.setCompoundDrawablesWithIntrinsicBounds(null, drawable, null, null);
blurRadialButton.setTextColor(Theme.getColor(Theme.key_dialogFloatingButton));
@ -635,7 +635,7 @@ public class PhotoFilterView extends FrameLayout implements FilterShaders.Filter
blurRadialButton.setTextColor(0xffffffff);
Drawable drawable = blurOffButton.getContext().getResources().getDrawable(R.drawable.blur_linear).mutate();
drawable.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_dialogFloatingButton), PorterDuff.Mode.MULTIPLY));
drawable.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_dialogFloatingButton), PorterDuff.Mode.SRC_IN));
blurLinearButton.setCompoundDrawablesWithIntrinsicBounds(null, drawable, null, null);
blurLinearButton.setTextColor(Theme.getColor(Theme.key_dialogFloatingButton));
}

View File

@ -6,12 +6,15 @@ import android.animation.ObjectAnimator;
import android.annotation.SuppressLint;
import android.app.Activity;
import android.content.Context;
import android.graphics.*;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.PorterDuff;
import android.graphics.PorterDuffColorFilter;
import android.graphics.Rect;
import android.os.Build;
import android.os.Looper;
import android.text.TextUtils;
import android.util.SparseArray;
import android.util.TypedValue;
import android.view.Gravity;
import android.view.KeyEvent;
@ -26,30 +29,28 @@ import android.widget.TextView;
import org.telegram.messenger.AndroidUtilities;
import org.telegram.messenger.Bitmaps;
import org.telegram.messenger.BuildVars;
import org.telegram.messenger.DispatchQueue;
import org.telegram.messenger.FileLoader;
import org.telegram.messenger.FileLog;
import org.telegram.messenger.LocaleController;
import org.telegram.messenger.MessageObject;
import org.telegram.messenger.R;
import org.telegram.messenger.Utilities;
import org.telegram.messenger.VideoEditedInfo;
import org.telegram.tgnet.TLRPC;
import org.telegram.ui.ActionBar.ActionBar;
import org.telegram.ui.ActionBar.ActionBarPopupWindow;
import org.telegram.ui.ActionBar.AlertDialog;
import org.telegram.ui.ActionBar.Theme;
import org.telegram.ui.Components.Paint.Brush;
import org.telegram.ui.Components.Paint.Painting;
import org.telegram.ui.Components.Paint.RenderView;
import org.telegram.ui.Components.Paint.Swatch;
import org.telegram.ui.Components.Paint.UndoStore;
import org.telegram.ui.Components.Paint.Views.ColorPicker;
import org.telegram.ui.Components.Paint.Views.EntitiesContainerView;
import org.telegram.ui.Components.Paint.Views.EntityView;
import org.telegram.ui.Components.Paint.Views.StickerView;
import org.telegram.ui.Components.Paint.Views.TextPaintView;
import org.telegram.ui.Components.Paint.UndoStore;
import org.telegram.ui.Components.Paint.Brush;
import org.telegram.ui.Components.Paint.RenderView;
import org.telegram.ui.Components.Paint.Painting;
import org.telegram.ui.Components.Paint.Swatch;
import org.telegram.ui.Components.Paint.Views.ColorPicker;
import org.telegram.ui.PhotoViewer;
import java.math.BigInteger;
@ -395,7 +396,7 @@ public class PhotoPaintView extends FrameLayout implements EntityView.EntityView
setCurrentSwatch(brushSwatch, true);
brushSwatch = null;
}
paintButton.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_dialogFloatingButton), PorterDuff.Mode.MULTIPLY));
paintButton.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_dialogFloatingButton), PorterDuff.Mode.SRC_IN));
paintButton.setImageResource(R.drawable.photo_paint);
}
@ -404,7 +405,7 @@ public class PhotoPaintView extends FrameLayout implements EntityView.EntityView
public void updateColors() {
if (paintButton != null && paintButton.getColorFilter() != null) {
paintButton.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_dialogFloatingButton), PorterDuff.Mode.MULTIPLY));
paintButton.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_dialogFloatingButton), PorterDuff.Mode.SRC_IN));
}
if (doneTextView != null) {
doneTextView.setTextColor(Theme.getColor(Theme.key_dialogFloatingButton));
@ -1152,7 +1153,7 @@ public class PhotoPaintView extends FrameLayout implements EntityView.EntityView
ImageView check = new ImageView(getContext());
check.setImageResource(R.drawable.ic_ab_done);
check.setScaleType(ImageView.ScaleType.CENTER);
check.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_dialogFloatingButton), PorterDuff.Mode.MULTIPLY));
check.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_dialogFloatingButton), PorterDuff.Mode.SRC_IN));
button.addView(check, LayoutHelper.createFrame(50, LayoutHelper.MATCH_PARENT));
}
@ -1220,7 +1221,7 @@ public class PhotoPaintView extends FrameLayout implements EntityView.EntityView
ImageView check = new ImageView(getContext());
check.setImageResource(R.drawable.msg_text_check);
check.setScaleType(ImageView.ScaleType.CENTER);
check.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_radioBackgroundChecked), PorterDuff.Mode.MULTIPLY));
check.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_radioBackgroundChecked), PorterDuff.Mode.SRC_IN));
button.addView(check, LayoutHelper.createFrame(50, LayoutHelper.MATCH_PARENT));
}

View File

@ -103,7 +103,7 @@ public class PhotoViewerCaptionEnterView extends FrameLayout implements Notifica
textFieldContainer.addView(frameLayout, LayoutHelper.createLinear(0, LayoutHelper.WRAP_CONTENT, 1.0f));
emojiButton = new ImageView(context);
emojiButton.setImageResource(R.drawable.input_smile);
emojiButton.setImageResource(R.drawable.baseline_emoticon_24);
emojiButton.setScaleType(ImageView.ScaleType.CENTER_INSIDE);
emojiButton.setPadding(AndroidUtilities.dp(4), AndroidUtilities.dp(1), 0, 0);
emojiButton.setAlpha(0.58f);
@ -495,12 +495,12 @@ public class PhotoViewerCaptionEnterView extends FrameLayout implements Notifica
if (sizeNotifierLayout != null) {
emojiPadding = currentHeight;
sizeNotifierLayout.requestLayout();
emojiButton.setImageResource(R.drawable.input_keyboard);
emojiButton.setImageResource(R.drawable.baseline_keyboard_24);
onWindowSizeChanged();
}
} else {
if (emojiButton != null) {
emojiButton.setImageResource(R.drawable.input_smile);
emojiButton.setImageResource(R.drawable.baseline_emoticon_24);
}
if (emojiView != null) {
emojiView.setVisibility(GONE);
@ -566,10 +566,10 @@ public class PhotoViewerCaptionEnterView extends FrameLayout implements Notifica
if (height > AndroidUtilities.dp(50) && keyboardVisible && !AndroidUtilities.isInMultiwindow && !forceFloatingEmoji) {
if (isWidthGreater) {
keyboardHeightLand = height;
MessagesController.getGlobalEmojiSettings().edit().putInt("kbd_height_land3", keyboardHeightLand).commit();
MessagesController.getGlobalEmojiSettings().edit().putInt("kbd_height_land3", keyboardHeightLand).apply();
} else {
keyboardHeight = height;
MessagesController.getGlobalEmojiSettings().edit().putInt("kbd_height", keyboardHeight).commit();
MessagesController.getGlobalEmojiSettings().edit().putInt("kbd_height", keyboardHeight).apply();
}
}

View File

@ -587,7 +587,7 @@ public class PollVotesAlert extends BottomSheet {
updatePlaceholder();
shadowDrawable = context.getResources().getDrawable(R.drawable.sheet_shadow_round).mutate();
shadowDrawable.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_dialogBackground), PorterDuff.Mode.MULTIPLY));
shadowDrawable.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_dialogBackground), PorterDuff.Mode.SRC_IN));
containerView = new FrameLayout(context) {

View File

@ -52,7 +52,7 @@ public class SearchField extends FrameLayout {
searchIconImageView = new ImageView(context);
searchIconImageView.setScaleType(ImageView.ScaleType.CENTER);
searchIconImageView.setImageResource(R.drawable.smiles_inputsearch);
searchIconImageView.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_dialogSearchIcon), PorterDuff.Mode.MULTIPLY));
searchIconImageView.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_dialogSearchIcon), PorterDuff.Mode.SRC_IN));
if (supportRtl) {
lp = LayoutHelper.createFrameRelatively(36, 36, Gravity.START | Gravity.TOP, 16, 11, 0, 0);
} else {
@ -67,7 +67,7 @@ public class SearchField extends FrameLayout {
clearSearchImageView.setScaleX(0.1f);
clearSearchImageView.setScaleY(0.1f);
clearSearchImageView.setAlpha(0.0f);
clearSearchImageView.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_dialogSearchIcon), PorterDuff.Mode.MULTIPLY));
clearSearchImageView.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_dialogSearchIcon), PorterDuff.Mode.SRC_IN));
if (supportRtl) {
lp = LayoutHelper.createFrameRelatively(36, 36, Gravity.END | Gravity.TOP, 14, 11, 14, 0);
} else {

View File

@ -138,7 +138,7 @@ public class ShareAlert extends BottomSheet implements NotificationCenter.Notifi
searchIconImageView = new ImageView(context);
searchIconImageView.setScaleType(ImageView.ScaleType.CENTER);
searchIconImageView.setImageResource(R.drawable.smiles_inputsearch);
searchIconImageView.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_dialogSearchIcon), PorterDuff.Mode.MULTIPLY));
searchIconImageView.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_dialogSearchIcon), PorterDuff.Mode.SRC_IN));
addView(searchIconImageView, LayoutHelper.createFrame(36, 36, Gravity.LEFT | Gravity.TOP, 16, 11, 0, 0));
clearSearchImageView = new ImageView(context);
@ -148,7 +148,7 @@ public class ShareAlert extends BottomSheet implements NotificationCenter.Notifi
clearSearchImageView.setScaleX(0.1f);
clearSearchImageView.setScaleY(0.1f);
clearSearchImageView.setAlpha(0.0f);
clearSearchImageView.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_dialogSearchIcon), PorterDuff.Mode.MULTIPLY));
clearSearchImageView.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_dialogSearchIcon), PorterDuff.Mode.SRC_IN));
addView(clearSearchImageView, LayoutHelper.createFrame(36, 36, Gravity.RIGHT | Gravity.TOP, 14, 11, 14, 0));
clearSearchImageView.setOnClickListener(v -> {
searchEditText.setText("");
@ -257,7 +257,7 @@ public class ShareAlert extends BottomSheet implements NotificationCenter.Notifi
super(context, true);
shadowDrawable = context.getResources().getDrawable(R.drawable.sheet_shadow_round).mutate();
shadowDrawable.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_dialogBackground), PorterDuff.Mode.MULTIPLY));
shadowDrawable.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_dialogBackground), PorterDuff.Mode.SRC_IN));
isFullscreen = fullScreen;
linkToCopy = copyLink;
@ -706,14 +706,14 @@ public class ShareAlert extends BottomSheet implements NotificationCenter.Notifi
Drawable drawable = Theme.createSimpleSelectorCircleDrawable(AndroidUtilities.dp(56), Theme.getColor(Theme.key_dialogFloatingButton), Theme.getColor(Build.VERSION.SDK_INT >= 21 ? Theme.key_dialogFloatingButtonPressed : Theme.key_dialogFloatingButton));
if (Build.VERSION.SDK_INT < 21) {
Drawable shadowDrawable = context.getResources().getDrawable(R.drawable.floating_shadow_profile).mutate();
shadowDrawable.setColorFilter(new PorterDuffColorFilter(0xff000000, PorterDuff.Mode.MULTIPLY));
shadowDrawable.setColorFilter(new PorterDuffColorFilter(0xff000000, PorterDuff.Mode.SRC_IN));
CombinedDrawable combinedDrawable = new CombinedDrawable(shadowDrawable, drawable, 0, 0);
combinedDrawable.setIconSize(AndroidUtilities.dp(56), AndroidUtilities.dp(56));
drawable = combinedDrawable;
}
writeButton.setBackgroundDrawable(drawable);
writeButton.setImageResource(R.drawable.attach_send);
writeButton.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_dialogFloatingIcon), PorterDuff.Mode.MULTIPLY));
writeButton.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_dialogFloatingIcon), PorterDuff.Mode.SRC_IN));
writeButton.setScaleType(ImageView.ScaleType.CENTER);
if (Build.VERSION.SDK_INT >= 21) {
writeButton.setOutlineProvider(new ViewOutlineProvider() {

View File

@ -725,7 +725,7 @@ public class SharedMediaLayout extends FrameLayout implements NotificationCenter
searchWas = false;
pinnedHeaderShadowDrawable = context.getResources().getDrawable(R.drawable.photos_header_shadow);
pinnedHeaderShadowDrawable.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_windowBackgroundGrayShadow), PorterDuff.Mode.MULTIPLY));
pinnedHeaderShadowDrawable.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_windowBackgroundGrayShadow), PorterDuff.Mode.SRC_IN));
if (scrollSlidingTextTabStrip != null) {
initialTab = scrollSlidingTextTabStrip.getCurrentTabId();
@ -920,7 +920,7 @@ public class SharedMediaLayout extends FrameLayout implements NotificationCenter
forwardItem.setOnClickListener(v -> onActionBarItemClick(forward));
}
deleteItem = new ActionBarMenuItem(context, null, Theme.getColor(Theme.key_actionBarActionModeDefaultSelector), Theme.getColor(Theme.key_windowBackgroundWhiteGrayText2), false);
deleteItem.setIcon(R.drawable.msg_delete);
deleteItem.setIcon(R.drawable.baseline_delete_24);
deleteItem.setContentDescription(LocaleController.getString("Delete", R.string.Delete));
deleteItem.setDuplicateParentStateEnabled(false);
actionModeLayout.addView(deleteItem, new LinearLayout.LayoutParams(AndroidUtilities.dp(54), ViewGroup.LayoutParams.MATCH_PARENT));
@ -3856,7 +3856,7 @@ public class SharedMediaLayout extends FrameLayout implements NotificationCenter
@Override
public int getItemCount() {
return chatInfo != null ? chatInfo.participants.participants.size() : 0;
return (chatInfo != null && chatInfo.participants != null) ? chatInfo.participants.participants.size() : 0;
}
@Override

View File

@ -64,7 +64,7 @@ public class SharingLocationsAlert extends BottomSheet implements NotificationCe
delegate = sharingLocationsAlertDelegate;
shadowDrawable = context.getResources().getDrawable(R.drawable.sheet_shadow_round).mutate();
shadowDrawable.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_dialogBackground), PorterDuff.Mode.MULTIPLY));
shadowDrawable.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_dialogBackground), PorterDuff.Mode.SRC_IN));
containerView = new FrameLayout(context) {

View File

@ -172,7 +172,7 @@ public class StickerMasksAlert extends BottomSheet implements NotificationCenter
ImageView searchIconImageView = new ImageView(context);
searchIconImageView.setScaleType(ImageView.ScaleType.CENTER);
searchIconImageView.setImageResource(R.drawable.smiles_inputsearch);
searchIconImageView.setColorFilter(new PorterDuffColorFilter(0xff777777, PorterDuff.Mode.MULTIPLY));
searchIconImageView.setColorFilter(new PorterDuffColorFilter(0xff777777, PorterDuff.Mode.SRC_IN));
addView(searchIconImageView, LayoutHelper.createFrame(36, 36, Gravity.LEFT | Gravity.TOP, 16, 14, 0, 0));
clearSearchImageView = new ImageView(context);
@ -182,7 +182,7 @@ public class StickerMasksAlert extends BottomSheet implements NotificationCenter
clearSearchImageView.setScaleX(0.1f);
clearSearchImageView.setScaleY(0.1f);
clearSearchImageView.setAlpha(0.0f);
clearSearchImageView.setColorFilter(new PorterDuffColorFilter(0xff777777, PorterDuff.Mode.MULTIPLY));
clearSearchImageView.setColorFilter(new PorterDuffColorFilter(0xff777777, PorterDuff.Mode.SRC_IN));
addView(clearSearchImageView, LayoutHelper.createFrame(36, 36, Gravity.RIGHT | Gravity.TOP, 14, 14, 14, 0));
clearSearchImageView.setOnClickListener(v -> {
searchEditText.setText("");
@ -294,7 +294,7 @@ public class StickerMasksAlert extends BottomSheet implements NotificationCenter
MediaDataController.getInstance(currentAccount).loadRecents(MediaDataController.TYPE_FAVE, false, true, false);
shadowDrawable = context.getResources().getDrawable(R.drawable.sheet_shadow_round).mutate();
shadowDrawable.setColorFilter(new PorterDuffColorFilter(0xff252525, PorterDuff.Mode.MULTIPLY));
shadowDrawable.setColorFilter(new PorterDuffColorFilter(0xff252525, PorterDuff.Mode.SRC_IN));
containerView = new SizeNotifierFrameLayout(context, false) {
@ -1481,7 +1481,7 @@ public class StickerMasksAlert extends BottomSheet implements NotificationCenter
ImageView imageView = new ImageView(context);
imageView.setScaleType(ImageView.ScaleType.CENTER);
imageView.setImageResource(R.drawable.stickers_empty);
imageView.setColorFilter(new PorterDuffColorFilter(0xff949ba1, PorterDuff.Mode.MULTIPLY));
imageView.setColorFilter(new PorterDuffColorFilter(0xff949ba1, PorterDuff.Mode.SRC_IN));
frameLayout.addView(imageView, LayoutHelper.createFrame(LayoutHelper.WRAP_CONTENT, LayoutHelper.WRAP_CONTENT, Gravity.CENTER, 0, 0, 0, 50));
TextView textView = new TextView(context);

View File

@ -289,7 +289,7 @@ public class Switch extends View {
if (icon != 0) {
iconDrawable = getResources().getDrawable(icon).mutate();
if (iconDrawable != null) {
iconDrawable.setColorFilter(new PorterDuffColorFilter(lastIconColor = Theme.getColor(isChecked ? trackCheckedColorKey : trackColorKey), PorterDuff.Mode.MULTIPLY));
iconDrawable.setColorFilter(new PorterDuffColorFilter(lastIconColor = Theme.getColor(isChecked ? trackCheckedColorKey : trackColorKey), PorterDuff.Mode.SRC_IN));
}
} else {
iconDrawable = null;
@ -400,7 +400,7 @@ public class Switch extends View {
color1 = Theme.getColor(trackColorKey);
color2 = Theme.getColor(trackCheckedColorKey);
if (a == 0 && iconDrawable != null && lastIconColor != (isChecked ? color2 : color1)) {
iconDrawable.setColorFilter(new PorterDuffColorFilter(lastIconColor = (isChecked ? color2 : color1), PorterDuff.Mode.MULTIPLY));
iconDrawable.setColorFilter(new PorterDuffColorFilter(lastIconColor = (isChecked ? color2 : color1), PorterDuff.Mode.SRC_IN));
}
r1 = Color.red(color1);

View File

@ -172,7 +172,7 @@ public class ThemeEditorView {
ImageView searchIconImageView = new ImageView(context);
searchIconImageView.setScaleType(ImageView.ScaleType.CENTER);
searchIconImageView.setImageResource(R.drawable.smiles_inputsearch);
searchIconImageView.setColorFilter(new PorterDuffColorFilter(0xffa1a8af, PorterDuff.Mode.MULTIPLY));
searchIconImageView.setColorFilter(new PorterDuffColorFilter(0xffa1a8af, PorterDuff.Mode.SRC_IN));
addView(searchIconImageView, LayoutHelper.createFrame(36, 36, Gravity.LEFT | Gravity.TOP, 16, 11, 0, 0));
clearSearchImageView = new ImageView(context);
@ -183,7 +183,7 @@ public class ThemeEditorView {
clearSearchImageView.setScaleX(0.1f);
clearSearchImageView.setScaleY(0.1f);
clearSearchImageView.setAlpha(0.0f);
clearSearchImageView.setColorFilter(new PorterDuffColorFilter(0xffa1a8af, PorterDuff.Mode.MULTIPLY));
clearSearchImageView.setColorFilter(new PorterDuffColorFilter(0xffa1a8af, PorterDuff.Mode.SRC_IN));
addView(clearSearchImageView, LayoutHelper.createFrame(36, 36, Gravity.RIGHT | Gravity.TOP, 14, 11, 14, 0));
clearSearchImageView.setOnClickListener(v -> {
searchEditText.setText("");

View File

@ -77,9 +77,9 @@ public class VideoTimelinePlayView extends View {
paint2 = new Paint();
paint2.setColor(0x7f000000);
drawableLeft = context.getResources().getDrawable(R.drawable.video_cropleft);
drawableLeft.setColorFilter(new PorterDuffColorFilter(0xff000000, PorterDuff.Mode.MULTIPLY));
drawableLeft.setColorFilter(new PorterDuffColorFilter(0xff000000, PorterDuff.Mode.SRC_IN));
drawableRight = context.getResources().getDrawable(R.drawable.video_cropright);
drawableRight.setColorFilter(new PorterDuffColorFilter(0xff000000, PorterDuff.Mode.MULTIPLY));
drawableRight.setColorFilter(new PorterDuffColorFilter(0xff000000, PorterDuff.Mode.SRC_IN));
}
public float getProgress() {

View File

@ -573,7 +573,7 @@ public class VideoTimelineView extends View {
public void updateColors() {
tooltipPaint.setColor(Theme.getColor(Theme.key_chat_gifSaveHintText));
tooltipBackground = Theme.createRoundRectDrawable(AndroidUtilities.dp(5), Theme.getColor(Theme.key_chat_gifSaveHintBackground));
tooltipBackgroundArrow.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_chat_gifSaveHintBackground), PorterDuff.Mode.MULTIPLY));
tooltipBackgroundArrow.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_chat_gifSaveHintBackground), PorterDuff.Mode.SRC_IN));
}
public void setCx(float v) {

View File

@ -67,7 +67,7 @@ public class WallpaperUpdater {
icons = null;
} else {
items = new CharSequence[]{LocaleController.getString("ChooseTakePhoto", R.string.ChooseTakePhoto), LocaleController.getString("SelectFromGallery", R.string.SelectFromGallery)};
icons = new int[]{R.drawable.menu_camera, R.drawable.profile_photos};
icons = new int[]{R.drawable.deproko_baseline_camera_26, R.drawable.baseline_image_24};
}
builder.setItems(items, icons, (dialogInterface, i) -> {

View File

@ -547,7 +547,7 @@ public class DarkTheme{
public static Drawable getThemedDrawable(Context context, int resId, String key) {
Drawable drawable = context.getResources().getDrawable(resId).mutate();
drawable.setColorFilter(new PorterDuffColorFilter(getColor(key), PorterDuff.Mode.MULTIPLY));
drawable.setColorFilter(new PorterDuffColorFilter(getColor(key), PorterDuff.Mode.SRC_IN));
return drawable;
}

View File

@ -586,13 +586,13 @@ public class ContactsActivity extends BaseFragment implements NotificationCenter
Drawable drawable = Theme.createSimpleSelectorCircleDrawable(AndroidUtilities.dp(56), Theme.getColor(Theme.key_chats_actionBackground), Theme.getColor(Theme.key_chats_actionPressedBackground));
if (Build.VERSION.SDK_INT < 21) {
Drawable shadowDrawable = context.getResources().getDrawable(R.drawable.floating_shadow).mutate();
shadowDrawable.setColorFilter(new PorterDuffColorFilter(0xff000000, PorterDuff.Mode.MULTIPLY));
shadowDrawable.setColorFilter(new PorterDuffColorFilter(0xff000000, PorterDuff.Mode.SRC_IN));
CombinedDrawable combinedDrawable = new CombinedDrawable(shadowDrawable, drawable, 0, 0);
combinedDrawable.setIconSize(AndroidUtilities.dp(56), AndroidUtilities.dp(56));
drawable = combinedDrawable;
}
floatingButton.setBackgroundDrawable(drawable);
floatingButton.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_chats_actionIcon), PorterDuff.Mode.MULTIPLY));
floatingButton.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_chats_actionIcon), PorterDuff.Mode.SRC_IN));
floatingButton.setImageResource(R.drawable.add_contact_new);
floatingButtonContainer.setContentDescription(LocaleController.getString("CreateNewContact", R.string.CreateNewContact));
if (Build.VERSION.SDK_INT >= 21) {

View File

@ -151,7 +151,7 @@ public class ContentPreviewViewer {
if (delegate != null) {
if (delegate.needSend() && !delegate.isInScheduleMode()) {
items.add(LocaleController.getString("SendStickerPreview", R.string.SendStickerPreview));
icons.add(R.drawable.outline_send);
icons.add(R.drawable.deproko_baseline_send_24);
actions.add(0);
}
if (delegate.needSend() && !delegate.isInScheduleMode()) {
@ -161,7 +161,7 @@ public class ContentPreviewViewer {
}
if (delegate.canSchedule()) {
items.add(LocaleController.getString("Schedule", R.string.Schedule));
icons.add(R.drawable.msg_timer);
icons.add(R.drawable.baseline_timer_24);
actions.add(3);
}
if (currentStickerSet != null && delegate.needOpen()) {
@ -177,7 +177,7 @@ public class ContentPreviewViewer {
}
if (isRecentSticker) {
items.add(LocaleController.getString("DeleteFromRecent", R.string.DeleteFromRecent));
icons.add(R.drawable.msg_delete);
icons.add(R.drawable.baseline_delete_24);
actions.add(4);
}
if (items.isEmpty()) {
@ -244,17 +244,17 @@ public class ContentPreviewViewer {
if (delegate.needSend() && !delegate.isInScheduleMode()) {
items.add(LocaleController.getString("SendGifPreview", R.string.SendGifPreview));
icons.add(R.drawable.outline_send);
icons.add(R.drawable.deproko_baseline_send_24);
actions.add(0);
}
if (delegate.needSend() && !delegate.isInScheduleMode()) {
items.add(LocaleController.getString("SendWithoutSound", R.string.SendWithoutSound));
icons.add(R.drawable.input_notify_off);
icons.add(R.drawable.baseline_notifications_off_24);
actions.add(100);
}
if (delegate.canSchedule()) {
items.add(LocaleController.getString("Schedule", R.string.Schedule));
icons.add(R.drawable.msg_timer);
icons.add(R.drawable.baseline_timer_24);
actions.add(3);
}
@ -262,11 +262,11 @@ public class ContentPreviewViewer {
if (currentDocument != null) {
if (canDelete = MediaDataController.getInstance(currentAccount).hasRecentGif(currentDocument)) {
items.add(LocaleController.formatString("Delete", R.string.Delete));
icons.add(R.drawable.msg_delete);
icons.add(R.drawable.baseline_delete_24);
actions.add(1);
} else {
items.add(LocaleController.formatString("SaveToGIFs", R.string.SaveToGIFs));
icons.add(R.drawable.outline_add_gif);
icons.add(R.drawable.deproko_baseline_gif_24);
actions.add(2);
}
} else {

View File

@ -996,10 +996,10 @@ public class FilterCreateActivity extends BaseFragment {
textCell.setTextAndIcon(LocaleController.formatPluralString("FilterShowMoreChats", newNeverShow.size() - 5), R.drawable.arrow_more, false);
} else if (position == includeAddRow) {
textCell.setColors(Theme.key_switchTrackChecked, Theme.key_windowBackgroundWhiteBlueText4);
textCell.setTextAndIcon(LocaleController.getString("FilterAddChats", R.string.FilterAddChats), R.drawable.actions_addchat, position + 1 != includeSectionRow);
textCell.setTextAndIcon(LocaleController.getString("FilterAddChats", R.string.FilterAddChats), R.drawable.baseline_person_add_24, position + 1 != includeSectionRow);
} else if (position == excludeAddRow) {
textCell.setColors(Theme.key_switchTrackChecked, Theme.key_windowBackgroundWhiteBlueText4);
textCell.setTextAndIcon(LocaleController.getString("FilterRemoveChats", R.string.FilterRemoveChats), R.drawable.actions_addchat, position + 1 != excludeSectionRow);
textCell.setTextAndIcon(LocaleController.getString("FilterRemoveChats", R.string.FilterRemoveChats), R.drawable.baseline_person_add_24, position + 1 != excludeSectionRow);
}
break;
}

View File

@ -427,7 +427,7 @@ public class FilterUsersActivity extends BaseFragment implements NotificationCen
ActionBarMenu menu = actionBar.createMenu();
ActionBarMenuItem headerItem = menu.addItem(0, R.drawable.ic_ab_other);
headerItem.setContentDescription(LocaleController.getString("AccDescrMoreOptions", R.string.AccDescrMoreOptions));
headerItem.addSubItem(2, R.drawable.group_admin, LocaleController.getString("CheckAllAdministrated", R.string.CheckAllAdministrated));
headerItem.addSubItem(2, R.drawable.baseline_stars_24, LocaleController.getString("CheckAllAdministrated", R.string.CheckAllAdministrated));
}
fragmentView = new ViewGroup(context) {
@ -735,13 +735,13 @@ public class FilterUsersActivity extends BaseFragment implements NotificationCen
Drawable drawable = Theme.createSimpleSelectorCircleDrawable(AndroidUtilities.dp(56), Theme.getColor(Theme.key_chats_actionBackground), Theme.getColor(Theme.key_chats_actionPressedBackground));
if (Build.VERSION.SDK_INT < 21) {
Drawable shadowDrawable = context.getResources().getDrawable(R.drawable.floating_shadow).mutate();
shadowDrawable.setColorFilter(new PorterDuffColorFilter(0xff000000, PorterDuff.Mode.MULTIPLY));
shadowDrawable.setColorFilter(new PorterDuffColorFilter(0xff000000, PorterDuff.Mode.SRC_IN));
CombinedDrawable combinedDrawable = new CombinedDrawable(shadowDrawable, drawable, 0, 0);
combinedDrawable.setIconSize(AndroidUtilities.dp(56), AndroidUtilities.dp(56));
drawable = combinedDrawable;
}
floatingButton.setBackgroundDrawable(drawable);
floatingButton.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_chats_actionIcon), PorterDuff.Mode.MULTIPLY));
floatingButton.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_chats_actionIcon), PorterDuff.Mode.SRC_IN));
floatingButton.setImageResource(R.drawable.floating_check);
if (Build.VERSION.SDK_INT >= 21) {
StateListAnimator animator = new StateListAnimator();

View File

@ -734,13 +734,13 @@ public class GroupCreateActivity extends BaseFragment implements NotificationCen
Drawable drawable = Theme.createSimpleSelectorCircleDrawable(AndroidUtilities.dp(56), Theme.getColor(Theme.key_chats_actionBackground), Theme.getColor(Theme.key_chats_actionPressedBackground));
if (Build.VERSION.SDK_INT < 21) {
Drawable shadowDrawable = context.getResources().getDrawable(R.drawable.floating_shadow).mutate();
shadowDrawable.setColorFilter(new PorterDuffColorFilter(0xff000000, PorterDuff.Mode.MULTIPLY));
shadowDrawable.setColorFilter(new PorterDuffColorFilter(0xff000000, PorterDuff.Mode.SRC_IN));
CombinedDrawable combinedDrawable = new CombinedDrawable(shadowDrawable, drawable, 0, 0);
combinedDrawable.setIconSize(AndroidUtilities.dp(56), AndroidUtilities.dp(56));
drawable = combinedDrawable;
}
floatingButton.setBackgroundDrawable(drawable);
floatingButton.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_chats_actionIcon), PorterDuff.Mode.MULTIPLY));
floatingButton.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_chats_actionIcon), PorterDuff.Mode.SRC_IN));
if (isNeverShare || isAlwaysShare || addToGroup) {
floatingButton.setImageResource(R.drawable.floating_check);
} else {

View File

@ -503,7 +503,7 @@ public class GroupCreateFinalActivity extends BaseFragment implements Notificati
Drawable drawable = Theme.createSimpleSelectorCircleDrawable(AndroidUtilities.dp(56), Theme.getColor(Theme.key_chats_actionBackground), Theme.getColor(Theme.key_chats_actionPressedBackground));
if (Build.VERSION.SDK_INT < 21) {
Drawable shadowDrawable = context.getResources().getDrawable(R.drawable.floating_shadow).mutate();
shadowDrawable.setColorFilter(new PorterDuffColorFilter(0xff000000, PorterDuff.Mode.MULTIPLY));
shadowDrawable.setColorFilter(new PorterDuffColorFilter(0xff000000, PorterDuff.Mode.SRC_IN));
CombinedDrawable combinedDrawable = new CombinedDrawable(shadowDrawable, drawable, 0, 0);
combinedDrawable.setIconSize(AndroidUtilities.dp(56), AndroidUtilities.dp(56));
drawable = combinedDrawable;
@ -549,7 +549,7 @@ public class GroupCreateFinalActivity extends BaseFragment implements Notificati
floatingButtonIcon = new ImageView(context);
floatingButtonIcon.setScaleType(ImageView.ScaleType.CENTER);
floatingButtonIcon.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_chats_actionIcon), PorterDuff.Mode.MULTIPLY));
floatingButtonIcon.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_chats_actionIcon), PorterDuff.Mode.SRC_IN));
floatingButtonIcon.setImageResource(R.drawable.checkbig);
floatingButtonIcon.setPadding(0, AndroidUtilities.dp(2), 0, 0);
floatingButtonContainer.setContentDescription(LocaleController.getString("Done", R.string.Done));

View File

@ -267,7 +267,7 @@ public class GroupStickersActivity extends BaseFragment implements NotificationC
eraseImageView.setScaleType(ImageView.ScaleType.CENTER);
eraseImageView.setImageResource(R.drawable.ic_close_white);
eraseImageView.setPadding(AndroidUtilities.dp(16), 0, 0, 0);
eraseImageView.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_windowBackgroundWhiteGrayText3), PorterDuff.Mode.MULTIPLY));
eraseImageView.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_windowBackgroundWhiteGrayText3), PorterDuff.Mode.SRC_IN));
eraseImageView.setVisibility(View.INVISIBLE);
eraseImageView.setOnClickListener(v -> {
searchWas = false;

View File

@ -745,7 +745,7 @@ public class InviteContactsActivity extends BaseFragment implements Notification
switch (viewType) {
case 1:
view = new InviteTextCell(context);
((InviteTextCell) view).setTextAndIcon(LocaleController.getString("ShareTelegram", R.string.ShareTelegram), R.drawable.share);
((InviteTextCell) view).setTextAndIcon(LocaleController.getString("ShareTelegram", R.string.ShareTelegram), R.drawable.baseline_share_24);
break;
default:
view = new InviteUserCell(context, true);

View File

@ -291,7 +291,7 @@ public class LocationActivity extends BaseFragment implements NotificationCenter
lastPressedMarkerView = new FrameLayout(context);
lastPressedMarkerView.setBackgroundResource(R.drawable.venue_tooltip);
lastPressedMarkerView.getBackground().setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_dialogBackground), PorterDuff.Mode.MULTIPLY));
lastPressedMarkerView.getBackground().setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_dialogBackground), PorterDuff.Mode.SRC_IN));
frameLayout.addView(lastPressedMarkerView, LayoutHelper.createFrame(LayoutHelper.WRAP_CONTENT, 71));
lastPressedMarkerView.setAlpha(0.0f);
lastPressedMarkerView.setOnClickListener(v -> {
@ -519,9 +519,9 @@ public class LocationActivity extends BaseFragment implements NotificationCenter
actionBar.setTitle(LocaleController.getString("ChatLocation", R.string.ChatLocation));
}
otherItem = menu.addItem(0, R.drawable.ic_ab_other);
otherItem.addSubItem(open_in, R.drawable.msg_openin, LocaleController.getString("OpenInExternalApp", R.string.OpenInExternalApp));
otherItem.addSubItem(open_in, R.drawable.baseline_open_in_browser_24, LocaleController.getString("OpenInExternalApp", R.string.OpenInExternalApp));
if (!getLocationController().isSharingLocation(dialogId)) {
otherItem.addSubItem(share_live_location, R.drawable.menu_location, LocaleController.getString("SendLiveLocationMenu", R.string.SendLiveLocationMenu));
otherItem.addSubItem(share_live_location, R.drawable.baseline_location_on_24, LocaleController.getString("SendLiveLocationMenu", R.string.SendLiveLocationMenu));
}
otherItem.setContentDescription(LocaleController.getString("AccDescrMoreOptions", R.string.AccDescrMoreOptions));
}
@ -614,7 +614,7 @@ public class LocationActivity extends BaseFragment implements NotificationCenter
fragmentView.setBackgroundColor(Theme.getColor(Theme.key_dialogBackground));
shadowDrawable = context.getResources().getDrawable(R.drawable.sheet_shadow_round).mutate();
shadowDrawable.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_dialogBackground), PorterDuff.Mode.MULTIPLY));
shadowDrawable.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_dialogBackground), PorterDuff.Mode.SRC_IN));
Rect padding = new Rect();
shadowDrawable.getPadding(padding);
@ -643,7 +643,7 @@ public class LocationActivity extends BaseFragment implements NotificationCenter
Drawable drawable = Theme.createSimpleSelectorRoundRectDrawable(AndroidUtilities.dp(40), Theme.getColor(Theme.key_location_actionBackground), Theme.getColor(Theme.key_location_actionPressedBackground));
if (Build.VERSION.SDK_INT < 21) {
Drawable shadowDrawable = context.getResources().getDrawable(R.drawable.places_btn).mutate();
shadowDrawable.setColorFilter(new PorterDuffColorFilter(0xff000000, PorterDuff.Mode.MULTIPLY));
shadowDrawable.setColorFilter(new PorterDuffColorFilter(0xff000000, PorterDuff.Mode.SRC_IN));
CombinedDrawable combinedDrawable = new CombinedDrawable(shadowDrawable, drawable, AndroidUtilities.dp(2), AndroidUtilities.dp(2));
combinedDrawable.setFullsize(true);
drawable = combinedDrawable;
@ -688,7 +688,7 @@ public class LocationActivity extends BaseFragment implements NotificationCenter
Drawable drawable = Theme.createSimpleSelectorCircleDrawable(AndroidUtilities.dp(40), Theme.getColor(Theme.key_location_actionBackground), Theme.getColor(Theme.key_location_actionPressedBackground));
if (Build.VERSION.SDK_INT < 21) {
Drawable shadowDrawable = context.getResources().getDrawable(R.drawable.floating_shadow_profile).mutate();
shadowDrawable.setColorFilter(new PorterDuffColorFilter(0xff000000, PorterDuff.Mode.MULTIPLY));
shadowDrawable.setColorFilter(new PorterDuffColorFilter(0xff000000, PorterDuff.Mode.SRC_IN));
CombinedDrawable combinedDrawable = new CombinedDrawable(shadowDrawable, drawable, 0, 0);
combinedDrawable.setIconSize(AndroidUtilities.dp(40), AndroidUtilities.dp(40));
drawable = combinedDrawable;
@ -745,7 +745,7 @@ public class LocationActivity extends BaseFragment implements NotificationCenter
drawable = Theme.createSimpleSelectorCircleDrawable(AndroidUtilities.dp(40), Theme.getColor(Theme.key_location_actionBackground), Theme.getColor(Theme.key_location_actionPressedBackground));
if (Build.VERSION.SDK_INT < 21) {
Drawable shadowDrawable = context.getResources().getDrawable(R.drawable.floating_shadow_profile).mutate();
shadowDrawable.setColorFilter(new PorterDuffColorFilter(0xff000000, PorterDuff.Mode.MULTIPLY));
shadowDrawable.setColorFilter(new PorterDuffColorFilter(0xff000000, PorterDuff.Mode.SRC_IN));
CombinedDrawable combinedDrawable = new CombinedDrawable(shadowDrawable, drawable, 0, 0);
combinedDrawable.setIconSize(AndroidUtilities.dp(40), AndroidUtilities.dp(40));
drawable = combinedDrawable;
@ -765,7 +765,7 @@ public class LocationActivity extends BaseFragment implements NotificationCenter
locationButton.setBackgroundDrawable(drawable);
locationButton.setImageResource(R.drawable.location_current);
locationButton.setScaleType(ImageView.ScaleType.CENTER);
locationButton.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_location_actionActiveIcon), PorterDuff.Mode.MULTIPLY));
locationButton.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_location_actionActiveIcon), PorterDuff.Mode.SRC_IN));
locationButton.setTag(Theme.key_location_actionActiveIcon);
locationButton.setContentDescription(LocaleController.getString("AccDescrMyLocation", R.string.AccDescrMyLocation));
FrameLayout.LayoutParams layoutParams1 = LayoutHelper.createFrame(Build.VERSION.SDK_INT >= 21 ? 40 : 44, Build.VERSION.SDK_INT >= 21 ? 40 : 44, Gravity.RIGHT | Gravity.BOTTOM, 0, 0, 12, 12);
@ -788,7 +788,7 @@ public class LocationActivity extends BaseFragment implements NotificationCenter
}
} else {
if (myLocation != null && mapView != null) {
locationButton.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_location_actionActiveIcon), PorterDuff.Mode.MULTIPLY));
locationButton.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_location_actionActiveIcon), PorterDuff.Mode.SRC_IN));
locationButton.setTag(Theme.key_location_actionActiveIcon);
adapter.setCustomLocation(null);
userLocationMoved = false;
@ -817,7 +817,7 @@ public class LocationActivity extends BaseFragment implements NotificationCenter
emptyImageView = new ImageView(context);
emptyImageView.setImageResource(R.drawable.location_empty);
emptyImageView.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_dialogEmptyImage), PorterDuff.Mode.MULTIPLY));
emptyImageView.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_dialogEmptyImage), PorterDuff.Mode.SRC_IN));
emptyView.addView(emptyImageView, LayoutHelper.createLinear(LayoutHelper.WRAP_CONTENT, LayoutHelper.WRAP_CONTENT));
emptyTitleTextView = new TextView(context);
@ -1019,7 +1019,7 @@ public class LocationActivity extends BaseFragment implements NotificationCenter
}
if (ev.getAction() == MotionEvent.ACTION_MOVE) {
if (!userLocationMoved) {
locationButton.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_location_actionIcon), PorterDuff.Mode.MULTIPLY));
locationButton.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_location_actionIcon), PorterDuff.Mode.SRC_IN));
locationButton.setTag(Theme.key_location_actionIcon);
userLocationMoved = true;
}
@ -1154,7 +1154,7 @@ public class LocationActivity extends BaseFragment implements NotificationCenter
if (messageObject == null && chatLocation == null && initialLocation != null) {
userLocationMoved = true;
locationButton.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_location_actionIcon), PorterDuff.Mode.MULTIPLY));
locationButton.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_location_actionIcon), PorterDuff.Mode.SRC_IN));
locationButton.setTag(Theme.key_location_actionIcon);
}
@ -1346,7 +1346,7 @@ public class LocationActivity extends BaseFragment implements NotificationCenter
public boolean onMarkerClick(Marker marker, MapView mapView) {
markerImageView.setVisibility(View.INVISIBLE);
if (!userLocationMoved) {
locationButton.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_location_actionIcon), PorterDuff.Mode.MULTIPLY));
locationButton.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_location_actionIcon), PorterDuff.Mode.SRC_IN));
locationButton.setTag(Theme.key_location_actionIcon);
userLocationMoved = true;
}
@ -2159,7 +2159,7 @@ public class LocationActivity extends BaseFragment implements NotificationCenter
mapTypeButton.setPopupItemsColor(Theme.getColor(Theme.key_actionBarDefaultSubmenuItemIcon), true);
mapTypeButton.setPopupItemsColor(Theme.getColor(Theme.key_actionBarDefaultSubmenuItem), false);
shadowDrawable.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_dialogBackground), PorterDuff.Mode.MULTIPLY));
shadowDrawable.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_dialogBackground), PorterDuff.Mode.SRC_IN));
shadow.invalidate();
if (mapView != null) {

View File

@ -18,6 +18,9 @@ import android.view.ViewGroup;
import android.widget.FrameLayout;
import android.widget.TextView;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import org.telegram.messenger.AndroidUtilities;
import org.telegram.messenger.DownloadController;
import org.telegram.messenger.LocaleController;
@ -41,9 +44,6 @@ import org.telegram.ui.Components.RecyclerListView;
import java.util.ArrayList;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
public class LogoutActivity extends BaseFragment {
private ListAdapter listAdapter;
@ -196,15 +196,15 @@ public class LogoutActivity extends BaseFragment {
case 1: {
TextDetailSettingsCell view = (TextDetailSettingsCell) holder.itemView;
if (position == addAccountRow) {
view.setTextAndValueAndIcon(LocaleController.getString("AddAnotherAccount", R.string.AddAnotherAccount), LocaleController.getString("AddAnotherAccountInfo", R.string.AddAnotherAccountInfo), R.drawable.actions_addmember2, true);
view.setTextAndValueAndIcon(LocaleController.getString("AddAnotherAccount", R.string.AddAnotherAccount), LocaleController.getString("AddAnotherAccountInfo", R.string.AddAnotherAccountInfo), R.drawable.baseline_person_add_24, true);
} else if (position == passcodeRow) {
view.setTextAndValueAndIcon(LocaleController.getString("SetPasscode", R.string.SetPasscode), LocaleController.getString("SetPasscodeInfo", R.string.SetPasscodeInfo), R.drawable.menu_passcode, true);
view.setTextAndValueAndIcon(LocaleController.getString("SetPasscode", R.string.SetPasscode), LocaleController.getString("SetPasscodeInfo", R.string.SetPasscodeInfo), R.drawable.baseline_vpn_key_24, true);
} else if (position == cacheRow) {
view.setTextAndValueAndIcon(LocaleController.getString("ClearCache", R.string.ClearCache), LocaleController.getString("ClearCacheInfo", R.string.ClearCacheInfo), R.drawable.menu_clearcache, true);
view.setTextAndValueAndIcon(LocaleController.getString("ClearCache", R.string.ClearCache), LocaleController.getString("ClearCacheInfo", R.string.ClearCacheInfo), R.drawable.baseline_delete_sweep_24, true);
} else if (position == phoneRow) {
view.setTextAndValueAndIcon(LocaleController.getString("ChangePhoneNumber", R.string.ChangePhoneNumber), LocaleController.getString("ChangePhoneNumberInfo", R.string.ChangePhoneNumberInfo), R.drawable.menu_newphone, true);
view.setTextAndValueAndIcon(LocaleController.getString("ChangePhoneNumber", R.string.ChangePhoneNumber), LocaleController.getString("ChangePhoneNumberInfo", R.string.ChangePhoneNumberInfo), R.drawable.baseline_exit_to_app_24, true);
} else if (position == supportRow) {
view.setTextAndValueAndIcon(LocaleController.getString("ContactSupport", R.string.ContactSupport), LocaleController.getString("ContactSupportInfo", R.string.ContactSupportInfo), R.drawable.menu_support, false);
view.setTextAndValueAndIcon(LocaleController.getString("ContactSupport", R.string.ContactSupport), LocaleController.getString("ContactSupportInfo", R.string.ContactSupportInfo), R.drawable.baseline_help_24, false);
}
break;
}

View File

@ -527,7 +527,7 @@ public class MediaActivity extends BaseFragment implements NotificationCenter.No
});
pinnedHeaderShadowDrawable = context.getResources().getDrawable(R.drawable.photos_header_shadow);
pinnedHeaderShadowDrawable.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_windowBackgroundGrayShadow), PorterDuff.Mode.MULTIPLY));
pinnedHeaderShadowDrawable.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_windowBackgroundGrayShadow), PorterDuff.Mode.SRC_IN));
if (scrollSlidingTextTabStrip != null) {
initialTab = scrollSlidingTextTabStrip.getCurrentTabId();
@ -667,7 +667,7 @@ public class MediaActivity extends BaseFragment implements NotificationCenter.No
actionModeViews.add(actionMode.addItemWithWidth(forward_noquote, R.drawable.msg_forward_noquote, AndroidUtilities.dp(54), LocaleController.getString("NoQuoteForward", R.string.NoQuoteForward)));
actionModeViews.add(actionMode.addItemWithWidth(forward, R.drawable.msg_forward, AndroidUtilities.dp(54), LocaleController.getString("Forward", R.string.Forward)));
}
actionModeViews.add(actionMode.addItemWithWidth(delete, R.drawable.msg_delete, AndroidUtilities.dp(54), LocaleController.getString("Delete", R.string.Delete)));
actionModeViews.add(actionMode.addItemWithWidth(delete, R.drawable.baseline_delete_24, AndroidUtilities.dp(54), LocaleController.getString("Delete", R.string.Delete)));
photoVideoAdapter = new SharedPhotoVideoAdapter(context);
documentsAdapter = new SharedDocumentsAdapter(context, 1);

View File

@ -1331,7 +1331,7 @@ public class NotificationsCustomSettingsActivity extends BaseFragment {
case 7: {
TextCell textCell = (TextCell) holder.itemView;
if (position == exceptionsAddRow) {
textCell.setTextAndIcon(LocaleController.getString("NotificationsAddAnException", R.string.NotificationsAddAnException), R.drawable.actions_addmember2, exceptionsStartRow != -1);
textCell.setTextAndIcon(LocaleController.getString("NotificationsAddAnException", R.string.NotificationsAddAnException), R.drawable.baseline_person_add_24, exceptionsStartRow != -1);
textCell.setColors(Theme.key_windowBackgroundWhiteBlueIcon, Theme.key_windowBackgroundWhiteBlueButton);
} else if (position == deleteAllRow) {
textCell.setText(LocaleController.getString("NotificationsDeleteAllException", R.string.NotificationsDeleteAllException), false);

Some files were not shown because too many files have changed in this diff Show More