use of org.telegram.ui.Cells.ProfileSearchCell in project Telegram-FOSS by Telegram-FOSS-Team.
the class SearchAdapter method onBindViewHolder.
@Override
public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) {
switch(holder.getItemViewType()) {
case 0:
{
TLObject object = (TLObject) getItem(position);
if (object != null) {
long id = 0;
String un = null;
boolean self = false;
if (object instanceof TLRPC.User) {
un = ((TLRPC.User) object).username;
id = ((TLRPC.User) object).id;
self = ((TLRPC.User) object).self;
} else if (object instanceof TLRPC.Chat) {
un = ((TLRPC.Chat) object).username;
id = ((TLRPC.Chat) object).id;
}
CharSequence username = null;
CharSequence name = null;
if (position < searchResult.size()) {
name = searchResultNames.get(position);
if (name != null && un != null && un.length() > 0) {
if (name.toString().startsWith("@" + un)) {
username = name;
name = null;
}
}
} else if (position > searchResult.size() && un != null) {
String foundUserName = searchAdapterHelper.getLastFoundUsername();
if (foundUserName != null && foundUserName.startsWith("@")) {
foundUserName = foundUserName.substring(1);
}
try {
int index;
SpannableStringBuilder spannableStringBuilder = new SpannableStringBuilder();
spannableStringBuilder.append("@");
spannableStringBuilder.append(un);
if (foundUserName != null && (index = AndroidUtilities.indexOfIgnoreCase(un, foundUserName)) != -1) {
int len = foundUserName.length();
if (index == 0) {
len++;
} else {
index++;
}
spannableStringBuilder.setSpan(new ForegroundColorSpanThemable(Theme.key_windowBackgroundWhiteBlueText4), index, index + len, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
}
username = spannableStringBuilder;
} catch (Exception e) {
username = un;
FileLog.e(e);
}
}
if (useUserCell) {
UserCell userCell = (UserCell) holder.itemView;
userCell.setData(object, name, username, 0);
if (checkedMap != null) {
userCell.setChecked(checkedMap.indexOfKey(id) >= 0, false);
}
} else {
ProfileSearchCell profileSearchCell = (ProfileSearchCell) holder.itemView;
if (self) {
name = LocaleController.getString("SavedMessages", R.string.SavedMessages);
}
profileSearchCell.setData(object, null, name, username, false, self);
profileSearchCell.useSeparator = (position != getItemCount() - 1 && position != searchResult.size() - 1);
/*if (ignoreUsers != null) {
if (ignoreUsers.containsKey(id)) {
profileSearchCell.drawAlpha = 0.5f;
} else {
profileSearchCell.drawAlpha = 1.0f;
}
}*/
}
}
break;
}
case 1:
{
GraySectionCell cell = (GraySectionCell) holder.itemView;
if (getItem(position) == null) {
cell.setText(LocaleController.getString("GlobalSearch", R.string.GlobalSearch));
} else {
cell.setText(LocaleController.getString("PhoneNumberSearch", R.string.PhoneNumberSearch));
}
break;
}
case 2:
{
String str = (String) getItem(position);
TextCell cell = (TextCell) holder.itemView;
cell.setColors(null, Theme.key_windowBackgroundWhiteBlueText2);
cell.setText(LocaleController.formatString("AddContactByPhone", R.string.AddContactByPhone, PhoneFormat.getInstance().format("+" + str)), false);
break;
}
}
}
use of org.telegram.ui.Cells.ProfileSearchCell in project Telegram-FOSS by Telegram-FOSS-Team.
the class SharedMediaLayout method getThemeDescriptions.
public ArrayList<ThemeDescription> getThemeDescriptions() {
ArrayList<ThemeDescription> arrayList = new ArrayList<>();
arrayList.add(new ThemeDescription(selectedMessagesCountTextView, ThemeDescription.FLAG_TEXTCOLOR, null, null, null, null, Theme.key_windowBackgroundWhiteGrayText2));
arrayList.add(new ThemeDescription(shadowLine, ThemeDescription.FLAG_BACKGROUND, null, null, null, null, Theme.key_divider));
arrayList.add(new ThemeDescription(deleteItem.getIconView(), ThemeDescription.FLAG_IMAGECOLOR, null, null, null, null, Theme.key_windowBackgroundWhiteGrayText2));
arrayList.add(new ThemeDescription(deleteItem, ThemeDescription.FLAG_BACKGROUNDFILTER, null, null, null, null, Theme.key_actionBarActionModeDefaultSelector));
if (gotoItem != null) {
arrayList.add(new ThemeDescription(gotoItem.getIconView(), ThemeDescription.FLAG_IMAGECOLOR, null, null, null, null, Theme.key_windowBackgroundWhiteGrayText2));
arrayList.add(new ThemeDescription(gotoItem, ThemeDescription.FLAG_BACKGROUNDFILTER, null, null, null, null, Theme.key_actionBarActionModeDefaultSelector));
}
if (forwardItem != null) {
arrayList.add(new ThemeDescription(forwardItem.getIconView(), ThemeDescription.FLAG_IMAGECOLOR, null, null, null, null, Theme.key_windowBackgroundWhiteGrayText2));
arrayList.add(new ThemeDescription(forwardItem, ThemeDescription.FLAG_BACKGROUNDFILTER, null, null, null, null, Theme.key_actionBarActionModeDefaultSelector));
}
arrayList.add(new ThemeDescription(closeButton, ThemeDescription.FLAG_IMAGECOLOR, null, null, new Drawable[] { backDrawable }, null, Theme.key_windowBackgroundWhiteGrayText2));
arrayList.add(new ThemeDescription(closeButton, ThemeDescription.FLAG_BACKGROUNDFILTER, null, null, null, null, Theme.key_actionBarActionModeDefaultSelector));
arrayList.add(new ThemeDescription(actionModeLayout, ThemeDescription.FLAG_BACKGROUND, null, null, null, null, Theme.key_windowBackgroundWhite));
arrayList.add(new ThemeDescription(scrollSlidingTextTabStrip, ThemeDescription.FLAG_BACKGROUND, null, null, null, null, Theme.key_windowBackgroundWhite));
arrayList.add(new ThemeDescription(floatingDateView, 0, null, null, null, null, Theme.key_chat_mediaTimeBackground));
arrayList.add(new ThemeDescription(floatingDateView, 0, null, null, null, null, Theme.key_chat_mediaTimeText));
arrayList.add(new ThemeDescription(scrollSlidingTextTabStrip, 0, new Class[] { ScrollSlidingTextTabStrip.class }, new String[] { "selectorDrawable" }, null, null, null, Theme.key_profile_tabSelectedLine));
arrayList.add(new ThemeDescription(scrollSlidingTextTabStrip.getTabsContainer(), ThemeDescription.FLAG_TEXTCOLOR | ThemeDescription.FLAG_CHECKTAG, new Class[] { TextView.class }, null, null, null, Theme.key_profile_tabSelectedText));
arrayList.add(new ThemeDescription(scrollSlidingTextTabStrip.getTabsContainer(), ThemeDescription.FLAG_TEXTCOLOR | ThemeDescription.FLAG_CHECKTAG, new Class[] { TextView.class }, null, null, null, Theme.key_profile_tabText));
arrayList.add(new ThemeDescription(scrollSlidingTextTabStrip.getTabsContainer(), ThemeDescription.FLAG_BACKGROUNDFILTER | ThemeDescription.FLAG_DRAWABLESELECTEDSTATE, new Class[] { TextView.class }, null, null, null, Theme.key_profile_tabSelector));
arrayList.add(new ThemeDescription(fragmentContextView, ThemeDescription.FLAG_BACKGROUND | ThemeDescription.FLAG_CHECKTAG, new Class[] { FragmentContextView.class }, new String[] { "frameLayout" }, null, null, null, Theme.key_inappPlayerBackground));
arrayList.add(new ThemeDescription(fragmentContextView, ThemeDescription.FLAG_IMAGECOLOR, new Class[] { FragmentContextView.class }, new String[] { "playButton" }, null, null, null, Theme.key_inappPlayerPlayPause));
arrayList.add(new ThemeDescription(fragmentContextView, ThemeDescription.FLAG_TEXTCOLOR | ThemeDescription.FLAG_CHECKTAG, new Class[] { FragmentContextView.class }, new String[] { "titleTextView" }, null, null, null, Theme.key_inappPlayerTitle));
arrayList.add(new ThemeDescription(fragmentContextView, ThemeDescription.FLAG_TEXTCOLOR | ThemeDescription.FLAG_FASTSCROLL, new Class[] { FragmentContextView.class }, new String[] { "titleTextView" }, null, null, null, Theme.key_inappPlayerPerformer));
arrayList.add(new ThemeDescription(fragmentContextView, ThemeDescription.FLAG_IMAGECOLOR, new Class[] { FragmentContextView.class }, new String[] { "closeButton" }, null, null, null, Theme.key_inappPlayerClose));
arrayList.add(new ThemeDescription(fragmentContextView, ThemeDescription.FLAG_BACKGROUND | ThemeDescription.FLAG_CHECKTAG, new Class[] { FragmentContextView.class }, new String[] { "frameLayout" }, null, null, null, Theme.key_returnToCallBackground));
arrayList.add(new ThemeDescription(fragmentContextView, ThemeDescription.FLAG_TEXTCOLOR | ThemeDescription.FLAG_CHECKTAG, new Class[] { FragmentContextView.class }, new String[] { "titleTextView" }, null, null, null, Theme.key_returnToCallText));
for (int a = 0; a < mediaPages.length; a++) {
final int num = a;
ThemeDescription.ThemeDescriptionDelegate cellDelegate = () -> {
if (mediaPages[num].listView != null) {
int count = mediaPages[num].listView.getChildCount();
for (int a1 = 0; a1 < count; a1++) {
View child = mediaPages[num].listView.getChildAt(a1);
if (child instanceof SharedPhotoVideoCell) {
((SharedPhotoVideoCell) child).updateCheckboxColor();
} else if (child instanceof ProfileSearchCell) {
((ProfileSearchCell) child).update(0);
} else if (child instanceof UserCell) {
((UserCell) child).update(0);
}
}
}
};
arrayList.add(new ThemeDescription(mediaPages[a].listView, 0, new Class[] { View.class }, Theme.dividerPaint, null, null, Theme.key_divider));
arrayList.add(new ThemeDescription(mediaPages[a].progressView, 0, null, null, null, null, Theme.key_windowBackgroundWhite));
arrayList.add(new ThemeDescription(mediaPages[a].listView, ThemeDescription.FLAG_LISTGLOWCOLOR, null, null, null, null, Theme.key_actionBarDefault));
arrayList.add(new ThemeDescription(mediaPages[a].listView, ThemeDescription.FLAG_SELECTOR, null, null, null, null, Theme.key_listSelector));
arrayList.add(new ThemeDescription(mediaPages[a].emptyView, ThemeDescription.FLAG_TEXTCOLOR, null, null, null, null, Theme.key_emptyListPlaceholder));
arrayList.add(new ThemeDescription(mediaPages[a].listView, ThemeDescription.FLAG_SECTIONS, new Class[] { GraySectionCell.class }, new String[] { "textView" }, null, null, null, Theme.key_graySectionText));
arrayList.add(new ThemeDescription(mediaPages[a].listView, ThemeDescription.FLAG_CELLBACKGROUNDCOLOR | ThemeDescription.FLAG_SECTIONS, new Class[] { GraySectionCell.class }, null, null, null, Theme.key_graySection));
arrayList.add(new ThemeDescription(mediaPages[a].listView, 0, new Class[] { LoadingCell.class }, new String[] { "progressBar" }, null, null, null, Theme.key_progressCircle));
arrayList.add(new ThemeDescription(mediaPages[a].listView, ThemeDescription.FLAG_TEXTCOLOR, new Class[] { UserCell.class }, new String[] { "adminTextView" }, null, null, null, Theme.key_profile_creatorIcon));
arrayList.add(new ThemeDescription(mediaPages[a].listView, 0, new Class[] { UserCell.class }, new String[] { "imageView" }, null, null, null, Theme.key_windowBackgroundWhiteGrayIcon));
arrayList.add(new ThemeDescription(mediaPages[a].listView, 0, new Class[] { UserCell.class }, new String[] { "nameTextView" }, null, null, null, Theme.key_windowBackgroundWhiteBlackText));
arrayList.add(new ThemeDescription(mediaPages[a].listView, 0, new Class[] { UserCell.class }, new String[] { "statusColor" }, null, null, cellDelegate, Theme.key_windowBackgroundWhiteGrayText));
arrayList.add(new ThemeDescription(mediaPages[a].listView, 0, new Class[] { UserCell.class }, new String[] { "statusOnlineColor" }, null, null, cellDelegate, Theme.key_windowBackgroundWhiteBlueText));
arrayList.add(new ThemeDescription(mediaPages[a].listView, 0, new Class[] { UserCell.class }, null, Theme.avatarDrawables, null, Theme.key_avatar_text));
arrayList.add(new ThemeDescription(mediaPages[a].listView, 0, new Class[] { ProfileSearchCell.class }, null, new Paint[] { Theme.dialogs_namePaint[0], Theme.dialogs_namePaint[1], Theme.dialogs_searchNamePaint }, null, null, Theme.key_chats_name));
arrayList.add(new ThemeDescription(mediaPages[a].listView, 0, new Class[] { ProfileSearchCell.class }, null, new Paint[] { Theme.dialogs_nameEncryptedPaint[0], Theme.dialogs_nameEncryptedPaint[1], Theme.dialogs_searchNameEncryptedPaint }, null, null, Theme.key_chats_secretName));
arrayList.add(new ThemeDescription(mediaPages[a].listView, 0, new Class[] { ProfileSearchCell.class }, null, Theme.avatarDrawables, null, Theme.key_avatar_text));
arrayList.add(new ThemeDescription(null, 0, null, null, null, cellDelegate, Theme.key_avatar_backgroundRed));
arrayList.add(new ThemeDescription(null, 0, null, null, null, cellDelegate, Theme.key_avatar_backgroundOrange));
arrayList.add(new ThemeDescription(null, 0, null, null, null, cellDelegate, Theme.key_avatar_backgroundViolet));
arrayList.add(new ThemeDescription(null, 0, null, null, null, cellDelegate, Theme.key_avatar_backgroundGreen));
arrayList.add(new ThemeDescription(null, 0, null, null, null, cellDelegate, Theme.key_avatar_backgroundCyan));
arrayList.add(new ThemeDescription(null, 0, null, null, null, cellDelegate, Theme.key_avatar_backgroundBlue));
arrayList.add(new ThemeDescription(null, 0, null, null, null, cellDelegate, Theme.key_avatar_backgroundPink));
arrayList.add(new ThemeDescription(mediaPages[a].listView, ThemeDescription.FLAG_TEXTCOLOR, new Class[] { EmptyStubView.class }, new String[] { "emptyTextView" }, null, null, null, Theme.key_windowBackgroundWhiteGrayText2));
arrayList.add(new ThemeDescription(mediaPages[a].listView, ThemeDescription.FLAG_TEXTCOLOR, new Class[] { SharedDocumentCell.class }, new String[] { "nameTextView" }, null, null, null, Theme.key_windowBackgroundWhiteBlackText));
arrayList.add(new ThemeDescription(mediaPages[a].listView, ThemeDescription.FLAG_TEXTCOLOR, new Class[] { SharedDocumentCell.class }, new String[] { "dateTextView" }, null, null, null, Theme.key_windowBackgroundWhiteGrayText3));
arrayList.add(new ThemeDescription(mediaPages[a].listView, ThemeDescription.FLAG_PROGRESSBAR, new Class[] { SharedDocumentCell.class }, new String[] { "progressView" }, null, null, null, Theme.key_sharedMedia_startStopLoadIcon));
arrayList.add(new ThemeDescription(mediaPages[a].listView, ThemeDescription.FLAG_IMAGECOLOR, new Class[] { SharedDocumentCell.class }, new String[] { "statusImageView" }, null, null, null, Theme.key_sharedMedia_startStopLoadIcon));
arrayList.add(new ThemeDescription(mediaPages[a].listView, ThemeDescription.FLAG_CHECKBOX, new Class[] { SharedDocumentCell.class }, new String[] { "checkBox" }, null, null, null, Theme.key_checkbox));
arrayList.add(new ThemeDescription(mediaPages[a].listView, ThemeDescription.FLAG_CHECKBOXCHECK, new Class[] { SharedDocumentCell.class }, new String[] { "checkBox" }, null, null, null, Theme.key_checkboxCheck));
arrayList.add(new ThemeDescription(mediaPages[a].listView, ThemeDescription.FLAG_IMAGECOLOR, new Class[] { SharedDocumentCell.class }, new String[] { "thumbImageView" }, null, null, null, Theme.key_files_folderIcon));
arrayList.add(new ThemeDescription(mediaPages[a].listView, ThemeDescription.FLAG_TEXTCOLOR, new Class[] { SharedDocumentCell.class }, new String[] { "extTextView" }, null, null, null, Theme.key_files_iconText));
arrayList.add(new ThemeDescription(mediaPages[a].listView, 0, new Class[] { LoadingCell.class }, new String[] { "progressBar" }, null, null, null, Theme.key_progressCircle));
arrayList.add(new ThemeDescription(mediaPages[a].listView, ThemeDescription.FLAG_CHECKBOX, new Class[] { SharedAudioCell.class }, new String[] { "checkBox" }, null, null, null, Theme.key_checkbox));
arrayList.add(new ThemeDescription(mediaPages[a].listView, ThemeDescription.FLAG_CHECKBOXCHECK, new Class[] { SharedAudioCell.class }, new String[] { "checkBox" }, null, null, null, Theme.key_checkboxCheck));
arrayList.add(new ThemeDescription(mediaPages[a].listView, ThemeDescription.FLAG_TEXTCOLOR, new Class[] { SharedAudioCell.class }, Theme.chat_contextResult_titleTextPaint, null, null, Theme.key_windowBackgroundWhiteBlackText));
arrayList.add(new ThemeDescription(mediaPages[a].listView, ThemeDescription.FLAG_TEXTCOLOR, new Class[] { SharedAudioCell.class }, Theme.chat_contextResult_descriptionTextPaint, null, null, Theme.key_windowBackgroundWhiteGrayText2));
arrayList.add(new ThemeDescription(mediaPages[a].listView, ThemeDescription.FLAG_CHECKBOX, new Class[] { SharedLinkCell.class }, new String[] { "checkBox" }, null, null, null, Theme.key_checkbox));
arrayList.add(new ThemeDescription(mediaPages[a].listView, ThemeDescription.FLAG_CHECKBOXCHECK, new Class[] { SharedLinkCell.class }, new String[] { "checkBox" }, null, null, null, Theme.key_checkboxCheck));
arrayList.add(new ThemeDescription(mediaPages[a].listView, 0, new Class[] { SharedLinkCell.class }, new String[] { "titleTextPaint" }, null, null, null, Theme.key_windowBackgroundWhiteBlackText));
arrayList.add(new ThemeDescription(mediaPages[a].listView, 0, new Class[] { SharedLinkCell.class }, null, null, null, Theme.key_windowBackgroundWhiteLinkText));
arrayList.add(new ThemeDescription(mediaPages[a].listView, 0, new Class[] { SharedLinkCell.class }, Theme.linkSelectionPaint, null, null, Theme.key_windowBackgroundWhiteLinkSelection));
arrayList.add(new ThemeDescription(mediaPages[a].listView, 0, new Class[] { SharedLinkCell.class }, new String[] { "letterDrawable" }, null, null, null, Theme.key_sharedMedia_linkPlaceholderText));
arrayList.add(new ThemeDescription(mediaPages[a].listView, ThemeDescription.FLAG_BACKGROUNDFILTER, new Class[] { SharedLinkCell.class }, new String[] { "letterDrawable" }, null, null, null, Theme.key_sharedMedia_linkPlaceholder));
arrayList.add(new ThemeDescription(mediaPages[a].listView, ThemeDescription.FLAG_CELLBACKGROUNDCOLOR | ThemeDescription.FLAG_SECTIONS, new Class[] { SharedMediaSectionCell.class }, null, null, null, Theme.key_windowBackgroundWhite));
arrayList.add(new ThemeDescription(mediaPages[a].listView, ThemeDescription.FLAG_SECTIONS, new Class[] { SharedMediaSectionCell.class }, new String[] { "textView" }, null, null, null, Theme.key_windowBackgroundWhiteBlackText));
arrayList.add(new ThemeDescription(mediaPages[a].listView, 0, new Class[] { SharedMediaSectionCell.class }, new String[] { "textView" }, null, null, null, Theme.key_windowBackgroundWhiteBlackText));
arrayList.add(new ThemeDescription(mediaPages[a].listView, 0, new Class[] { SharedPhotoVideoCell.class }, new String[] { "backgroundPaint" }, null, null, null, Theme.key_sharedMedia_photoPlaceholder));
arrayList.add(new ThemeDescription(mediaPages[a].listView, ThemeDescription.FLAG_CHECKBOX, new Class[] { SharedPhotoVideoCell.class }, null, null, cellDelegate, Theme.key_checkbox));
arrayList.add(new ThemeDescription(mediaPages[a].listView, ThemeDescription.FLAG_CHECKBOXCHECK, new Class[] { SharedPhotoVideoCell.class }, null, null, cellDelegate, Theme.key_checkboxCheck));
arrayList.add(new ThemeDescription(mediaPages[a].listView, 0, new Class[] { ContextLinkCell.class }, new String[] { "backgroundPaint" }, null, null, null, Theme.key_sharedMedia_photoPlaceholder));
arrayList.add(new ThemeDescription(mediaPages[a].listView, ThemeDescription.FLAG_CHECKBOX, new Class[] { ContextLinkCell.class }, null, null, cellDelegate, Theme.key_checkbox));
arrayList.add(new ThemeDescription(mediaPages[a].listView, ThemeDescription.FLAG_CHECKBOXCHECK, new Class[] { ContextLinkCell.class }, null, null, cellDelegate, Theme.key_checkboxCheck));
arrayList.add(new ThemeDescription(mediaPages[a].listView, 0, null, null, new Drawable[] { pinnedHeaderShadowDrawable }, null, Theme.key_windowBackgroundGrayShadow));
arrayList.add(new ThemeDescription(mediaPages[a].emptyView.title, ThemeDescription.FLAG_TEXTCOLOR, null, null, null, null, Theme.key_windowBackgroundWhiteBlackText));
arrayList.add(new ThemeDescription(mediaPages[a].emptyView.subtitle, ThemeDescription.FLAG_TEXTCOLOR, null, null, null, null, Theme.key_windowBackgroundWhiteGrayText));
}
return arrayList;
}
use of org.telegram.ui.Cells.ProfileSearchCell in project Telegram-FOSS by Telegram-FOSS-Team.
the class DialogsActivity method onItemLongClick.
private boolean onItemLongClick(View view, int position, float x, float y, int dialogsType, RecyclerListView.Adapter adapter) {
if (getParentActivity() == null) {
return false;
}
if (!actionBar.isActionModeShowed() && !AndroidUtilities.isTablet() && !onlySelect && view instanceof DialogCell) {
DialogCell cell = (DialogCell) view;
if (cell.isPointInsideAvatar(x, y)) {
return showChatPreview(cell);
}
}
if (adapter == searchViewPager.dialogsSearchAdapter) {
Object item = searchViewPager.dialogsSearchAdapter.getItem(position);
if (searchViewPager.dialogsSearchAdapter.isRecentSearchDisplayed()) {
AlertDialog.Builder builder = new AlertDialog.Builder(getParentActivity());
builder.setTitle(LocaleController.getString("ClearSearchSingleAlertTitle", R.string.ClearSearchSingleAlertTitle));
long did;
if (item instanceof TLRPC.Chat) {
TLRPC.Chat chat = (TLRPC.Chat) item;
builder.setMessage(LocaleController.formatString("ClearSearchSingleChatAlertText", R.string.ClearSearchSingleChatAlertText, chat.title));
did = -chat.id;
} else if (item instanceof TLRPC.User) {
TLRPC.User user = (TLRPC.User) item;
if (user.id == getUserConfig().clientUserId) {
builder.setMessage(LocaleController.formatString("ClearSearchSingleChatAlertText", R.string.ClearSearchSingleChatAlertText, LocaleController.getString("SavedMessages", R.string.SavedMessages)));
} else {
builder.setMessage(LocaleController.formatString("ClearSearchSingleUserAlertText", R.string.ClearSearchSingleUserAlertText, ContactsController.formatName(user.first_name, user.last_name)));
}
did = user.id;
} else if (item instanceof TLRPC.EncryptedChat) {
TLRPC.EncryptedChat encryptedChat = (TLRPC.EncryptedChat) item;
TLRPC.User user = getMessagesController().getUser(encryptedChat.user_id);
builder.setMessage(LocaleController.formatString("ClearSearchSingleUserAlertText", R.string.ClearSearchSingleUserAlertText, ContactsController.formatName(user.first_name, user.last_name)));
did = DialogObject.makeEncryptedDialogId(encryptedChat.id);
} else {
return false;
}
builder.setPositiveButton(LocaleController.getString("ClearSearchRemove", R.string.ClearSearchRemove).toUpperCase(), (dialogInterface, i) -> searchViewPager.dialogsSearchAdapter.removeRecentSearch(did));
builder.setNegativeButton(LocaleController.getString("Cancel", R.string.Cancel), null);
AlertDialog alertDialog = builder.create();
showDialog(alertDialog);
TextView button = (TextView) alertDialog.getButton(DialogInterface.BUTTON_POSITIVE);
if (button != null) {
button.setTextColor(Theme.getColor(Theme.key_dialogTextRed2));
}
return true;
}
}
TLRPC.Dialog dialog;
if (adapter == searchViewPager.dialogsSearchAdapter) {
long dialogId = 0;
if (view instanceof ProfileSearchCell && !searchViewPager.dialogsSearchAdapter.isGlobalSearch(position)) {
dialogId = ((ProfileSearchCell) view).getDialogId();
}
if (dialogId != 0) {
showOrUpdateActionMode(dialogId, view);
return true;
}
return false;
} else {
DialogsAdapter dialogsAdapter = (DialogsAdapter) adapter;
ArrayList<TLRPC.Dialog> dialogs = getDialogsArray(currentAccount, dialogsType, folderId, dialogsListFrozen);
position = dialogsAdapter.fixPosition(position);
if (position < 0 || position >= dialogs.size()) {
return false;
}
dialog = dialogs.get(position);
}
if (dialog == null) {
return false;
}
if (onlySelect) {
if (initialDialogsType != 3 && initialDialogsType != 10) {
return false;
}
if (!validateSlowModeDialog(dialog.id)) {
return false;
}
if (!(initialDialogsType == 3 && selectAlertString != null)) {
addOrRemoveSelectedDialog(dialog.id, view);
updateSelectedCount();
}
} else {
if (dialog instanceof TLRPC.TL_dialogFolder) {
view.performHapticFeedback(HapticFeedbackConstants.LONG_PRESS, HapticFeedbackConstants.FLAG_IGNORE_GLOBAL_SETTING);
BottomSheet.Builder builder = new BottomSheet.Builder(getParentActivity());
final boolean hasUnread = getMessagesStorage().getArchiveUnreadCount() != 0;
int[] icons = new int[] { hasUnread ? R.drawable.menu_read : 0, SharedConfig.archiveHidden ? R.drawable.chats_pin : R.drawable.chats_unpin };
CharSequence[] items = new CharSequence[] { hasUnread ? LocaleController.getString("MarkAllAsRead", R.string.MarkAllAsRead) : null, SharedConfig.archiveHidden ? LocaleController.getString("PinInTheList", R.string.PinInTheList) : LocaleController.getString("HideAboveTheList", R.string.HideAboveTheList) };
builder.setItems(items, icons, (d, which) -> {
if (which == 0) {
getMessagesStorage().readAllDialogs(1);
} else if (which == 1 && viewPages != null) {
for (int a = 0; a < viewPages.length; a++) {
if (viewPages[a].dialogsType != 0 || viewPages[a].getVisibility() != View.VISIBLE) {
continue;
}
View child = viewPages[a].listView.getChildAt(0);
DialogCell dialogCell = null;
if (child instanceof DialogCell && ((DialogCell) child).isFolderCell()) {
dialogCell = (DialogCell) child;
}
viewPages[a].listView.toggleArchiveHidden(true, dialogCell);
}
}
});
showDialog(builder.create());
return false;
}
if (actionBar.isActionModeShowed() && isDialogPinned(dialog)) {
return false;
}
showOrUpdateActionMode(dialog.id, view);
}
return true;
}
use of org.telegram.ui.Cells.ProfileSearchCell in project Telegram-FOSS by Telegram-FOSS-Team.
the class DialogsActivity method getThemeDescriptions.
@Override
public ArrayList<ThemeDescription> getThemeDescriptions() {
ThemeDescription.ThemeDescriptionDelegate cellDelegate = () -> {
for (int b = 0; b < 3; b++) {
RecyclerListView list;
if (b == 2) {
if (searchViewPager == null) {
continue;
}
list = searchViewPager.searchListView;
} else if (viewPages != null) {
list = b < viewPages.length ? viewPages[b].listView : null;
} else {
continue;
}
if (list == null) {
continue;
}
int count = list.getChildCount();
for (int a = 0; a < count; a++) {
View child = list.getChildAt(a);
if (child instanceof ProfileSearchCell) {
((ProfileSearchCell) child).update(0);
} else if (child instanceof DialogCell) {
((DialogCell) child).update(0);
} else if (child instanceof UserCell) {
((UserCell) child).update(0);
}
}
}
if (searchViewPager != null && searchViewPager.dialogsSearchAdapter != null) {
RecyclerListView recyclerListView = searchViewPager.dialogsSearchAdapter.getInnerListView();
if (recyclerListView != null) {
int count = recyclerListView.getChildCount();
for (int a = 0; a < count; a++) {
View child = recyclerListView.getChildAt(a);
if (child instanceof HintDialogCell) {
((HintDialogCell) child).update();
}
}
}
}
if (sideMenu != null) {
View child = sideMenu.getChildAt(0);
if (child instanceof DrawerProfileCell) {
DrawerProfileCell profileCell = (DrawerProfileCell) child;
profileCell.applyBackground(true);
profileCell.updateColors();
}
}
if (viewPages != null) {
for (int a = 0; a < viewPages.length; a++) {
if (viewPages[a].pullForegroundDrawable == null) {
continue;
}
viewPages[a].pullForegroundDrawable.updateColors();
}
}
if (actionBar != null) {
actionBar.setPopupBackgroundColor(Theme.getColor(Theme.key_actionBarDefaultSubmenuBackground), true);
actionBar.setPopupItemsColor(Theme.getColor(Theme.key_actionBarDefaultSubmenuItem), false, true);
actionBar.setPopupItemsColor(Theme.getColor(Theme.key_actionBarDefaultSubmenuItemIcon), true, true);
actionBar.setPopupItemsSelectorColor(Theme.getColor(Theme.key_dialogButtonSelector), true);
}
if (scrimPopupWindowItems != null) {
for (int a = 0; a < scrimPopupWindowItems.length; a++) {
scrimPopupWindowItems[a].setColors(Theme.getColor(Theme.key_actionBarDefaultSubmenuItem), Theme.getColor(Theme.key_actionBarDefaultSubmenuItemIcon));
scrimPopupWindowItems[a].setSelectorColor(Theme.getColor(Theme.key_dialogButtonSelector));
}
}
if (scrimPopupWindow != null) {
final View contentView = scrimPopupWindow.getContentView();
contentView.setBackgroundColor(Theme.getColor(Theme.key_actionBarDefaultSubmenuBackground));
contentView.invalidate();
}
if (doneItem != null) {
doneItem.setIconColor(Theme.getColor(Theme.key_actionBarDefaultIcon));
}
if (commentView != null) {
commentView.updateColors();
}
if (filtersView != null) {
filtersView.updateColors();
}
if (searchViewPager != null) {
searchViewPager.updateColors();
}
if (searchTabsView != null) {
searchTabsView.updateColors();
}
if (searchItem != null) {
EditTextBoldCursor editText = searchItem.getSearchField();
if (whiteActionBar) {
editText.setTextColor(Theme.getColor(Theme.key_windowBackgroundWhiteBlackText));
editText.setHintTextColor(Theme.getColor(Theme.key_player_time));
editText.setCursorColor(Theme.getColor(Theme.key_chat_messagePanelCursor));
} else {
editText.setCursorColor(Theme.getColor(Theme.key_actionBarDefaultSearch));
editText.setHintTextColor(Theme.getColor(Theme.key_actionBarDefaultSearchPlaceholder));
editText.setTextColor(Theme.getColor(Theme.key_actionBarDefaultSearch));
}
searchItem.updateColor();
}
setSearchAnimationProgress(searchAnimationProgress);
};
ArrayList<ThemeDescription> arrayList = new ArrayList<>();
arrayList.add(new ThemeDescription(fragmentView, ThemeDescription.FLAG_BACKGROUND, null, null, null, null, Theme.key_windowBackgroundWhite));
if (movingView != null) {
arrayList.add(new ThemeDescription(movingView, ThemeDescription.FLAG_BACKGROUND, null, null, null, null, Theme.key_windowBackgroundWhite));
}
if (doneItem != null) {
arrayList.add(new ThemeDescription(doneItem, ThemeDescription.FLAG_BACKGROUNDFILTER, null, null, null, null, Theme.key_actionBarDefaultSelector));
}
if (folderId == 0) {
if (onlySelect) {
arrayList.add(new ThemeDescription(actionBar, ThemeDescription.FLAG_BACKGROUND, null, null, null, null, Theme.key_actionBarDefault));
}
arrayList.add(new ThemeDescription(fragmentView, 0, null, actionBarDefaultPaint, null, null, Theme.key_actionBarDefault));
if (searchViewPager != null) {
arrayList.add(new ThemeDescription(searchViewPager.searchListView, ThemeDescription.FLAG_LISTGLOWCOLOR, null, null, null, null, Theme.key_actionBarDefault));
}
arrayList.add(new ThemeDescription(actionBar, ThemeDescription.FLAG_AB_ITEMSCOLOR, null, null, null, cellDelegate, Theme.key_actionBarDefaultIcon));
arrayList.add(new ThemeDescription(actionBar, ThemeDescription.FLAG_AB_TITLECOLOR, null, null, new Drawable[] { Theme.dialogs_holidayDrawable }, null, Theme.key_actionBarDefaultTitle));
arrayList.add(new ThemeDescription(actionBar, ThemeDescription.FLAG_AB_SELECTORCOLOR, null, null, null, null, Theme.key_actionBarDefaultSelector));
arrayList.add(new ThemeDescription(actionBar, ThemeDescription.FLAG_AB_SEARCH, null, null, null, null, Theme.key_actionBarDefaultSearch));
arrayList.add(new ThemeDescription(actionBar, ThemeDescription.FLAG_AB_SEARCHPLACEHOLDER, null, null, null, null, Theme.key_actionBarDefaultSearchPlaceholder));
} else {
arrayList.add(new ThemeDescription(fragmentView, 0, null, actionBarDefaultPaint, null, null, Theme.key_actionBarDefaultArchived));
if (searchViewPager != null) {
arrayList.add(new ThemeDescription(searchViewPager.searchListView, ThemeDescription.FLAG_LISTGLOWCOLOR, null, null, null, null, Theme.key_actionBarDefaultArchived));
}
arrayList.add(new ThemeDescription(actionBar, ThemeDescription.FLAG_AB_ITEMSCOLOR, null, null, null, null, Theme.key_actionBarDefaultArchivedIcon));
arrayList.add(new ThemeDescription(actionBar, ThemeDescription.FLAG_AB_TITLECOLOR, null, null, new Drawable[] { Theme.dialogs_holidayDrawable }, null, Theme.key_actionBarDefaultArchivedTitle));
arrayList.add(new ThemeDescription(actionBar, ThemeDescription.FLAG_AB_SELECTORCOLOR, null, null, null, null, Theme.key_actionBarDefaultArchivedSelector));
arrayList.add(new ThemeDescription(actionBar, ThemeDescription.FLAG_AB_SEARCH, null, null, null, null, Theme.key_actionBarDefaultArchivedSearch));
arrayList.add(new ThemeDescription(actionBar, ThemeDescription.FLAG_AB_SEARCHPLACEHOLDER, null, null, null, null, Theme.key_actionBarDefaultArchivedSearchPlaceholder));
}
arrayList.add(new ThemeDescription(actionBar, ThemeDescription.FLAG_AB_AM_ITEMSCOLOR, null, null, null, null, Theme.key_actionBarActionModeDefaultIcon));
// arrayList.add(new ThemeDescription(actionBar, ThemeDescription.FLAG_AB_AM_BACKGROUND, null, null, null, null, Theme.key_actionBarActionModeDefault));
arrayList.add(new ThemeDescription(actionBar, ThemeDescription.FLAG_AB_AM_TOPBACKGROUND, null, null, null, null, Theme.key_actionBarActionModeDefaultTop));
arrayList.add(new ThemeDescription(actionBar, ThemeDescription.FLAG_AB_AM_SELECTORCOLOR, null, null, null, null, Theme.key_actionBarActionModeDefaultSelector));
arrayList.add(new ThemeDescription(selectedDialogsCountTextView, ThemeDescription.FLAG_TEXTCOLOR, null, null, null, null, Theme.key_actionBarActionModeDefaultIcon));
arrayList.add(new ThemeDescription(null, 0, null, null, null, cellDelegate, Theme.key_actionBarDefaultSubmenuBackground));
arrayList.add(new ThemeDescription(null, 0, null, null, null, cellDelegate, Theme.key_actionBarDefaultSubmenuItem));
arrayList.add(new ThemeDescription(null, 0, null, null, null, cellDelegate, Theme.key_actionBarDefaultSubmenuItemIcon));
arrayList.add(new ThemeDescription(null, 0, null, null, null, cellDelegate, Theme.key_dialogButtonSelector));
if (filterTabsView != null) {
if (actionBar.isActionModeShowed()) {
arrayList.add(new ThemeDescription(filterTabsView, 0, new Class[] { FilterTabsView.class }, new String[] { "selectorDrawable" }, null, null, null, Theme.key_profile_tabSelectedLine));
arrayList.add(new ThemeDescription(filterTabsView.getTabsContainer(), ThemeDescription.FLAG_TEXTCOLOR | ThemeDescription.FLAG_CHECKTAG, new Class[] { FilterTabsView.TabView.class }, null, null, null, Theme.key_profile_tabSelectedText));
arrayList.add(new ThemeDescription(filterTabsView.getTabsContainer(), ThemeDescription.FLAG_TEXTCOLOR | ThemeDescription.FLAG_CHECKTAG, new Class[] { FilterTabsView.TabView.class }, null, null, null, Theme.key_profile_tabText));
arrayList.add(new ThemeDescription(filterTabsView.getTabsContainer(), ThemeDescription.FLAG_BACKGROUNDFILTER | ThemeDescription.FLAG_DRAWABLESELECTEDSTATE, new Class[] { FilterTabsView.TabView.class }, null, null, null, Theme.key_profile_tabSelector));
} else {
arrayList.add(new ThemeDescription(filterTabsView, 0, new Class[] { FilterTabsView.class }, new String[] { "selectorDrawable" }, null, null, null, Theme.key_actionBarTabLine));
arrayList.add(new ThemeDescription(filterTabsView.getTabsContainer(), ThemeDescription.FLAG_TEXTCOLOR | ThemeDescription.FLAG_CHECKTAG, new Class[] { FilterTabsView.TabView.class }, null, null, null, Theme.key_actionBarTabActiveText));
arrayList.add(new ThemeDescription(filterTabsView.getTabsContainer(), ThemeDescription.FLAG_TEXTCOLOR | ThemeDescription.FLAG_CHECKTAG, new Class[] { FilterTabsView.TabView.class }, null, null, null, Theme.key_actionBarTabUnactiveText));
arrayList.add(new ThemeDescription(filterTabsView.getTabsContainer(), ThemeDescription.FLAG_SELECTOR, null, null, null, null, Theme.key_actionBarTabSelector));
}
arrayList.add(new ThemeDescription(filterTabsView.getTabsContainer(), 0, new Class[] { FilterTabsView.TabView.class }, null, null, null, Theme.key_chats_tabUnreadActiveBackground));
arrayList.add(new ThemeDescription(filterTabsView.getTabsContainer(), 0, new Class[] { FilterTabsView.TabView.class }, null, null, null, Theme.key_chats_tabUnreadUnactiveBackground));
}
arrayList.add(new ThemeDescription(floatingButton, ThemeDescription.FLAG_IMAGECOLOR, null, null, null, null, Theme.key_chats_actionIcon));
arrayList.add(new ThemeDescription(floatingButton, ThemeDescription.FLAG_BACKGROUNDFILTER, null, null, null, null, Theme.key_chats_actionBackground));
arrayList.add(new ThemeDescription(floatingButton, ThemeDescription.FLAG_BACKGROUNDFILTER | ThemeDescription.FLAG_DRAWABLESELECTEDSTATE, null, null, null, null, Theme.key_chats_actionPressedBackground));
for (int a = 0; a < 3; a++) {
RecyclerListView list;
if (a == 2) {
if (searchViewPager == null) {
continue;
}
list = searchViewPager.searchListView;
} else if (viewPages != null) {
list = a < viewPages.length ? viewPages[a].listView : null;
} else {
continue;
}
if (list == null) {
continue;
}
arrayList.add(new ThemeDescription(list, ThemeDescription.FLAG_SELECTOR, null, null, null, null, Theme.key_listSelector));
arrayList.add(new ThemeDescription(list, 0, new Class[] { View.class }, Theme.dividerPaint, null, null, Theme.key_divider));
arrayList.add(new ThemeDescription(list, 0, new Class[] { DialogCell.class, ProfileSearchCell.class }, null, Theme.avatarDrawables, null, Theme.key_avatar_text));
arrayList.add(new ThemeDescription(list, 0, new Class[] { DialogCell.class }, Theme.dialogs_countPaint, null, null, Theme.key_chats_unreadCounter));
arrayList.add(new ThemeDescription(list, 0, new Class[] { DialogCell.class }, Theme.dialogs_countGrayPaint, null, null, Theme.key_chats_unreadCounterMuted));
arrayList.add(new ThemeDescription(list, 0, new Class[] { DialogCell.class }, Theme.dialogs_countTextPaint, null, null, Theme.key_chats_unreadCounterText));
arrayList.add(new ThemeDescription(list, 0, new Class[] { DialogCell.class, ProfileSearchCell.class }, null, new Drawable[] { Theme.dialogs_lockDrawable }, null, Theme.key_chats_secretIcon));
arrayList.add(new ThemeDescription(list, 0, new Class[] { DialogCell.class, ProfileSearchCell.class }, null, new Drawable[] { Theme.dialogs_groupDrawable, Theme.dialogs_broadcastDrawable, Theme.dialogs_botDrawable }, null, Theme.key_chats_nameIcon));
arrayList.add(new ThemeDescription(list, 0, new Class[] { DialogCell.class, ProfileSearchCell.class }, null, new Drawable[] { Theme.dialogs_scamDrawable, Theme.dialogs_fakeDrawable }, null, Theme.key_chats_draft));
arrayList.add(new ThemeDescription(list, 0, new Class[] { DialogCell.class }, null, new Drawable[] { Theme.dialogs_pinnedDrawable, Theme.dialogs_reorderDrawable }, null, Theme.key_chats_pinnedIcon));
arrayList.add(new ThemeDescription(list, 0, new Class[] { DialogCell.class, ProfileSearchCell.class }, null, new Paint[] { Theme.dialogs_namePaint[0], Theme.dialogs_namePaint[1], Theme.dialogs_searchNamePaint }, null, null, Theme.key_chats_name));
arrayList.add(new ThemeDescription(list, 0, new Class[] { DialogCell.class, ProfileSearchCell.class }, null, new Paint[] { Theme.dialogs_nameEncryptedPaint[0], Theme.dialogs_nameEncryptedPaint[1], Theme.dialogs_searchNameEncryptedPaint }, null, null, Theme.key_chats_secretName));
arrayList.add(new ThemeDescription(list, 0, new Class[] { DialogCell.class }, Theme.dialogs_messagePaint[1], null, null, Theme.key_chats_message_threeLines));
arrayList.add(new ThemeDescription(list, 0, new Class[] { DialogCell.class }, Theme.dialogs_messagePaint[0], null, null, Theme.key_chats_message));
arrayList.add(new ThemeDescription(list, 0, new Class[] { DialogCell.class }, Theme.dialogs_messageNamePaint, null, null, Theme.key_chats_nameMessage_threeLines));
arrayList.add(new ThemeDescription(list, 0, new Class[] { DialogCell.class }, null, null, null, Theme.key_chats_draft));
arrayList.add(new ThemeDescription(list, 0, new Class[] { DialogCell.class }, null, Theme.dialogs_messagePrintingPaint, null, null, Theme.key_chats_actionMessage));
arrayList.add(new ThemeDescription(list, 0, new Class[] { DialogCell.class }, Theme.dialogs_timePaint, null, null, Theme.key_chats_date));
arrayList.add(new ThemeDescription(list, 0, new Class[] { DialogCell.class }, Theme.dialogs_pinnedPaint, null, null, Theme.key_chats_pinnedOverlay));
arrayList.add(new ThemeDescription(list, 0, new Class[] { DialogCell.class }, Theme.dialogs_tabletSeletedPaint, null, null, Theme.key_chats_tabletSelectedOverlay));
arrayList.add(new ThemeDescription(list, 0, new Class[] { DialogCell.class }, null, new Drawable[] { Theme.dialogs_checkDrawable }, null, Theme.key_chats_sentCheck));
arrayList.add(new ThemeDescription(list, 0, new Class[] { DialogCell.class }, null, new Drawable[] { Theme.dialogs_checkReadDrawable, Theme.dialogs_halfCheckDrawable }, null, Theme.key_chats_sentReadCheck));
arrayList.add(new ThemeDescription(list, 0, new Class[] { DialogCell.class }, null, new Drawable[] { Theme.dialogs_clockDrawable }, null, Theme.key_chats_sentClock));
arrayList.add(new ThemeDescription(list, 0, new Class[] { DialogCell.class }, Theme.dialogs_errorPaint, null, null, Theme.key_chats_sentError));
arrayList.add(new ThemeDescription(list, 0, new Class[] { DialogCell.class }, null, new Drawable[] { Theme.dialogs_errorDrawable }, null, Theme.key_chats_sentErrorIcon));
arrayList.add(new ThemeDescription(list, 0, new Class[] { DialogCell.class, ProfileSearchCell.class }, null, new Drawable[] { Theme.dialogs_verifiedCheckDrawable }, null, Theme.key_chats_verifiedCheck));
arrayList.add(new ThemeDescription(list, 0, new Class[] { DialogCell.class, ProfileSearchCell.class }, null, new Drawable[] { Theme.dialogs_verifiedDrawable }, null, Theme.key_chats_verifiedBackground));
arrayList.add(new ThemeDescription(list, 0, new Class[] { DialogCell.class }, null, new Drawable[] { Theme.dialogs_muteDrawable }, null, Theme.key_chats_muteIcon));
arrayList.add(new ThemeDescription(list, 0, new Class[] { DialogCell.class }, null, new Drawable[] { Theme.dialogs_mentionDrawable }, null, Theme.key_chats_mentionIcon));
arrayList.add(new ThemeDescription(list, 0, new Class[] { DialogCell.class }, null, null, null, Theme.key_chats_archivePinBackground));
arrayList.add(new ThemeDescription(list, 0, new Class[] { DialogCell.class }, null, null, null, Theme.key_chats_archiveBackground));
arrayList.add(new ThemeDescription(list, 0, new Class[] { DialogCell.class }, null, null, null, Theme.key_chats_onlineCircle));
arrayList.add(new ThemeDescription(list, 0, new Class[] { DialogCell.class }, null, null, null, Theme.key_windowBackgroundWhite));
arrayList.add(new ThemeDescription(list, ThemeDescription.FLAG_CHECKBOX, new Class[] { DialogCell.class }, new String[] { "checkBox" }, null, null, null, Theme.key_windowBackgroundWhite));
arrayList.add(new ThemeDescription(list, ThemeDescription.FLAG_CHECKBOXCHECK, new Class[] { DialogCell.class }, new String[] { "checkBox" }, null, null, null, Theme.key_checkboxCheck));
arrayList.add(new ThemeDescription(list, 0, new Class[] { LoadingCell.class }, new String[] { "progressBar" }, null, null, null, Theme.key_progressCircle));
arrayList.add(new ThemeDescription(list, 0, new Class[] { ProfileSearchCell.class }, Theme.dialogs_offlinePaint, null, null, Theme.key_windowBackgroundWhiteGrayText3));
arrayList.add(new ThemeDescription(list, 0, new Class[] { ProfileSearchCell.class }, Theme.dialogs_onlinePaint, null, null, Theme.key_windowBackgroundWhiteBlueText3));
GraySectionCell.createThemeDescriptions(arrayList, list);
arrayList.add(new ThemeDescription(list, ThemeDescription.FLAG_TEXTCOLOR, new Class[] { HashtagSearchCell.class }, null, null, null, Theme.key_windowBackgroundWhiteBlackText));
arrayList.add(new ThemeDescription(list, ThemeDescription.FLAG_BACKGROUNDFILTER, new Class[] { ShadowSectionCell.class }, null, null, null, Theme.key_windowBackgroundGrayShadow));
arrayList.add(new ThemeDescription(list, ThemeDescription.FLAG_BACKGROUNDFILTER | ThemeDescription.FLAG_CELLBACKGROUNDCOLOR, new Class[] { ShadowSectionCell.class }, null, null, null, Theme.key_windowBackgroundGray));
arrayList.add(new ThemeDescription(list, ThemeDescription.FLAG_BACKGROUNDFILTER, new Class[] { TextInfoPrivacyCell.class }, null, null, null, Theme.key_windowBackgroundGrayShadow));
arrayList.add(new ThemeDescription(list, ThemeDescription.FLAG_BACKGROUNDFILTER | ThemeDescription.FLAG_CELLBACKGROUNDCOLOR, new Class[] { TextInfoPrivacyCell.class }, null, null, null, Theme.key_windowBackgroundGray));
arrayList.add(new ThemeDescription(list, 0, new Class[] { TextInfoPrivacyCell.class }, new String[] { "textView" }, null, null, null, Theme.key_windowBackgroundWhiteGrayText4));
arrayList.add(new ThemeDescription(list, ThemeDescription.FLAG_TEXTCOLOR, new Class[] { TextCell.class }, new String[] { "textView" }, null, null, null, Theme.key_windowBackgroundWhiteBlueText2));
}
arrayList.add(new ThemeDescription(null, 0, null, null, null, cellDelegate, Theme.key_avatar_backgroundRed));
arrayList.add(new ThemeDescription(null, 0, null, null, null, cellDelegate, Theme.key_avatar_backgroundOrange));
arrayList.add(new ThemeDescription(null, 0, null, null, null, cellDelegate, Theme.key_avatar_backgroundViolet));
arrayList.add(new ThemeDescription(null, 0, null, null, null, cellDelegate, Theme.key_avatar_backgroundGreen));
arrayList.add(new ThemeDescription(null, 0, null, null, null, cellDelegate, Theme.key_avatar_backgroundCyan));
arrayList.add(new ThemeDescription(null, 0, null, null, null, cellDelegate, Theme.key_avatar_backgroundBlue));
arrayList.add(new ThemeDescription(null, 0, null, null, null, cellDelegate, Theme.key_avatar_backgroundPink));
arrayList.add(new ThemeDescription(null, 0, null, null, null, cellDelegate, Theme.key_avatar_backgroundSaved));
arrayList.add(new ThemeDescription(null, 0, null, null, null, cellDelegate, Theme.key_avatar_backgroundArchived));
arrayList.add(new ThemeDescription(null, 0, null, null, null, cellDelegate, Theme.key_avatar_backgroundArchivedHidden));
arrayList.add(new ThemeDescription(null, 0, null, null, null, cellDelegate, Theme.key_chats_nameMessage));
arrayList.add(new ThemeDescription(null, 0, null, null, null, cellDelegate, Theme.key_chats_draft));
arrayList.add(new ThemeDescription(null, 0, null, null, null, cellDelegate, Theme.key_chats_attachMessage));
arrayList.add(new ThemeDescription(null, 0, null, null, null, cellDelegate, Theme.key_chats_nameArchived));
arrayList.add(new ThemeDescription(null, 0, null, null, null, cellDelegate, Theme.key_chats_nameMessageArchived));
arrayList.add(new ThemeDescription(null, 0, null, null, null, cellDelegate, Theme.key_chats_nameMessageArchived_threeLines));
arrayList.add(new ThemeDescription(null, 0, null, null, null, cellDelegate, Theme.key_chats_messageArchived));
if (viewPages != null) {
for (int a = 0; a < viewPages.length; a++) {
if (folderId == 0) {
arrayList.add(new ThemeDescription(viewPages[a].listView, ThemeDescription.FLAG_LISTGLOWCOLOR, null, null, null, null, Theme.key_actionBarDefault));
} else {
arrayList.add(new ThemeDescription(viewPages[a].listView, ThemeDescription.FLAG_LISTGLOWCOLOR, null, null, null, null, Theme.key_actionBarDefaultArchived));
}
arrayList.add(new ThemeDescription(viewPages[a].listView, ThemeDescription.FLAG_TEXTCOLOR, new Class[] { DialogsEmptyCell.class }, new String[] { "emptyTextView1" }, null, null, null, Theme.key_chats_nameMessage_threeLines));
arrayList.add(new ThemeDescription(viewPages[a].listView, ThemeDescription.FLAG_TEXTCOLOR, new Class[] { DialogsEmptyCell.class }, new String[] { "emptyTextView2" }, null, null, null, Theme.key_chats_message));
if (SharedConfig.archiveHidden) {
arrayList.add(new ThemeDescription(viewPages[a].listView, 0, new Class[] { DialogCell.class }, new RLottieDrawable[] { Theme.dialogs_archiveAvatarDrawable }, "Arrow1", Theme.key_avatar_backgroundArchivedHidden));
arrayList.add(new ThemeDescription(viewPages[a].listView, 0, new Class[] { DialogCell.class }, new RLottieDrawable[] { Theme.dialogs_archiveAvatarDrawable }, "Arrow2", Theme.key_avatar_backgroundArchivedHidden));
} else {
arrayList.add(new ThemeDescription(viewPages[a].listView, 0, new Class[] { DialogCell.class }, new RLottieDrawable[] { Theme.dialogs_archiveAvatarDrawable }, "Arrow1", Theme.key_avatar_backgroundArchived));
arrayList.add(new ThemeDescription(viewPages[a].listView, 0, new Class[] { DialogCell.class }, new RLottieDrawable[] { Theme.dialogs_archiveAvatarDrawable }, "Arrow2", Theme.key_avatar_backgroundArchived));
}
arrayList.add(new ThemeDescription(viewPages[a].listView, 0, new Class[] { DialogCell.class }, new RLottieDrawable[] { Theme.dialogs_archiveAvatarDrawable }, "Box2", Theme.key_avatar_text));
arrayList.add(new ThemeDescription(viewPages[a].listView, 0, new Class[] { DialogCell.class }, new RLottieDrawable[] { Theme.dialogs_archiveAvatarDrawable }, "Box1", Theme.key_avatar_text));
arrayList.add(new ThemeDescription(viewPages[a].listView, 0, new Class[] { DialogCell.class }, new RLottieDrawable[] { Theme.dialogs_pinArchiveDrawable }, "Arrow", Theme.key_chats_archiveIcon));
arrayList.add(new ThemeDescription(viewPages[a].listView, 0, new Class[] { DialogCell.class }, new RLottieDrawable[] { Theme.dialogs_pinArchiveDrawable }, "Line", Theme.key_chats_archiveIcon));
arrayList.add(new ThemeDescription(viewPages[a].listView, 0, new Class[] { DialogCell.class }, new RLottieDrawable[] { Theme.dialogs_unpinArchiveDrawable }, "Arrow", Theme.key_chats_archiveIcon));
arrayList.add(new ThemeDescription(viewPages[a].listView, 0, new Class[] { DialogCell.class }, new RLottieDrawable[] { Theme.dialogs_unpinArchiveDrawable }, "Line", Theme.key_chats_archiveIcon));
arrayList.add(new ThemeDescription(viewPages[a].listView, 0, new Class[] { DialogCell.class }, new RLottieDrawable[] { Theme.dialogs_archiveDrawable }, "Arrow", Theme.key_chats_archiveBackground));
arrayList.add(new ThemeDescription(viewPages[a].listView, 0, new Class[] { DialogCell.class }, new RLottieDrawable[] { Theme.dialogs_archiveDrawable }, "Box2", Theme.key_chats_archiveIcon));
arrayList.add(new ThemeDescription(viewPages[a].listView, 0, new Class[] { DialogCell.class }, new RLottieDrawable[] { Theme.dialogs_archiveDrawable }, "Box1", Theme.key_chats_archiveIcon));
arrayList.add(new ThemeDescription(viewPages[a].listView, 0, new Class[] { DialogCell.class }, new RLottieDrawable[] { Theme.dialogs_hidePsaDrawable }, "Line 1", Theme.key_chats_archiveBackground));
arrayList.add(new ThemeDescription(viewPages[a].listView, 0, new Class[] { DialogCell.class }, new RLottieDrawable[] { Theme.dialogs_hidePsaDrawable }, "Line 2", Theme.key_chats_archiveBackground));
arrayList.add(new ThemeDescription(viewPages[a].listView, 0, new Class[] { DialogCell.class }, new RLottieDrawable[] { Theme.dialogs_hidePsaDrawable }, "Line 3", Theme.key_chats_archiveBackground));
arrayList.add(new ThemeDescription(viewPages[a].listView, 0, new Class[] { DialogCell.class }, new RLottieDrawable[] { Theme.dialogs_hidePsaDrawable }, "Cup Red", Theme.key_chats_archiveIcon));
arrayList.add(new ThemeDescription(viewPages[a].listView, 0, new Class[] { DialogCell.class }, new RLottieDrawable[] { Theme.dialogs_hidePsaDrawable }, "Box", Theme.key_chats_archiveIcon));
arrayList.add(new ThemeDescription(viewPages[a].listView, 0, new Class[] { DialogCell.class }, new RLottieDrawable[] { Theme.dialogs_unarchiveDrawable }, "Arrow1", Theme.key_chats_archiveIcon));
arrayList.add(new ThemeDescription(viewPages[a].listView, 0, new Class[] { DialogCell.class }, new RLottieDrawable[] { Theme.dialogs_unarchiveDrawable }, "Arrow2", Theme.key_chats_archivePinBackground));
arrayList.add(new ThemeDescription(viewPages[a].listView, 0, new Class[] { DialogCell.class }, new RLottieDrawable[] { Theme.dialogs_unarchiveDrawable }, "Box2", Theme.key_chats_archiveIcon));
arrayList.add(new ThemeDescription(viewPages[a].listView, 0, new Class[] { DialogCell.class }, new RLottieDrawable[] { Theme.dialogs_unarchiveDrawable }, "Box1", Theme.key_chats_archiveIcon));
arrayList.add(new ThemeDescription(viewPages[a].listView, 0, new Class[] { UserCell.class }, new String[] { "nameTextView" }, null, null, null, Theme.key_windowBackgroundWhiteBlackText));
arrayList.add(new ThemeDescription(viewPages[a].listView, 0, new Class[] { UserCell.class }, new String[] { "statusColor" }, null, null, cellDelegate, Theme.key_windowBackgroundWhiteGrayText));
arrayList.add(new ThemeDescription(viewPages[a].listView, 0, new Class[] { UserCell.class }, new String[] { "statusOnlineColor" }, null, null, cellDelegate, Theme.key_windowBackgroundWhiteBlueText));
arrayList.add(new ThemeDescription(viewPages[a].listView, 0, new Class[] { TextCell.class }, new String[] { "textView" }, null, null, null, Theme.key_windowBackgroundWhiteBlueText4));
arrayList.add(new ThemeDescription(viewPages[a].listView, 0, new Class[] { TextCell.class }, new String[] { "imageView" }, null, null, null, Theme.key_windowBackgroundWhiteBlueText4));
arrayList.add(new ThemeDescription(viewPages[a].progressView, ThemeDescription.FLAG_PROGRESSBAR, null, null, null, null, Theme.key_progressCircle));
ViewPager pager = viewPages[a].dialogsAdapter.getArchiveHintCellPager();
arrayList.add(new ThemeDescription(pager, 0, new Class[] { ArchiveHintInnerCell.class }, new String[] { "imageView" }, null, null, null, Theme.key_chats_nameMessage_threeLines));
arrayList.add(new ThemeDescription(pager, 0, new Class[] { ArchiveHintInnerCell.class }, new String[] { "imageView2" }, null, null, null, Theme.key_chats_unreadCounter));
arrayList.add(new ThemeDescription(pager, 0, new Class[] { ArchiveHintInnerCell.class }, new String[] { "headerTextView" }, null, null, null, Theme.key_chats_nameMessage_threeLines));
arrayList.add(new ThemeDescription(pager, 0, new Class[] { ArchiveHintInnerCell.class }, new String[] { "messageTextView" }, null, null, null, Theme.key_chats_message));
arrayList.add(new ThemeDescription(pager, ThemeDescription.FLAG_LISTGLOWCOLOR, null, null, null, null, Theme.key_actionBarDefaultArchived));
}
}
arrayList.add(new ThemeDescription(null, 0, null, null, null, cellDelegate, Theme.key_chats_archivePullDownBackground));
arrayList.add(new ThemeDescription(null, 0, null, null, null, cellDelegate, Theme.key_chats_archivePullDownBackgroundActive));
arrayList.add(new ThemeDescription(sideMenu, ThemeDescription.FLAG_BACKGROUND, null, null, null, null, Theme.key_chats_menuBackground));
arrayList.add(new ThemeDescription(sideMenu, 0, new Class[] { DrawerProfileCell.class }, null, null, null, Theme.key_chats_menuName));
arrayList.add(new ThemeDescription(sideMenu, 0, new Class[] { DrawerProfileCell.class }, null, null, null, Theme.key_chats_menuPhone));
arrayList.add(new ThemeDescription(sideMenu, 0, new Class[] { DrawerProfileCell.class }, null, null, null, Theme.key_chats_menuPhoneCats));
arrayList.add(new ThemeDescription(sideMenu, 0, new Class[] { DrawerProfileCell.class }, null, null, null, Theme.key_chats_menuCloudBackgroundCats));
arrayList.add(new ThemeDescription(sideMenu, 0, new Class[] { DrawerProfileCell.class }, null, null, null, Theme.key_chat_serviceBackground));
arrayList.add(new ThemeDescription(sideMenu, 0, new Class[] { DrawerProfileCell.class }, null, null, null, Theme.key_chats_menuTopShadow));
arrayList.add(new ThemeDescription(sideMenu, 0, new Class[] { DrawerProfileCell.class }, null, null, null, Theme.key_chats_menuTopShadowCats));
arrayList.add(new ThemeDescription(sideMenu, ThemeDescription.FLAG_IMAGECOLOR, new Class[] { DrawerProfileCell.class }, new String[] { "darkThemeView" }, null, null, null, Theme.key_chats_menuName));
arrayList.add(new ThemeDescription(sideMenu, ThemeDescription.FLAG_CELLBACKGROUNDCOLOR | ThemeDescription.FLAG_CHECKTAG, new Class[] { DrawerProfileCell.class }, null, null, cellDelegate, Theme.key_chats_menuTopBackgroundCats));
arrayList.add(new ThemeDescription(sideMenu, ThemeDescription.FLAG_CELLBACKGROUNDCOLOR | ThemeDescription.FLAG_CHECKTAG, new Class[] { DrawerProfileCell.class }, null, null, cellDelegate, Theme.key_chats_menuTopBackground));
arrayList.add(new ThemeDescription(sideMenu, ThemeDescription.FLAG_IMAGECOLOR, new Class[] { DrawerActionCell.class }, new String[] { "textView" }, null, null, null, Theme.key_chats_menuItemIcon));
arrayList.add(new ThemeDescription(sideMenu, 0, new Class[] { DrawerActionCell.class }, new String[] { "textView" }, null, null, null, Theme.key_chats_menuItemText));
arrayList.add(new ThemeDescription(sideMenu, 0, new Class[] { DrawerUserCell.class }, new String[] { "textView" }, null, null, null, Theme.key_chats_menuItemText));
arrayList.add(new ThemeDescription(sideMenu, ThemeDescription.FLAG_TEXTCOLOR, new Class[] { DrawerUserCell.class }, new String[] { "checkBox" }, null, null, null, Theme.key_chats_unreadCounterText));
arrayList.add(new ThemeDescription(sideMenu, ThemeDescription.FLAG_TEXTCOLOR, new Class[] { DrawerUserCell.class }, new String[] { "checkBox" }, null, null, null, Theme.key_chats_unreadCounter));
arrayList.add(new ThemeDescription(sideMenu, ThemeDescription.FLAG_TEXTCOLOR, new Class[] { DrawerUserCell.class }, new String[] { "checkBox" }, null, null, null, Theme.key_chats_menuBackground));
arrayList.add(new ThemeDescription(sideMenu, ThemeDescription.FLAG_IMAGECOLOR, new Class[] { DrawerAddCell.class }, new String[] { "textView" }, null, null, null, Theme.key_chats_menuItemIcon));
arrayList.add(new ThemeDescription(sideMenu, 0, new Class[] { DrawerAddCell.class }, new String[] { "textView" }, null, null, null, Theme.key_chats_menuItemText));
arrayList.add(new ThemeDescription(sideMenu, 0, new Class[] { DividerCell.class }, Theme.dividerPaint, null, null, Theme.key_divider));
if (searchViewPager != null) {
arrayList.add(new ThemeDescription(searchViewPager.dialogsSearchAdapter != null ? searchViewPager.dialogsSearchAdapter.getInnerListView() : null, 0, new Class[] { HintDialogCell.class }, Theme.dialogs_countPaint, null, null, Theme.key_chats_unreadCounter));
arrayList.add(new ThemeDescription(searchViewPager.dialogsSearchAdapter != null ? searchViewPager.dialogsSearchAdapter.getInnerListView() : null, 0, new Class[] { HintDialogCell.class }, Theme.dialogs_countGrayPaint, null, null, Theme.key_chats_unreadCounterMuted));
arrayList.add(new ThemeDescription(searchViewPager.dialogsSearchAdapter != null ? searchViewPager.dialogsSearchAdapter.getInnerListView() : null, 0, new Class[] { HintDialogCell.class }, Theme.dialogs_countTextPaint, null, null, Theme.key_chats_unreadCounterText));
arrayList.add(new ThemeDescription(searchViewPager.dialogsSearchAdapter != null ? searchViewPager.dialogsSearchAdapter.getInnerListView() : null, 0, new Class[] { HintDialogCell.class }, Theme.dialogs_archiveTextPaint, null, null, Theme.key_chats_archiveText));
arrayList.add(new ThemeDescription(searchViewPager.dialogsSearchAdapter != null ? searchViewPager.dialogsSearchAdapter.getInnerListView() : null, 0, new Class[] { HintDialogCell.class }, new String[] { "nameTextView" }, null, null, null, Theme.key_windowBackgroundWhiteBlackText));
arrayList.add(new ThemeDescription(searchViewPager.dialogsSearchAdapter != null ? searchViewPager.dialogsSearchAdapter.getInnerListView() : null, 0, new Class[] { HintDialogCell.class }, null, null, null, Theme.key_chats_onlineCircle));
}
arrayList.add(new ThemeDescription(fragmentView, ThemeDescription.FLAG_BACKGROUND | ThemeDescription.FLAG_CHECKTAG, new Class[] { FragmentContextView.class }, new String[] { "frameLayout" }, null, null, null, Theme.key_inappPlayerBackground));
arrayList.add(new ThemeDescription(fragmentView, ThemeDescription.FLAG_IMAGECOLOR, new Class[] { FragmentContextView.class }, new String[] { "playButton" }, null, null, null, Theme.key_inappPlayerPlayPause));
arrayList.add(new ThemeDescription(fragmentView, ThemeDescription.FLAG_TEXTCOLOR | ThemeDescription.FLAG_CHECKTAG, new Class[] { FragmentContextView.class }, new String[] { "titleTextView" }, null, null, null, Theme.key_inappPlayerTitle));
arrayList.add(new ThemeDescription(fragmentView, ThemeDescription.FLAG_TEXTCOLOR | ThemeDescription.FLAG_FASTSCROLL, new Class[] { FragmentContextView.class }, new String[] { "titleTextView" }, null, null, null, Theme.key_inappPlayerPerformer));
arrayList.add(new ThemeDescription(fragmentView, ThemeDescription.FLAG_IMAGECOLOR, new Class[] { FragmentContextView.class }, new String[] { "closeButton" }, null, null, null, Theme.key_inappPlayerClose));
arrayList.add(new ThemeDescription(fragmentView, ThemeDescription.FLAG_BACKGROUND | ThemeDescription.FLAG_CHECKTAG, new Class[] { FragmentContextView.class }, new String[] { "frameLayout" }, null, null, null, Theme.key_returnToCallBackground));
arrayList.add(new ThemeDescription(fragmentView, ThemeDescription.FLAG_TEXTCOLOR | ThemeDescription.FLAG_CHECKTAG, new Class[] { FragmentContextView.class }, new String[] { "titleTextView" }, null, null, null, Theme.key_returnToCallText));
for (int a = 0; a < undoView.length; a++) {
arrayList.add(new ThemeDescription(undoView[a], ThemeDescription.FLAG_BACKGROUNDFILTER, null, null, null, null, Theme.key_undo_background));
arrayList.add(new ThemeDescription(undoView[a], 0, new Class[] { UndoView.class }, new String[] { "undoImageView" }, null, null, null, Theme.key_undo_cancelColor));
arrayList.add(new ThemeDescription(undoView[a], 0, new Class[] { UndoView.class }, new String[] { "undoTextView" }, null, null, null, Theme.key_undo_cancelColor));
arrayList.add(new ThemeDescription(undoView[a], 0, new Class[] { UndoView.class }, new String[] { "infoTextView" }, null, null, null, Theme.key_undo_infoColor));
arrayList.add(new ThemeDescription(undoView[a], 0, new Class[] { UndoView.class }, new String[] { "subinfoTextView" }, null, null, null, Theme.key_undo_infoColor));
arrayList.add(new ThemeDescription(undoView[a], 0, new Class[] { UndoView.class }, new String[] { "textPaint" }, null, null, null, Theme.key_undo_infoColor));
arrayList.add(new ThemeDescription(undoView[a], 0, new Class[] { UndoView.class }, new String[] { "progressPaint" }, null, null, null, Theme.key_undo_infoColor));
arrayList.add(new ThemeDescription(undoView[a], 0, new Class[] { UndoView.class }, new String[] { "leftImageView" }, "info1", Theme.key_undo_background));
arrayList.add(new ThemeDescription(undoView[a], 0, new Class[] { UndoView.class }, new String[] { "leftImageView" }, "info2", Theme.key_undo_background));
arrayList.add(new ThemeDescription(undoView[a], 0, new Class[] { UndoView.class }, new String[] { "leftImageView" }, "luc12", Theme.key_undo_infoColor));
arrayList.add(new ThemeDescription(undoView[a], 0, new Class[] { UndoView.class }, new String[] { "leftImageView" }, "luc11", Theme.key_undo_infoColor));
arrayList.add(new ThemeDescription(undoView[a], 0, new Class[] { UndoView.class }, new String[] { "leftImageView" }, "luc10", Theme.key_undo_infoColor));
arrayList.add(new ThemeDescription(undoView[a], 0, new Class[] { UndoView.class }, new String[] { "leftImageView" }, "luc9", Theme.key_undo_infoColor));
arrayList.add(new ThemeDescription(undoView[a], 0, new Class[] { UndoView.class }, new String[] { "leftImageView" }, "luc8", Theme.key_undo_infoColor));
arrayList.add(new ThemeDescription(undoView[a], 0, new Class[] { UndoView.class }, new String[] { "leftImageView" }, "luc7", Theme.key_undo_infoColor));
arrayList.add(new ThemeDescription(undoView[a], 0, new Class[] { UndoView.class }, new String[] { "leftImageView" }, "luc6", Theme.key_undo_infoColor));
arrayList.add(new ThemeDescription(undoView[a], 0, new Class[] { UndoView.class }, new String[] { "leftImageView" }, "luc5", Theme.key_undo_infoColor));
arrayList.add(new ThemeDescription(undoView[a], 0, new Class[] { UndoView.class }, new String[] { "leftImageView" }, "luc4", Theme.key_undo_infoColor));
arrayList.add(new ThemeDescription(undoView[a], 0, new Class[] { UndoView.class }, new String[] { "leftImageView" }, "luc3", Theme.key_undo_infoColor));
arrayList.add(new ThemeDescription(undoView[a], 0, new Class[] { UndoView.class }, new String[] { "leftImageView" }, "luc2", Theme.key_undo_infoColor));
arrayList.add(new ThemeDescription(undoView[a], 0, new Class[] { UndoView.class }, new String[] { "leftImageView" }, "luc1", Theme.key_undo_infoColor));
arrayList.add(new ThemeDescription(undoView[a], 0, new Class[] { UndoView.class }, new String[] { "leftImageView" }, "Oval", Theme.key_undo_infoColor));
}
arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_dialogBackground));
arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_dialogBackgroundGray));
arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_dialogTextBlack));
arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_dialogTextLink));
arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_dialogLinkSelection));
arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_dialogTextBlue));
arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_dialogTextBlue2));
arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_dialogTextBlue3));
arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_dialogTextBlue4));
arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_dialogTextRed));
arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_dialogTextRed2));
arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_dialogTextGray));
arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_dialogTextGray2));
arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_dialogTextGray3));
arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_dialogTextGray4));
arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_dialogIcon));
arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_dialogRedIcon));
arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_dialogTextHint));
arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_dialogInputField));
arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_dialogInputFieldActivated));
arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_dialogCheckboxSquareBackground));
arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_dialogCheckboxSquareCheck));
arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_dialogCheckboxSquareUnchecked));
arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_dialogCheckboxSquareDisabled));
arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_dialogRadioBackground));
arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_dialogRadioBackgroundChecked));
arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_dialogProgressCircle));
arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_dialogButton));
arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_dialogButtonSelector));
arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_dialogScrollGlow));
arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_dialogRoundCheckBox));
arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_dialogRoundCheckBoxCheck));
arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_dialogBadgeBackground));
arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_dialogBadgeText));
arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_dialogLineProgress));
arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_dialogLineProgressBackground));
arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_dialogGrayLine));
arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_dialog_inlineProgressBackground));
arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_dialog_inlineProgress));
arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_dialogSearchBackground));
arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_dialogSearchHint));
arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_dialogSearchIcon));
arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_dialogSearchText));
arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_dialogFloatingButton));
arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_dialogFloatingIcon));
arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_dialogShadowLine));
arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_sheet_scrollUp));
arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_sheet_other));
arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_player_actionBar));
arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_player_actionBarSelector));
arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_player_actionBarTitle));
arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_player_actionBarTop));
arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_player_actionBarSubtitle));
arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_player_actionBarItems));
arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_player_background));
arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_player_time));
arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_player_progressBackground));
arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_player_progressCachedBackground));
arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_player_progress));
arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_player_button));
arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_player_buttonActive));
if (commentView != null) {
arrayList.add(new ThemeDescription(commentView, 0, null, Theme.chat_composeBackgroundPaint, null, null, Theme.key_chat_messagePanelBackground));
arrayList.add(new ThemeDescription(commentView, 0, null, null, new Drawable[] { Theme.chat_composeShadowDrawable }, null, Theme.key_chat_messagePanelShadow));
arrayList.add(new ThemeDescription(commentView, ThemeDescription.FLAG_TEXTCOLOR, new Class[] { ChatActivityEnterView.class }, new String[] { "messageEditText" }, null, null, null, Theme.key_chat_messagePanelText));
arrayList.add(new ThemeDescription(commentView, ThemeDescription.FLAG_CURSORCOLOR, new Class[] { ChatActivityEnterView.class }, new String[] { "messageEditText" }, null, null, null, Theme.key_chat_messagePanelCursor));
arrayList.add(new ThemeDescription(commentView, ThemeDescription.FLAG_HINTTEXTCOLOR, new Class[] { ChatActivityEnterView.class }, new String[] { "messageEditText" }, null, null, null, Theme.key_chat_messagePanelHint));
// arrayList.add(new ThemeDescription(commentView, ThemeDescription.FLAG_IMAGECOLOR, new Class[]{ChatActivityEnterView.class}, new String[]{"sendButton"}, null, null, null, Theme.key_chat_messagePanelSend));
}
arrayList.add(new ThemeDescription(null, 0, null, null, null, cellDelegate, Theme.key_actionBarTipBackground));
arrayList.add(new ThemeDescription(null, 0, null, null, null, cellDelegate, Theme.key_windowBackgroundWhiteBlackText));
arrayList.add(new ThemeDescription(null, 0, null, null, null, cellDelegate, Theme.key_player_time));
arrayList.add(new ThemeDescription(null, 0, null, null, null, cellDelegate, Theme.key_chat_messagePanelCursor));
arrayList.add(new ThemeDescription(null, 0, null, null, null, cellDelegate, Theme.key_avatar_actionBarIconBlue));
arrayList.add(new ThemeDescription(null, 0, null, null, null, cellDelegate, Theme.key_groupcreate_spanBackground));
arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_voipgroup_overlayGreen1));
arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_voipgroup_overlayGreen2));
arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_voipgroup_overlayBlue1));
arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_voipgroup_overlayBlue2));
arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_voipgroup_topPanelGreen1));
arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_voipgroup_topPanelGreen2));
arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_voipgroup_topPanelBlue1));
arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_voipgroup_topPanelBlue2));
arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_voipgroup_topPanelGray));
arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_voipgroup_overlayAlertGradientMuted));
arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_voipgroup_overlayAlertGradientMuted2));
arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_voipgroup_overlayAlertGradientUnmuted));
arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_voipgroup_overlayAlertGradientUnmuted2));
arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_voipgroup_mutedByAdminGradient));
arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_voipgroup_mutedByAdminGradient2));
arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_voipgroup_mutedByAdminGradient3));
arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_voipgroup_overlayAlertMutedByAdmin));
arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_voipgroup_overlayAlertMutedByAdmin2));
if (filtersView != null) {
arrayList.addAll(filtersView.getThemeDescriptions());
filtersView.updateColors();
}
if (searchViewPager != null) {
searchViewPager.getThemeDescriptors(arrayList);
}
return arrayList;
}
use of org.telegram.ui.Cells.ProfileSearchCell in project Telegram-FOSS by Telegram-FOSS-Team.
the class DialogsActivity method updateVisibleRows.
private void updateVisibleRows(int mask, boolean animated) {
if ((dialogsListFrozen && (mask & MessagesController.UPDATE_MASK_REORDER) == 0) || isPaused) {
return;
}
for (int c = 0; c < 3; c++) {
RecyclerListView list;
if (c == 2) {
list = searchViewPager != null ? searchViewPager.searchListView : null;
} else if (viewPages != null) {
list = c < viewPages.length ? viewPages[c].listView : null;
if (list != null && viewPages[c].getVisibility() != View.VISIBLE) {
continue;
}
} else {
continue;
}
if (list == null) {
continue;
}
int count = list.getChildCount();
for (int a = 0; a < count; a++) {
View child = list.getChildAt(a);
if (child instanceof DialogCell) {
if (list.getAdapter() != searchViewPager.dialogsSearchAdapter) {
DialogCell cell = (DialogCell) child;
if ((mask & MessagesController.UPDATE_MASK_REORDER) != 0) {
cell.onReorderStateChanged(actionBar.isActionModeShowed(), true);
if (dialogsListFrozen) {
continue;
}
}
if ((mask & MessagesController.UPDATE_MASK_CHECK) != 0) {
cell.setChecked(false, (mask & MessagesController.UPDATE_MASK_CHAT) != 0);
} else {
if ((mask & MessagesController.UPDATE_MASK_NEW_MESSAGE) != 0) {
cell.checkCurrentDialogIndex(dialogsListFrozen);
if (viewPages[c].isDefaultDialogType() && AndroidUtilities.isTablet()) {
cell.setDialogSelected(cell.getDialogId() == openedDialogId);
}
} else if ((mask & MessagesController.UPDATE_MASK_SELECT_DIALOG) != 0) {
if (viewPages[c].isDefaultDialogType() && AndroidUtilities.isTablet()) {
cell.setDialogSelected(cell.getDialogId() == openedDialogId);
}
} else {
cell.update(mask, animated);
}
if (selectedDialogs != null) {
cell.setChecked(selectedDialogs.contains(cell.getDialogId()), false);
}
}
}
}
if (child instanceof UserCell) {
((UserCell) child).update(mask);
} else if (child instanceof ProfileSearchCell) {
ProfileSearchCell cell = (ProfileSearchCell) child;
cell.update(mask);
if (selectedDialogs != null) {
cell.setChecked(selectedDialogs.contains(cell.getDialogId()), false);
}
}
if (dialogsListFrozen) {
continue;
}
if (child instanceof RecyclerListView) {
RecyclerListView innerListView = (RecyclerListView) child;
int count2 = innerListView.getChildCount();
for (int b = 0; b < count2; b++) {
View child2 = innerListView.getChildAt(b);
if (child2 instanceof HintDialogCell) {
((HintDialogCell) child2).update(mask);
}
}
}
}
}
}
Aggregations