use of org.telegram.ui.Cells.DialogCell in project Telegram-FOSS by Telegram-FOSS-Team.
the class DialogsActivity method createView.
@Override
public View createView(final Context context) {
searching = false;
searchWas = false;
pacmanAnimation = null;
selectedDialogs.clear();
maximumVelocity = ViewConfiguration.get(context).getScaledMaximumFlingVelocity();
AndroidUtilities.runOnUIThread(() -> Theme.createChatResources(context, false));
ActionBarMenu menu = actionBar.createMenu();
if (!onlySelect && searchString == null && folderId == 0) {
doneItem = new ActionBarMenuItem(context, null, Theme.getColor(Theme.key_actionBarDefaultSelector), Theme.getColor(Theme.key_actionBarDefaultIcon), true);
doneItem.setText(LocaleController.getString("Done", R.string.Done).toUpperCase());
actionBar.addView(doneItem, LayoutHelper.createFrame(LayoutHelper.WRAP_CONTENT, LayoutHelper.WRAP_CONTENT, Gravity.TOP | Gravity.RIGHT, 0, 0, 10, 0));
doneItem.setOnClickListener(v -> {
filterTabsView.setIsEditing(false);
showDoneItem(false);
});
doneItem.setAlpha(0.0f);
doneItem.setVisibility(View.GONE);
proxyDrawable = new ProxyDrawable(context);
proxyItem = menu.addItem(2, proxyDrawable);
proxyItem.setContentDescription(LocaleController.getString("ProxySettings", R.string.ProxySettings));
passcodeDrawable = new RLottieDrawable(R.raw.passcode_lock_close, "passcode_lock_close", AndroidUtilities.dp(28), AndroidUtilities.dp(28), true, null);
passcodeItem = menu.addItem(1, passcodeDrawable);
passcodeItem.setContentDescription(LocaleController.getString("AccDescrPasscodeLock", R.string.AccDescrPasscodeLock));
updatePasscodeButton();
updateProxyButton(false);
}
searchItem = menu.addItem(0, R.drawable.ic_ab_search).setIsSearchField(true, true).setActionBarMenuItemSearchListener(new ActionBarMenuItem.ActionBarMenuItemSearchListener() {
@Override
public void onSearchExpand() {
searching = true;
if (switchItem != null) {
switchItem.setVisibility(View.GONE);
}
if (proxyItem != null && proxyItemVisible) {
proxyItem.setVisibility(View.GONE);
}
if (viewPages[0] != null) {
if (searchString != null) {
viewPages[0].listView.hide();
if (searchViewPager != null) {
searchViewPager.searchListView.show();
}
}
if (!onlySelect) {
floatingButtonContainer.setVisibility(View.GONE);
}
}
setScrollY(0);
updatePasscodeButton();
actionBar.setBackButtonContentDescription(LocaleController.getString("AccDescrGoBack", R.string.AccDescrGoBack));
}
@Override
public boolean canCollapseSearch() {
if (switchItem != null) {
switchItem.setVisibility(View.VISIBLE);
}
if (proxyItem != null && proxyItemVisible) {
proxyItem.setVisibility(View.VISIBLE);
}
if (searchString != null) {
finishFragment();
return false;
}
return true;
}
@Override
public void onSearchCollapse() {
searching = false;
searchWas = false;
if (viewPages[0] != null) {
viewPages[0].listView.setEmptyView(folderId == 0 ? viewPages[0].progressView : null);
if (!onlySelect) {
floatingButtonContainer.setVisibility(View.VISIBLE);
floatingHidden = true;
floatingButtonTranslation = AndroidUtilities.dp(100);
floatingButtonHideProgress = 1f;
updateFloatingButtonOffset();
}
showSearch(false, true);
}
updatePasscodeButton();
if (menuDrawable != null) {
if (actionBar.getBackButton().getDrawable() != menuDrawable) {
actionBar.setBackButtonDrawable(menuDrawable);
menuDrawable.setRotation(0, true);
}
actionBar.setBackButtonContentDescription(LocaleController.getString("AccDescrOpenMenu", R.string.AccDescrOpenMenu));
}
}
@Override
public void onTextChanged(EditText editText) {
String text = editText.getText().toString();
if (text.length() != 0 || (searchViewPager.dialogsSearchAdapter != null && searchViewPager.dialogsSearchAdapter.hasRecentSearch()) || searchFiltersWasShowed) {
searchWas = true;
if (!searchIsShowed) {
showSearch(true, true);
}
}
searchViewPager.onTextChanged(text);
}
@Override
public void onSearchFilterCleared(FiltersView.MediaFilterData filterData) {
if (!searchIsShowed) {
return;
}
searchViewPager.removeSearchFilter(filterData);
searchViewPager.onTextChanged(searchItem.getSearchField().getText().toString());
updateFiltersView(true, null, null, false, true);
}
@Override
public boolean canToggleSearch() {
return !actionBar.isActionModeShowed() && databaseMigrationHint == null;
}
});
searchItem.setSearchFieldHint(LocaleController.getString("Search", R.string.Search));
searchItem.setContentDescription(LocaleController.getString("Search", R.string.Search));
if (onlySelect) {
actionBar.setBackButtonImage(R.drawable.ic_ab_back);
if (initialDialogsType == 3 && selectAlertString == null) {
actionBar.setTitle(LocaleController.getString("ForwardTo", R.string.ForwardTo));
} else if (initialDialogsType == 10) {
actionBar.setTitle(LocaleController.getString("SelectChats", R.string.SelectChats));
} else {
actionBar.setTitle(LocaleController.getString("SelectChat", R.string.SelectChat));
}
actionBar.setBackgroundColor(Theme.getColor(Theme.key_actionBarDefault));
} else {
if (searchString != null || folderId != 0) {
actionBar.setBackButtonDrawable(backDrawable = new BackDrawable(false));
} else {
actionBar.setBackButtonDrawable(menuDrawable = new MenuDrawable());
actionBar.setBackButtonContentDescription(LocaleController.getString("AccDescrOpenMenu", R.string.AccDescrOpenMenu));
}
if (folderId != 0) {
actionBar.setTitle(LocaleController.getString("ArchivedChats", R.string.ArchivedChats));
} else {
if (BuildVars.DEBUG_VERSION) {
actionBar.setTitle("Telegram Beta");
} else {
actionBar.setTitle(LocaleController.getString("AppName", R.string.AppName));
}
}
if (folderId == 0) {
actionBar.setSupportsHolidayImage(true);
}
}
if (!onlySelect) {
actionBar.setAddToContainer(false);
actionBar.setCastShadows(false);
actionBar.setClipContent(true);
}
actionBar.setTitleActionRunnable(() -> {
if (initialDialogsType != 10) {
hideFloatingButton(false);
}
scrollToTop();
});
if (initialDialogsType == 0 && folderId == 0 && !onlySelect && TextUtils.isEmpty(searchString)) {
scrimPaint = new Paint() {
@Override
public void setAlpha(int a) {
super.setAlpha(a);
if (fragmentView != null) {
fragmentView.invalidate();
}
}
};
filterTabsView = new FilterTabsView(context) {
@Override
public boolean onInterceptTouchEvent(MotionEvent ev) {
getParent().requestDisallowInterceptTouchEvent(true);
maybeStartTracking = false;
return super.onInterceptTouchEvent(ev);
}
@Override
public void setTranslationY(float translationY) {
if (getTranslationY() != translationY) {
super.setTranslationY(translationY);
updateContextViewPosition();
if (fragmentView != null) {
fragmentView.invalidate();
}
}
}
@Override
protected void onLayout(boolean changed, int l, int t, int r, int b) {
super.onLayout(changed, l, t, r, b);
if (scrimView != null) {
scrimView.getLocationInWindow(scrimViewLocation);
fragmentView.invalidate();
}
}
};
filterTabsView.setVisibility(View.GONE);
canShowFilterTabsView = false;
filterTabsView.setDelegate(new FilterTabsView.FilterTabsViewDelegate() {
private void showDeleteAlert(MessagesController.DialogFilter dialogFilter) {
AlertDialog.Builder builder = new AlertDialog.Builder(getParentActivity());
builder.setTitle(LocaleController.getString("FilterDelete", R.string.FilterDelete));
builder.setMessage(LocaleController.getString("FilterDeleteAlert", R.string.FilterDeleteAlert));
builder.setNegativeButton(LocaleController.getString("Cancel", R.string.Cancel), null);
builder.setPositiveButton(LocaleController.getString("Delete", R.string.Delete), (dialog2, which2) -> {
TLRPC.TL_messages_updateDialogFilter req = new TLRPC.TL_messages_updateDialogFilter();
req.id = dialogFilter.id;
getConnectionsManager().sendRequest(req, (response, error) -> AndroidUtilities.runOnUIThread(() -> {
}));
// if (getMessagesController().dialogFilters.size() > 1) {
// filterTabsView.beginCrossfade();
// }
getMessagesController().removeFilter(dialogFilter);
getMessagesStorage().deleteDialogFilter(dialogFilter);
// filterTabsView.commitCrossfade();
});
AlertDialog alertDialog = builder.create();
showDialog(alertDialog);
TextView button = (TextView) alertDialog.getButton(DialogInterface.BUTTON_POSITIVE);
if (button != null) {
button.setTextColor(Theme.getColor(Theme.key_dialogTextRed2));
}
}
@Override
public void onSamePageSelected() {
scrollToTop();
}
@Override
public void onPageReorder(int fromId, int toId) {
for (int a = 0; a < viewPages.length; a++) {
if (viewPages[a].selectedType == fromId) {
viewPages[a].selectedType = toId;
} else if (viewPages[a].selectedType == toId) {
viewPages[a].selectedType = fromId;
}
}
}
@Override
public void onPageSelected(int id, boolean forward) {
if (viewPages[0].selectedType == id) {
return;
}
ArrayList<MessagesController.DialogFilter> dialogFilters = getMessagesController().dialogFilters;
if (id != Integer.MAX_VALUE && (id < 0 || id >= dialogFilters.size())) {
return;
}
if (parentLayout != null) {
parentLayout.getDrawerLayoutContainer().setAllowOpenDrawerBySwipe(id == filterTabsView.getFirstTabId() || SharedConfig.getChatSwipeAction(currentAccount) != SwipeGestureSettingsView.SWIPE_GESTURE_FOLDERS);
}
viewPages[1].selectedType = id;
viewPages[1].setVisibility(View.VISIBLE);
viewPages[1].setTranslationX(viewPages[0].getMeasuredWidth());
showScrollbars(false);
switchToCurrentSelectedMode(true);
animatingForward = forward;
}
@Override
public boolean canPerformActions() {
return !searching;
}
@Override
public void onPageScrolled(float progress) {
if (progress == 1 && viewPages[1].getVisibility() != View.VISIBLE && !searching) {
return;
}
if (animatingForward) {
viewPages[0].setTranslationX(-progress * viewPages[0].getMeasuredWidth());
viewPages[1].setTranslationX(viewPages[0].getMeasuredWidth() - progress * viewPages[0].getMeasuredWidth());
} else {
viewPages[0].setTranslationX(progress * viewPages[0].getMeasuredWidth());
viewPages[1].setTranslationX(progress * viewPages[0].getMeasuredWidth() - viewPages[0].getMeasuredWidth());
}
if (progress == 1) {
ViewPage tempPage = viewPages[0];
viewPages[0] = viewPages[1];
viewPages[1] = tempPage;
viewPages[1].setVisibility(View.GONE);
showScrollbars(true);
updateCounters(false);
checkListLoad(viewPages[0]);
viewPages[0].dialogsAdapter.resume();
viewPages[1].dialogsAdapter.pause();
}
}
@Override
public int getTabCounter(int tabId) {
if (tabId == Integer.MAX_VALUE) {
return getMessagesStorage().getMainUnreadCount();
}
ArrayList<MessagesController.DialogFilter> dialogFilters = getMessagesController().dialogFilters;
if (tabId < 0 || tabId >= dialogFilters.size()) {
return 0;
}
return getMessagesController().dialogFilters.get(tabId).unreadCount;
}
@Override
public boolean didSelectTab(FilterTabsView.TabView tabView, boolean selected) {
if (actionBar.isActionModeShowed()) {
return false;
}
if (scrimPopupWindow != null) {
scrimPopupWindow.dismiss();
scrimPopupWindow = null;
scrimPopupWindowItems = null;
return false;
}
Rect rect = new Rect();
MessagesController.DialogFilter dialogFilter;
if (tabView.getId() == Integer.MAX_VALUE) {
dialogFilter = null;
} else {
dialogFilter = getMessagesController().dialogFilters.get(tabView.getId());
}
ActionBarPopupWindow.ActionBarPopupWindowLayout popupLayout = new ActionBarPopupWindow.ActionBarPopupWindowLayout(getParentActivity());
popupLayout.setOnTouchListener(new View.OnTouchListener() {
private int[] pos = new int[2];
@Override
public boolean onTouch(View v, MotionEvent event) {
if (event.getActionMasked() == MotionEvent.ACTION_DOWN) {
if (scrimPopupWindow != null && scrimPopupWindow.isShowing()) {
View contentView = scrimPopupWindow.getContentView();
contentView.getLocationInWindow(pos);
rect.set(pos[0], pos[1], pos[0] + contentView.getMeasuredWidth(), pos[1] + contentView.getMeasuredHeight());
if (!rect.contains((int) event.getX(), (int) event.getY())) {
scrimPopupWindow.dismiss();
}
}
} else if (event.getActionMasked() == MotionEvent.ACTION_OUTSIDE) {
if (scrimPopupWindow != null && scrimPopupWindow.isShowing()) {
scrimPopupWindow.dismiss();
}
}
return false;
}
});
popupLayout.setDispatchKeyEventListener(keyEvent -> {
if (keyEvent.getKeyCode() == KeyEvent.KEYCODE_BACK && keyEvent.getRepeatCount() == 0 && scrimPopupWindow != null && scrimPopupWindow.isShowing()) {
scrimPopupWindow.dismiss();
}
});
Rect backgroundPaddings = new Rect();
Drawable shadowDrawable = getParentActivity().getResources().getDrawable(R.drawable.popup_fixed_alert).mutate();
shadowDrawable.getPadding(backgroundPaddings);
popupLayout.setBackgroundDrawable(shadowDrawable);
popupLayout.setBackgroundColor(Theme.getColor(Theme.key_actionBarDefaultSubmenuBackground));
LinearLayout linearLayout = new LinearLayout(getParentActivity());
ScrollView scrollView;
if (Build.VERSION.SDK_INT >= 21) {
scrollView = new ScrollView(getParentActivity(), null, 0, R.style.scrollbarShapeStyle) {
@Override
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
setMeasuredDimension(linearLayout.getMeasuredWidth(), getMeasuredHeight());
}
};
} else {
scrollView = new ScrollView(getParentActivity());
}
scrollView.setClipToPadding(false);
popupLayout.addView(scrollView, LayoutHelper.createFrame(LayoutHelper.WRAP_CONTENT, LayoutHelper.WRAP_CONTENT));
linearLayout.setMinimumWidth(AndroidUtilities.dp(200));
linearLayout.setOrientation(LinearLayout.VERTICAL);
scrimPopupWindowItems = new ActionBarMenuSubItem[3];
for (int a = 0, N = (tabView.getId() == Integer.MAX_VALUE ? 2 : 3); a < N; a++) {
ActionBarMenuSubItem cell = new ActionBarMenuSubItem(getParentActivity(), a == 0, a == N - 1);
if (a == 0) {
if (getMessagesController().dialogFilters.size() <= 1) {
continue;
}
cell.setTextAndIcon(LocaleController.getString("FilterReorder", R.string.FilterReorder), R.drawable.tabs_reorder);
} else if (a == 1) {
if (N == 2) {
cell.setTextAndIcon(LocaleController.getString("FilterEditAll", R.string.FilterEditAll), R.drawable.msg_edit);
} else {
cell.setTextAndIcon(LocaleController.getString("FilterEdit", R.string.FilterEdit), R.drawable.msg_edit);
}
} else {
cell.setTextAndIcon(LocaleController.getString("FilterDeleteItem", R.string.FilterDeleteItem), R.drawable.msg_delete);
}
scrimPopupWindowItems[a] = cell;
linearLayout.addView(cell);
final int i = a;
cell.setOnClickListener(v1 -> {
if (i == 0) {
resetScroll();
filterTabsView.setIsEditing(true);
showDoneItem(true);
} else if (i == 1) {
if (N == 2) {
presentFragment(new FiltersSetupActivity());
} else {
presentFragment(new FilterCreateActivity(dialogFilter));
}
} else if (i == 2) {
showDeleteAlert(dialogFilter);
}
if (scrimPopupWindow != null) {
scrimPopupWindow.dismiss();
}
});
}
scrollView.addView(linearLayout, LayoutHelper.createScroll(LayoutHelper.WRAP_CONTENT, LayoutHelper.WRAP_CONTENT, Gravity.LEFT | Gravity.TOP));
scrimPopupWindow = new ActionBarPopupWindow(popupLayout, LayoutHelper.WRAP_CONTENT, LayoutHelper.WRAP_CONTENT) {
@Override
public void dismiss() {
super.dismiss();
if (scrimPopupWindow != this) {
return;
}
scrimPopupWindow = null;
scrimPopupWindowItems = null;
if (scrimAnimatorSet != null) {
scrimAnimatorSet.cancel();
scrimAnimatorSet = null;
}
scrimAnimatorSet = new AnimatorSet();
ArrayList<Animator> animators = new ArrayList<>();
animators.add(ObjectAnimator.ofInt(scrimPaint, AnimationProperties.PAINT_ALPHA, 0));
scrimAnimatorSet.playTogether(animators);
scrimAnimatorSet.setDuration(220);
scrimAnimatorSet.addListener(new AnimatorListenerAdapter() {
@Override
public void onAnimationEnd(Animator animation) {
if (scrimView != null) {
scrimView.setBackground(null);
scrimView = null;
}
if (fragmentView != null) {
fragmentView.invalidate();
}
}
});
scrimAnimatorSet.start();
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
getParentActivity().getWindow().getDecorView().setImportantForAccessibility(View.IMPORTANT_FOR_ACCESSIBILITY_AUTO);
}
}
};
tabView.setBackground(Theme.createRoundRectDrawable(AndroidUtilities.dp(6), Theme.getColor(Theme.key_actionBarDefault)));
scrimPopupWindow.setDismissAnimationDuration(220);
scrimPopupWindow.setOutsideTouchable(true);
scrimPopupWindow.setClippingEnabled(true);
scrimPopupWindow.setAnimationStyle(R.style.PopupContextAnimation);
scrimPopupWindow.setFocusable(true);
popupLayout.measure(View.MeasureSpec.makeMeasureSpec(AndroidUtilities.dp(1000), View.MeasureSpec.AT_MOST), View.MeasureSpec.makeMeasureSpec(AndroidUtilities.dp(1000), View.MeasureSpec.AT_MOST));
scrimPopupWindow.setInputMethodMode(ActionBarPopupWindow.INPUT_METHOD_NOT_NEEDED);
scrimPopupWindow.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_UNSPECIFIED);
scrimPopupWindow.getContentView().setFocusableInTouchMode(true);
tabView.getLocationInWindow(scrimViewLocation);
int popupX = scrimViewLocation[0] + backgroundPaddings.left - AndroidUtilities.dp(16);
if (popupX < AndroidUtilities.dp(6)) {
popupX = AndroidUtilities.dp(6);
} else if (popupX > fragmentView.getMeasuredWidth() - AndroidUtilities.dp(6) - popupLayout.getMeasuredWidth()) {
popupX = fragmentView.getMeasuredWidth() - AndroidUtilities.dp(6) - popupLayout.getMeasuredWidth();
}
int popupY = scrimViewLocation[1] + tabView.getMeasuredHeight() - AndroidUtilities.dp(12);
scrimPopupWindow.showAtLocation(fragmentView, Gravity.LEFT | Gravity.TOP, popupX, popupY);
scrimView = tabView;
scrimViewSelected = selected;
fragmentView.invalidate();
if (scrimAnimatorSet != null) {
scrimAnimatorSet.cancel();
}
scrimAnimatorSet = new AnimatorSet();
ArrayList<Animator> animators = new ArrayList<>();
animators.add(ObjectAnimator.ofInt(scrimPaint, AnimationProperties.PAINT_ALPHA, 0, 50));
scrimAnimatorSet.playTogether(animators);
scrimAnimatorSet.setDuration(150);
scrimAnimatorSet.start();
return true;
}
@Override
public boolean isTabMenuVisible() {
return scrimPopupWindow != null && scrimPopupWindow.isShowing();
}
@Override
public void onDeletePressed(int id) {
showDeleteAlert(getMessagesController().dialogFilters.get(id));
}
});
}
if (allowSwitchAccount && UserConfig.getActivatedAccountsCount() > 1) {
switchItem = menu.addItemWithWidth(1, 0, AndroidUtilities.dp(56));
AvatarDrawable avatarDrawable = new AvatarDrawable();
avatarDrawable.setTextSize(AndroidUtilities.dp(12));
BackupImageView imageView = new BackupImageView(context);
imageView.setRoundRadius(AndroidUtilities.dp(18));
switchItem.addView(imageView, LayoutHelper.createFrame(36, 36, Gravity.CENTER));
TLRPC.User user = getUserConfig().getCurrentUser();
avatarDrawable.setInfo(user);
imageView.getImageReceiver().setCurrentAccount(currentAccount);
imageView.setImage(ImageLocation.getForUserOrChat(user, ImageLocation.TYPE_SMALL), "50_50", ImageLocation.getForUserOrChat(user, ImageLocation.TYPE_STRIPPED), "50_50", avatarDrawable, user);
for (int a = 0; a < UserConfig.MAX_ACCOUNT_COUNT; a++) {
TLRPC.User u = AccountInstance.getInstance(a).getUserConfig().getCurrentUser();
if (u != null) {
AccountSelectCell cell = new AccountSelectCell(context, false);
cell.setAccount(a, true);
switchItem.addSubItem(10 + a, cell, AndroidUtilities.dp(230), AndroidUtilities.dp(48));
}
}
}
actionBar.setAllowOverlayTitle(true);
if (sideMenu != null) {
sideMenu.setBackgroundColor(Theme.getColor(Theme.key_chats_menuBackground));
sideMenu.setGlowColor(Theme.getColor(Theme.key_chats_menuBackground));
sideMenu.getAdapter().notifyDataSetChanged();
}
createActionMode(null);
ContentView contentView = new ContentView(context);
fragmentView = contentView;
int pagesCount = folderId == 0 && initialDialogsType == 0 && !onlySelect ? 2 : 1;
viewPages = new ViewPage[pagesCount];
for (int a = 0; a < pagesCount; a++) {
final ViewPage viewPage = new ViewPage(context) {
@Override
public void setTranslationX(float translationX) {
super.setTranslationX(translationX);
if (tabsAnimationInProgress) {
if (viewPages[0] == this) {
float scrollProgress = Math.abs(viewPages[0].getTranslationX()) / (float) viewPages[0].getMeasuredWidth();
filterTabsView.selectTabWithId(viewPages[1].selectedType, scrollProgress);
}
}
}
};
contentView.addView(viewPage, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.MATCH_PARENT));
viewPage.dialogsType = initialDialogsType;
viewPages[a] = viewPage;
viewPage.progressView = new FlickerLoadingView(context);
viewPage.progressView.setViewType(FlickerLoadingView.DIALOG_CELL_TYPE);
viewPage.progressView.setVisibility(View.GONE);
viewPage.addView(viewPage.progressView, LayoutHelper.createFrame(LayoutHelper.WRAP_CONTENT, LayoutHelper.WRAP_CONTENT, Gravity.CENTER));
viewPage.listView = new DialogsRecyclerView(context, viewPage);
viewPage.listView.setAccessibilityEnabled(false);
viewPage.listView.setAnimateEmptyView(true, 0);
viewPage.listView.setClipToPadding(false);
viewPage.listView.setPivotY(0);
viewPage.dialogsItemAnimator = new DialogsItemAnimator(viewPage.listView) {
@Override
public void onRemoveStarting(RecyclerView.ViewHolder item) {
super.onRemoveStarting(item);
if (viewPage.layoutManager.findFirstVisibleItemPosition() == 0) {
View v = viewPage.layoutManager.findViewByPosition(0);
if (v != null) {
v.invalidate();
}
if (viewPage.archivePullViewState == ARCHIVE_ITEM_STATE_HIDDEN) {
viewPage.archivePullViewState = ARCHIVE_ITEM_STATE_SHOWED;
}
if (viewPage.pullForegroundDrawable != null) {
viewPage.pullForegroundDrawable.doNotShow();
}
}
}
@Override
public void onRemoveFinished(RecyclerView.ViewHolder item) {
if (dialogRemoveFinished == 2) {
dialogRemoveFinished = 1;
}
}
@Override
public void onAddFinished(RecyclerView.ViewHolder item) {
if (dialogInsertFinished == 2) {
dialogInsertFinished = 1;
}
}
@Override
public void onChangeFinished(RecyclerView.ViewHolder item, boolean oldItem) {
if (dialogChangeFinished == 2) {
dialogChangeFinished = 1;
}
}
@Override
protected void onAllAnimationsDone() {
if (dialogRemoveFinished == 1 || dialogInsertFinished == 1 || dialogChangeFinished == 1) {
onDialogAnimationFinished();
}
}
};
// viewPage.listView.setItemAnimator(viewPage.dialogsItemAnimator);
viewPage.listView.setVerticalScrollBarEnabled(true);
viewPage.listView.setInstantClick(true);
viewPage.layoutManager = new LinearLayoutManager(context) {
private boolean fixOffset;
@Override
public void scrollToPositionWithOffset(int position, int offset) {
if (fixOffset) {
offset -= viewPage.listView.getPaddingTop();
}
super.scrollToPositionWithOffset(position, offset);
}
@Override
public void prepareForDrop(@NonNull View view, @NonNull View target, int x, int y) {
fixOffset = true;
super.prepareForDrop(view, target, x, y);
fixOffset = false;
}
@Override
public void smoothScrollToPosition(RecyclerView recyclerView, RecyclerView.State state, int position) {
if (hasHiddenArchive() && position == 1) {
super.smoothScrollToPosition(recyclerView, state, position);
} else {
LinearSmoothScrollerCustom linearSmoothScroller = new LinearSmoothScrollerCustom(recyclerView.getContext(), LinearSmoothScrollerCustom.POSITION_MIDDLE);
linearSmoothScroller.setTargetPosition(position);
startSmoothScroll(linearSmoothScroller);
}
}
@Override
public int scrollVerticallyBy(int dy, RecyclerView.Recycler recycler, RecyclerView.State state) {
if (viewPage.listView.fastScrollAnimationRunning) {
return 0;
}
boolean isDragging = viewPage.listView.getScrollState() == RecyclerView.SCROLL_STATE_DRAGGING;
int measuredDy = dy;
int pTop = viewPage.listView.getPaddingTop();
if (viewPage.dialogsType == 0 && !onlySelect && folderId == 0 && dy < 0 && getMessagesController().hasHiddenArchive() && viewPage.archivePullViewState == ARCHIVE_ITEM_STATE_HIDDEN) {
viewPage.listView.setOverScrollMode(View.OVER_SCROLL_ALWAYS);
int currentPosition = viewPage.layoutManager.findFirstVisibleItemPosition();
if (currentPosition == 0) {
View view = viewPage.layoutManager.findViewByPosition(currentPosition);
if (view != null && (view.getBottom() - pTop) <= AndroidUtilities.dp(1)) {
currentPosition = 1;
}
}
if (!isDragging) {
View view = viewPage.layoutManager.findViewByPosition(currentPosition);
if (view != null) {
int dialogHeight = AndroidUtilities.dp(SharedConfig.useThreeLinesLayout ? 78 : 72) + 1;
int canScrollDy = -(view.getTop() - pTop) + (currentPosition - 1) * dialogHeight;
int positiveDy = Math.abs(dy);
if (canScrollDy < positiveDy) {
measuredDy = -canScrollDy;
}
}
} else if (currentPosition == 0) {
View v = viewPage.layoutManager.findViewByPosition(currentPosition);
float k = 1f + ((v.getTop() - pTop) / (float) v.getMeasuredHeight());
if (k > 1f) {
k = 1f;
}
viewPage.listView.setOverScrollMode(View.OVER_SCROLL_NEVER);
measuredDy *= PullForegroundDrawable.startPullParallax - PullForegroundDrawable.endPullParallax * k;
if (measuredDy > -1) {
measuredDy = -1;
}
if (undoView[0].getVisibility() == View.VISIBLE) {
undoView[0].hide(true, 1);
}
}
}
if (viewPage.dialogsType == 0 && viewPage.listView.getViewOffset() != 0 && dy > 0 && isDragging) {
float ty = (int) viewPage.listView.getViewOffset();
ty -= dy;
if (ty < 0) {
measuredDy = (int) ty;
ty = 0;
} else {
measuredDy = 0;
}
viewPage.listView.setViewsOffset(ty);
}
if (viewPage.dialogsType == 0 && viewPage.archivePullViewState != ARCHIVE_ITEM_STATE_PINNED && hasHiddenArchive()) {
int usedDy = super.scrollVerticallyBy(measuredDy, recycler, state);
if (viewPage.pullForegroundDrawable != null) {
viewPage.pullForegroundDrawable.scrollDy = usedDy;
}
int currentPosition = viewPage.layoutManager.findFirstVisibleItemPosition();
View firstView = null;
if (currentPosition == 0) {
firstView = viewPage.layoutManager.findViewByPosition(currentPosition);
}
if (currentPosition == 0 && firstView != null && (firstView.getBottom() - pTop) >= AndroidUtilities.dp(4)) {
if (startArchivePullingTime == 0) {
startArchivePullingTime = System.currentTimeMillis();
}
if (viewPage.archivePullViewState == ARCHIVE_ITEM_STATE_HIDDEN) {
if (viewPage.pullForegroundDrawable != null) {
viewPage.pullForegroundDrawable.showHidden();
}
}
float k = 1f + ((firstView.getTop() - pTop) / (float) firstView.getMeasuredHeight());
if (k > 1f) {
k = 1f;
}
long pullingTime = System.currentTimeMillis() - startArchivePullingTime;
boolean canShowInternal = k > PullForegroundDrawable.SNAP_HEIGHT && pullingTime > PullForegroundDrawable.minPullingTime + 20;
if (canShowHiddenArchive != canShowInternal) {
canShowHiddenArchive = canShowInternal;
if (viewPage.archivePullViewState == ARCHIVE_ITEM_STATE_HIDDEN) {
viewPage.listView.performHapticFeedback(HapticFeedbackConstants.KEYBOARD_TAP, HapticFeedbackConstants.FLAG_IGNORE_GLOBAL_SETTING);
if (viewPage.pullForegroundDrawable != null) {
viewPage.pullForegroundDrawable.colorize(canShowInternal);
}
}
}
if (viewPage.archivePullViewState == ARCHIVE_ITEM_STATE_HIDDEN && measuredDy - usedDy != 0 && dy < 0 && isDragging) {
float ty;
float tk = (viewPage.listView.getViewOffset() / PullForegroundDrawable.getMaxOverscroll());
tk = 1f - tk;
ty = (viewPage.listView.getViewOffset() - dy * PullForegroundDrawable.startPullOverScroll * tk);
viewPage.listView.setViewsOffset(ty);
}
if (viewPage.pullForegroundDrawable != null) {
viewPage.pullForegroundDrawable.pullProgress = k;
viewPage.pullForegroundDrawable.setListView(viewPage.listView);
}
} else {
startArchivePullingTime = 0;
canShowHiddenArchive = false;
viewPage.archivePullViewState = ARCHIVE_ITEM_STATE_HIDDEN;
if (viewPage.pullForegroundDrawable != null) {
viewPage.pullForegroundDrawable.resetText();
viewPage.pullForegroundDrawable.pullProgress = 0f;
viewPage.pullForegroundDrawable.setListView(viewPage.listView);
}
}
if (firstView != null) {
firstView.invalidate();
}
return usedDy;
}
return super.scrollVerticallyBy(measuredDy, recycler, state);
}
@Override
public void onLayoutChildren(RecyclerView.Recycler recycler, RecyclerView.State state) {
if (BuildVars.DEBUG_PRIVATE_VERSION) {
try {
super.onLayoutChildren(recycler, state);
} catch (IndexOutOfBoundsException e) {
throw new RuntimeException("Inconsistency detected. " + "dialogsListIsFrozen=" + dialogsListFrozen + " lastUpdateAction=" + debugLastUpdateAction);
}
} else {
try {
super.onLayoutChildren(recycler, state);
} catch (IndexOutOfBoundsException e) {
FileLog.e(e);
AndroidUtilities.runOnUIThread(() -> viewPage.dialogsAdapter.notifyDataSetChanged());
}
}
}
};
viewPage.layoutManager.setOrientation(LinearLayoutManager.VERTICAL);
viewPage.listView.setLayoutManager(viewPage.layoutManager);
viewPage.listView.setVerticalScrollbarPosition(LocaleController.isRTL ? RecyclerListView.SCROLLBAR_POSITION_LEFT : RecyclerListView.SCROLLBAR_POSITION_RIGHT);
viewPage.addView(viewPage.listView, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.MATCH_PARENT));
viewPage.listView.setOnItemClickListener((view, position) -> {
if (initialDialogsType == 10) {
onItemLongClick(view, position, 0, 0, viewPage.dialogsType, viewPage.dialogsAdapter);
return;
} else if ((initialDialogsType == 11 || initialDialogsType == 13) && position == 1) {
Bundle args = new Bundle();
args.putBoolean("forImport", true);
long[] array = new long[] { getUserConfig().getClientUserId() };
args.putLongArray("result", array);
args.putInt("chatType", ChatObject.CHAT_TYPE_MEGAGROUP);
String title = arguments.getString("importTitle");
if (title != null) {
args.putString("title", title);
}
GroupCreateFinalActivity activity = new GroupCreateFinalActivity(args);
activity.setDelegate(new GroupCreateFinalActivity.GroupCreateFinalActivityDelegate() {
@Override
public void didStartChatCreation() {
}
@Override
public void didFinishChatCreation(GroupCreateFinalActivity fragment, long chatId) {
ArrayList<Long> arrayList = new ArrayList<>();
arrayList.add(-chatId);
DialogsActivityDelegate dialogsActivityDelegate = delegate;
removeSelfFromStack();
dialogsActivityDelegate.didSelectDialogs(DialogsActivity.this, arrayList, null, true);
}
@Override
public void didFailChatCreation() {
}
});
presentFragment(activity);
return;
}
onItemClick(view, position, viewPage.dialogsAdapter);
});
viewPage.listView.setOnItemLongClickListener(new RecyclerListView.OnItemLongClickListenerExtended() {
@Override
public boolean onItemClick(View view, int position, float x, float y) {
if (filterTabsView != null && filterTabsView.getVisibility() == View.VISIBLE && filterTabsView.isEditing()) {
return false;
}
return onItemLongClick(view, position, x, y, viewPage.dialogsType, viewPage.dialogsAdapter);
}
@Override
public void onLongClickRelease() {
finishPreviewFragment();
}
@Override
public void onMove(float dx, float dy) {
movePreviewFragment(dy);
}
});
viewPage.swipeController = new SwipeController(viewPage);
viewPage.recyclerItemsEnterAnimator = new RecyclerItemsEnterAnimator(viewPage.listView, false);
viewPage.itemTouchhelper = new ItemTouchHelper(viewPage.swipeController);
viewPage.itemTouchhelper.attachToRecyclerView(viewPage.listView);
viewPage.listView.setOnScrollListener(new RecyclerView.OnScrollListener() {
private boolean wasManualScroll;
@Override
public void onScrollStateChanged(RecyclerView recyclerView, int newState) {
if (newState == RecyclerView.SCROLL_STATE_DRAGGING) {
wasManualScroll = true;
scrollingManually = true;
} else {
scrollingManually = false;
}
if (newState == RecyclerView.SCROLL_STATE_IDLE) {
wasManualScroll = false;
disableActionBarScrolling = false;
if (waitingForScrollFinished) {
waitingForScrollFinished = false;
if (updatePullAfterScroll) {
viewPage.listView.updatePullState();
updatePullAfterScroll = false;
}
viewPage.dialogsAdapter.notifyDataSetChanged();
}
if (filterTabsView != null && filterTabsView.getVisibility() == View.VISIBLE && viewPages[0].listView == recyclerView) {
int scrollY = (int) -actionBar.getTranslationY();
int actionBarHeight = ActionBar.getCurrentActionBarHeight();
if (scrollY != 0 && scrollY != actionBarHeight) {
if (scrollY < actionBarHeight / 2) {
recyclerView.smoothScrollBy(0, -scrollY);
} else if (viewPages[0].listView.canScrollVertically(1)) {
recyclerView.smoothScrollBy(0, actionBarHeight - scrollY);
}
}
}
}
}
@Override
public void onScrolled(RecyclerView recyclerView, int dx, int dy) {
viewPage.dialogsItemAnimator.onListScroll(-dy);
checkListLoad(viewPage);
if (initialDialogsType != 10 && wasManualScroll && floatingButtonContainer.getVisibility() != View.GONE && recyclerView.getChildCount() > 0) {
int firstVisibleItem = viewPage.layoutManager.findFirstVisibleItemPosition();
if (firstVisibleItem != RecyclerView.NO_POSITION) {
RecyclerView.ViewHolder holder = recyclerView.findViewHolderForAdapterPosition(firstVisibleItem);
if (!hasHiddenArchive() || holder != null && holder.getAdapterPosition() != 0) {
int firstViewTop = 0;
if (holder != null) {
firstViewTop = holder.itemView.getTop();
}
boolean goingDown;
boolean changed = true;
if (prevPosition == firstVisibleItem) {
final int topDelta = prevTop - firstViewTop;
goingDown = firstViewTop < prevTop;
changed = Math.abs(topDelta) > 1;
} else {
goingDown = firstVisibleItem > prevPosition;
}
if (changed && scrollUpdated && (goingDown || scrollingManually)) {
hideFloatingButton(goingDown);
}
prevPosition = firstVisibleItem;
prevTop = firstViewTop;
scrollUpdated = true;
}
}
}
if (filterTabsView != null && filterTabsView.getVisibility() == View.VISIBLE && recyclerView == viewPages[0].listView && !searching && !actionBar.isActionModeShowed() && !disableActionBarScrolling && filterTabsViewIsVisible) {
if (dy > 0 && hasHiddenArchive() && viewPages[0].dialogsType == 0) {
View child = recyclerView.getChildAt(0);
if (child != null) {
RecyclerView.ViewHolder holder = recyclerView.getChildViewHolder(child);
if (holder.getAdapterPosition() == 0) {
int visiblePartAfterScroll = child.getMeasuredHeight() + (child.getTop() - recyclerView.getPaddingTop());
if (visiblePartAfterScroll + dy > 0) {
if (visiblePartAfterScroll < 0) {
dy = -visiblePartAfterScroll;
} else {
return;
}
}
}
}
}
float currentTranslation = actionBar.getTranslationY();
float newTranslation = currentTranslation - dy;
if (newTranslation < -ActionBar.getCurrentActionBarHeight()) {
newTranslation = -ActionBar.getCurrentActionBarHeight();
} else if (newTranslation > 0) {
newTranslation = 0;
}
if (newTranslation != currentTranslation) {
setScrollY(newTranslation);
}
}
}
});
viewPage.archivePullViewState = SharedConfig.archiveHidden ? ARCHIVE_ITEM_STATE_HIDDEN : ARCHIVE_ITEM_STATE_PINNED;
if (viewPage.pullForegroundDrawable == null && folderId == 0) {
viewPage.pullForegroundDrawable = new PullForegroundDrawable(LocaleController.getString("AccSwipeForArchive", R.string.AccSwipeForArchive), LocaleController.getString("AccReleaseForArchive", R.string.AccReleaseForArchive)) {
@Override
protected float getViewOffset() {
return viewPage.listView.getViewOffset();
}
};
if (hasHiddenArchive()) {
viewPage.pullForegroundDrawable.showHidden();
} else {
viewPage.pullForegroundDrawable.doNotShow();
}
viewPage.pullForegroundDrawable.setWillDraw(viewPage.archivePullViewState != ARCHIVE_ITEM_STATE_PINNED);
}
viewPage.dialogsAdapter = new DialogsAdapter(this, context, viewPage.dialogsType, folderId, onlySelect, selectedDialogs, currentAccount) {
@Override
public void notifyDataSetChanged() {
viewPage.lastItemsCount = getItemCount();
try {
super.notifyDataSetChanged();
} catch (Exception e) {
FileLog.e(e);
}
}
};
viewPage.dialogsAdapter.setForceShowEmptyCell(afterSignup);
if (AndroidUtilities.isTablet() && openedDialogId != 0) {
viewPage.dialogsAdapter.setOpenedDialogId(openedDialogId);
}
viewPage.dialogsAdapter.setArchivedPullDrawable(viewPage.pullForegroundDrawable);
viewPage.listView.setAdapter(viewPage.dialogsAdapter);
viewPage.listView.setEmptyView(folderId == 0 ? viewPage.progressView : null);
viewPage.scrollHelper = new RecyclerAnimationScrollHelper(viewPage.listView, viewPage.layoutManager);
if (a != 0) {
viewPages[a].setVisibility(View.GONE);
}
}
int type = 0;
if (searchString != null) {
type = 2;
} else if (!onlySelect) {
type = 1;
}
searchViewPager = new SearchViewPager(context, this, type, initialDialogsType, folderId, new SearchViewPager.ChatPreviewDelegate() {
@Override
public void startChatPreview(DialogCell cell) {
showChatPreview(cell);
}
@Override
public void move(float dy) {
movePreviewFragment(dy);
}
@Override
public void finish() {
finishPreviewFragment();
}
});
contentView.addView(searchViewPager);
searchViewPager.dialogsSearchAdapter.setDelegate(new DialogsSearchAdapter.DialogsSearchAdapterDelegate() {
@Override
public void searchStateChanged(boolean search, boolean animated) {
if (searchViewPager.emptyView.getVisibility() == View.VISIBLE) {
animated = true;
}
if (searching && searchWas && searchViewPager.emptyView != null) {
if (search || searchViewPager.dialogsSearchAdapter.getItemCount() != 0) {
searchViewPager.emptyView.showProgress(true, animated);
} else {
searchViewPager.emptyView.showProgress(false, animated);
}
}
if (search && searchViewPager.dialogsSearchAdapter.getItemCount() == 0) {
searchViewPager.cancelEnterAnimation();
}
}
@Override
public void didPressedOnSubDialog(long did) {
if (onlySelect) {
if (!validateSlowModeDialog(did)) {
return;
}
if (!selectedDialogs.isEmpty()) {
boolean checked = addOrRemoveSelectedDialog(did, null);
findAndUpdateCheckBox(did, checked);
updateSelectedCount();
actionBar.closeSearchField();
} else {
didSelectResult(did, true, false);
}
} else {
Bundle args = new Bundle();
if (DialogObject.isUserDialog(did)) {
args.putLong("user_id", did);
} else {
args.putLong("chat_id", -did);
}
closeSearch();
if (AndroidUtilities.isTablet() && viewPages != null) {
for (int a = 0; a < viewPages.length; a++) {
viewPages[a].dialogsAdapter.setOpenedDialogId(openedDialogId = did);
}
updateVisibleRows(MessagesController.UPDATE_MASK_SELECT_DIALOG);
}
if (searchString != null) {
if (getMessagesController().checkCanOpenChat(args, DialogsActivity.this)) {
getNotificationCenter().postNotificationName(NotificationCenter.closeChats);
presentFragment(new ChatActivity(args));
}
} else {
if (getMessagesController().checkCanOpenChat(args, DialogsActivity.this)) {
presentFragment(new ChatActivity(args));
}
}
}
}
@Override
public void needRemoveHint(long did) {
if (getParentActivity() == null) {
return;
}
TLRPC.User user = getMessagesController().getUser(did);
if (user == null) {
return;
}
AlertDialog.Builder builder = new AlertDialog.Builder(getParentActivity());
builder.setTitle(LocaleController.getString("ChatHintsDeleteAlertTitle", R.string.ChatHintsDeleteAlertTitle));
builder.setMessage(AndroidUtilities.replaceTags(LocaleController.formatString("ChatHintsDeleteAlert", R.string.ChatHintsDeleteAlert, ContactsController.formatName(user.first_name, user.last_name))));
builder.setPositiveButton(LocaleController.getString("StickersRemove", R.string.StickersRemove), (dialogInterface, i) -> getMediaDataController().removePeer(did));
builder.setNegativeButton(LocaleController.getString("Cancel", R.string.Cancel), null);
AlertDialog dialog = builder.create();
showDialog(dialog);
TextView button = (TextView) dialog.getButton(DialogInterface.BUTTON_POSITIVE);
if (button != null) {
button.setTextColor(Theme.getColor(Theme.key_dialogTextRed2));
}
}
@Override
public void needClearList() {
AlertDialog.Builder builder = new AlertDialog.Builder(getParentActivity());
builder.setTitle(LocaleController.getString("ClearSearchAlertTitle", R.string.ClearSearchAlertTitle));
builder.setMessage(LocaleController.getString("ClearSearchAlert", R.string.ClearSearchAlert));
builder.setPositiveButton(LocaleController.getString("ClearButton", R.string.ClearButton).toUpperCase(), (dialogInterface, i) -> {
if (searchViewPager.dialogsSearchAdapter.isRecentSearchDisplayed()) {
searchViewPager.dialogsSearchAdapter.clearRecentSearch();
} else {
searchViewPager.dialogsSearchAdapter.clearRecentHashtags();
}
});
builder.setNegativeButton(LocaleController.getString("Cancel", R.string.Cancel), null);
AlertDialog dialog = builder.create();
showDialog(dialog);
TextView button = (TextView) dialog.getButton(DialogInterface.BUTTON_POSITIVE);
if (button != null) {
button.setTextColor(Theme.getColor(Theme.key_dialogTextRed2));
}
}
@Override
public void runResultsEnterAnimation() {
if (searchViewPager != null) {
searchViewPager.runResultsEnterAnimation();
}
}
@Override
public boolean isSelected(long dialogId) {
return selectedDialogs.contains(dialogId);
}
});
searchViewPager.searchListView.setOnItemClickListener((view, position) -> {
if (initialDialogsType == 10) {
onItemLongClick(view, position, 0, 0, -1, searchViewPager.dialogsSearchAdapter);
return;
}
onItemClick(view, position, searchViewPager.dialogsSearchAdapter);
});
searchViewPager.searchListView.setOnItemLongClickListener(new RecyclerListView.OnItemLongClickListenerExtended() {
@Override
public boolean onItemClick(View view, int position, float x, float y) {
return onItemLongClick(view, position, x, y, -1, searchViewPager.dialogsSearchAdapter);
}
@Override
public void onLongClickRelease() {
finishPreviewFragment();
}
@Override
public void onMove(float dx, float dy) {
movePreviewFragment(dy);
}
});
searchViewPager.setFilteredSearchViewDelegate((showMediaFilters, users, dates, archive) -> DialogsActivity.this.updateFiltersView(showMediaFilters, users, dates, archive, true));
searchViewPager.setVisibility(View.GONE);
filtersView = new FiltersView(getParentActivity(), null);
filtersView.setOnItemClickListener((view, position) -> {
filtersView.cancelClickRunnables(true);
addSearchFilter(filtersView.getFilterAt(position));
});
contentView.addView(filtersView, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT, Gravity.TOP));
filtersView.setVisibility(View.GONE);
floatingButtonContainer = new FrameLayout(context);
floatingButtonContainer.setVisibility(onlySelect && initialDialogsType != 10 || folderId != 0 ? View.GONE : View.VISIBLE);
contentView.addView(floatingButtonContainer, LayoutHelper.createFrame((Build.VERSION.SDK_INT >= 21 ? 56 : 60) + 20, (Build.VERSION.SDK_INT >= 21 ? 56 : 60) + 20, (LocaleController.isRTL ? Gravity.LEFT : Gravity.RIGHT) | Gravity.BOTTOM, LocaleController.isRTL ? 4 : 0, 0, LocaleController.isRTL ? 0 : 4, 0));
floatingButtonContainer.setOnClickListener(v -> {
if (initialDialogsType == 10) {
if (delegate == null || selectedDialogs.isEmpty()) {
return;
}
delegate.didSelectDialogs(DialogsActivity.this, selectedDialogs, null, false);
} else {
Bundle args = new Bundle();
args.putBoolean("destroyAfterSelect", true);
presentFragment(new ContactsActivity(args));
}
});
floatingButton = new RLottieImageView(context);
floatingButton.setScaleType(ImageView.ScaleType.CENTER);
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));
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));
if (initialDialogsType == 10) {
floatingButton.setImageResource(R.drawable.floating_check);
floatingButtonContainer.setContentDescription(LocaleController.getString("Done", R.string.Done));
} else {
floatingButton.setAnimation(R.raw.write_contacts_fab_icon, 52, 52);
floatingButtonContainer.setContentDescription(LocaleController.getString("NewMessageTitle", R.string.NewMessageTitle));
}
if (Build.VERSION.SDK_INT >= 21) {
StateListAnimator animator = new StateListAnimator();
animator.addState(new int[] { android.R.attr.state_pressed }, ObjectAnimator.ofFloat(floatingButton, View.TRANSLATION_Z, AndroidUtilities.dp(2), AndroidUtilities.dp(4)).setDuration(200));
animator.addState(new int[] {}, ObjectAnimator.ofFloat(floatingButton, View.TRANSLATION_Z, AndroidUtilities.dp(4), AndroidUtilities.dp(2)).setDuration(200));
floatingButton.setStateListAnimator(animator);
floatingButton.setOutlineProvider(new ViewOutlineProvider() {
@SuppressLint("NewApi")
@Override
public void getOutline(View view, Outline outline) {
outline.setOval(0, 0, AndroidUtilities.dp(56), AndroidUtilities.dp(56));
}
});
}
floatingButtonContainer.addView(floatingButton, LayoutHelper.createFrame((Build.VERSION.SDK_INT >= 21 ? 56 : 60), (Build.VERSION.SDK_INT >= 21 ? 56 : 60), Gravity.LEFT | Gravity.TOP, 10, 6, 10, 0));
searchTabsView = null;
if (!onlySelect && initialDialogsType == 0) {
fragmentLocationContextView = new FragmentContextView(context, this, true);
fragmentLocationContextView.setLayoutParams(LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, 38, Gravity.TOP | Gravity.LEFT, 0, -36, 0, 0));
contentView.addView(fragmentLocationContextView);
fragmentContextView = new FragmentContextView(context, this, false) {
@Override
protected void playbackSpeedChanged(float value) {
if (Math.abs(value - 1.0f) > 0.001f || Math.abs(value - 1.8f) > 0.001f) {
getUndoView().showWithAction(0, Math.abs(value - 1.0f) > 0.001f ? UndoView.ACTION_PLAYBACK_SPEED_ENABLED : UndoView.ACTION_PLAYBACK_SPEED_DISABLED, value, null, null);
}
}
};
fragmentContextView.setLayoutParams(LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, 38, Gravity.TOP | Gravity.LEFT, 0, -36, 0, 0));
contentView.addView(fragmentContextView);
fragmentContextView.setAdditionalContextView(fragmentLocationContextView);
fragmentLocationContextView.setAdditionalContextView(fragmentContextView);
} else if (initialDialogsType == 3) {
if (commentView != null) {
commentView.onDestroy();
}
commentView = new ChatActivityEnterView(getParentActivity(), contentView, null, false) {
@Override
public boolean dispatchTouchEvent(MotionEvent ev) {
if (ev.getAction() == MotionEvent.ACTION_DOWN) {
AndroidUtilities.requestAdjustResize(getParentActivity(), classGuid);
}
return super.dispatchTouchEvent(ev);
}
};
commentView.setAllowStickersAndGifs(false, false);
commentView.setForceShowSendButton(true, false);
commentView.setVisibility(View.GONE);
commentView.getSendButton().setAlpha(0);
contentView.addView(commentView, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT, Gravity.LEFT | Gravity.BOTTOM));
commentView.setDelegate(new ChatActivityEnterView.ChatActivityEnterViewDelegate() {
@Override
public void onMessageSend(CharSequence message, boolean notify, int scheduleDate) {
if (delegate == null || selectedDialogs.isEmpty()) {
return;
}
delegate.didSelectDialogs(DialogsActivity.this, selectedDialogs, message, false);
}
@Override
public void onSwitchRecordMode(boolean video) {
}
@Override
public void onTextSelectionChanged(int start, int end) {
}
@Override
public void onStickersExpandedChange() {
}
@Override
public void onPreAudioVideoRecord() {
}
@Override
public void onTextChanged(final CharSequence text, boolean bigChange) {
}
@Override
public void onTextSpansChanged(CharSequence text) {
}
@Override
public void needSendTyping() {
}
@Override
public void onAttachButtonHidden() {
}
@Override
public void onAttachButtonShow() {
}
@Override
public void onMessageEditEnd(boolean loading) {
}
@Override
public void onWindowSizeChanged(int size) {
}
@Override
public void onStickersTab(boolean opened) {
}
@Override
public void didPressAttachButton() {
}
@Override
public void needStartRecordVideo(int state, boolean notify, int scheduleDate) {
}
@Override
public void needChangeVideoPreviewState(int state, float seekProgress) {
}
@Override
public void needStartRecordAudio(int state) {
}
@Override
public void needShowMediaBanHint() {
}
@Override
public void onUpdateSlowModeButton(View button, boolean show, CharSequence time) {
}
@Override
public void onSendLongClick() {
}
@Override
public void onAudioVideoInterfaceUpdated() {
}
});
writeButtonContainer = new FrameLayout(context) {
@Override
public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info) {
super.onInitializeAccessibilityNodeInfo(info);
info.setText(LocaleController.formatPluralString("AccDescrShareInChats", selectedDialogs.size()));
info.setClassName(Button.class.getName());
info.setLongClickable(true);
info.setClickable(true);
}
};
writeButtonContainer.setFocusable(true);
writeButtonContainer.setFocusableInTouchMode(true);
writeButtonContainer.setVisibility(View.INVISIBLE);
writeButtonContainer.setScaleX(0.2f);
writeButtonContainer.setScaleY(0.2f);
writeButtonContainer.setAlpha(0.0f);
contentView.addView(writeButtonContainer, LayoutHelper.createFrame(60, 60, Gravity.RIGHT | Gravity.BOTTOM, 0, 0, 6, 10));
textPaint.setTextSize(AndroidUtilities.dp(12));
textPaint.setTypeface(AndroidUtilities.getTypeface("fonts/rmedium.ttf"));
selectedCountView = new View(context) {
@Override
protected void onDraw(Canvas canvas) {
String text = String.format("%d", Math.max(1, selectedDialogs.size()));
int textSize = (int) Math.ceil(textPaint.measureText(text));
int size = Math.max(AndroidUtilities.dp(16) + textSize, AndroidUtilities.dp(24));
int cx = getMeasuredWidth() / 2;
int cy = getMeasuredHeight() / 2;
textPaint.setColor(getThemedColor(Theme.key_dialogRoundCheckBoxCheck));
paint.setColor(getThemedColor(Theme.isCurrentThemeDark() ? Theme.key_voipgroup_inviteMembersBackground : Theme.key_dialogBackground));
rect.set(cx - size / 2, 0, cx + size / 2, getMeasuredHeight());
canvas.drawRoundRect(rect, AndroidUtilities.dp(12), AndroidUtilities.dp(12), paint);
paint.setColor(getThemedColor(Theme.key_dialogRoundCheckBox));
rect.set(cx - size / 2 + AndroidUtilities.dp(2), AndroidUtilities.dp(2), cx + size / 2 - AndroidUtilities.dp(2), getMeasuredHeight() - AndroidUtilities.dp(2));
canvas.drawRoundRect(rect, AndroidUtilities.dp(10), AndroidUtilities.dp(10), paint);
canvas.drawText(text, cx - textSize / 2, AndroidUtilities.dp(16.2f), textPaint);
}
};
selectedCountView.setAlpha(0.0f);
selectedCountView.setScaleX(0.2f);
selectedCountView.setScaleY(0.2f);
contentView.addView(selectedCountView, LayoutHelper.createFrame(42, 24, Gravity.RIGHT | Gravity.BOTTOM, 0, 0, -8, 9));
FrameLayout writeButtonBackground = new FrameLayout(context);
Drawable writeButtonDrawable = Theme.createSimpleSelectorCircleDrawable(AndroidUtilities.dp(56), getThemedColor(Theme.key_dialogFloatingButton), getThemedColor(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));
CombinedDrawable combinedDrawable = new CombinedDrawable(shadowDrawable, drawable, 0, 0);
combinedDrawable.setIconSize(AndroidUtilities.dp(56), AndroidUtilities.dp(56));
writeButtonDrawable = combinedDrawable;
}
writeButtonBackground.setBackgroundDrawable(writeButtonDrawable);
writeButtonBackground.setImportantForAccessibility(View.IMPORTANT_FOR_ACCESSIBILITY_NO);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
writeButtonBackground.setOutlineProvider(new ViewOutlineProvider() {
@SuppressLint("NewApi")
@Override
public void getOutline(View view, Outline outline) {
outline.setOval(0, 0, AndroidUtilities.dp(56), AndroidUtilities.dp(56));
}
});
}
writeButtonBackground.setOnClickListener(v -> {
if (delegate == null || selectedDialogs.isEmpty()) {
return;
}
delegate.didSelectDialogs(DialogsActivity.this, selectedDialogs, commentView.getFieldText(), false);
});
writeButtonBackground.setOnLongClickListener(v -> {
if (isNextButton) {
return false;
}
onSendLongClick(writeButtonBackground);
return true;
});
writeButton = new ImageView[2];
for (int a = 0; a < 2; ++a) {
writeButton[a] = new ImageView(context);
writeButton[a].setImageResource(a == 1 ? R.drawable.actionbtn_next : R.drawable.attach_send);
writeButton[a].setColorFilter(new PorterDuffColorFilter(getThemedColor(Theme.key_dialogFloatingIcon), PorterDuff.Mode.MULTIPLY));
writeButton[a].setScaleType(ImageView.ScaleType.CENTER);
writeButtonBackground.addView(writeButton[a], LayoutHelper.createFrame(Build.VERSION.SDK_INT >= 21 ? 56 : 60, Build.VERSION.SDK_INT >= 21 ? 56 : 60, Gravity.CENTER));
}
AndroidUtilities.updateViewVisibilityAnimated(writeButton[0], true, 0.5f, false);
AndroidUtilities.updateViewVisibilityAnimated(writeButton[1], false, 0.5f, false);
writeButtonContainer.addView(writeButtonBackground, LayoutHelper.createFrame(Build.VERSION.SDK_INT >= 21 ? 56 : 60, Build.VERSION.SDK_INT >= 21 ? 56 : 60, Gravity.LEFT | Gravity.TOP, Build.VERSION.SDK_INT >= 21 ? 2 : 0, 0, 0, 0));
}
if (filterTabsView != null) {
contentView.addView(filterTabsView, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, 44));
}
if (!onlySelect) {
final FrameLayout.LayoutParams layoutParams = LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT);
if (inPreviewMode && Build.VERSION.SDK_INT >= 21) {
layoutParams.topMargin = AndroidUtilities.statusBarHeight;
}
contentView.addView(actionBar, layoutParams);
}
if (searchString == null && initialDialogsType == 0) {
updateLayout = new FrameLayout(context) {
private Paint paint = new Paint();
private Matrix matrix = new Matrix();
private LinearGradient updateGradient;
private int lastGradientWidth;
@Override
public void draw(Canvas canvas) {
if (updateGradient != null) {
paint.setColor(0xffffffff);
paint.setShader(updateGradient);
updateGradient.setLocalMatrix(matrix);
canvas.drawRect(0, 0, getMeasuredWidth(), getMeasuredHeight(), paint);
updateLayoutIcon.setBackgroundGradientDrawable(updateGradient);
updateLayoutIcon.draw(canvas);
}
super.draw(canvas);
}
@Override
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
int width = MeasureSpec.getSize(widthMeasureSpec);
if (lastGradientWidth != width) {
updateGradient = new LinearGradient(0, 0, width, 0, new int[] { 0xff69BF72, 0xff53B3AD }, new float[] { 0.0f, 1.0f }, Shader.TileMode.CLAMP);
lastGradientWidth = width;
}
int x = (getMeasuredWidth() - updateTextView.getMeasuredWidth()) / 2;
updateLayoutIcon.setProgressRect(x, AndroidUtilities.dp(13), x + AndroidUtilities.dp(22), AndroidUtilities.dp(13 + 22));
}
@Override
public void setTranslationY(float translationY) {
super.setTranslationY(translationY);
additionalFloatingTranslation2 = AndroidUtilities.dp(48) - translationY;
if (additionalFloatingTranslation2 < 0) {
additionalFloatingTranslation2 = 0;
}
if (!floatingHidden) {
updateFloatingButtonOffset();
}
}
};
updateLayout.setWillNotDraw(false);
updateLayout.setVisibility(View.INVISIBLE);
updateLayout.setTranslationY(AndroidUtilities.dp(48));
if (Build.VERSION.SDK_INT >= 21) {
updateLayout.setBackground(Theme.getSelectorDrawable(0x40ffffff, false));
}
contentView.addView(updateLayout, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, 48, Gravity.LEFT | Gravity.BOTTOM));
updateLayout.setOnClickListener(v -> {
if (!SharedConfig.isAppUpdateAvailable()) {
return;
}
AndroidUtilities.openForView(SharedConfig.pendingAppUpdate.document, true, getParentActivity());
});
updateLayoutIcon = new RadialProgress2(updateLayout);
updateLayoutIcon.setColors(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff);
updateLayoutIcon.setCircleRadius(AndroidUtilities.dp(11));
updateLayoutIcon.setAsMini();
updateLayoutIcon.setIcon(MediaActionDrawable.ICON_UPDATE, true, false);
updateTextView = new TextView(context);
updateTextView.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 15);
updateTextView.setTypeface(AndroidUtilities.getTypeface("fonts/rmedium.ttf"));
updateTextView.setText(LocaleController.getString("AppUpdateNow", R.string.AppUpdateNow).toUpperCase());
updateTextView.setTextColor(0xffffffff);
updateTextView.setPadding(AndroidUtilities.dp(30), 0, 0, 0);
updateLayout.addView(updateTextView, LayoutHelper.createFrame(LayoutHelper.WRAP_CONTENT, LayoutHelper.WRAP_CONTENT, Gravity.CENTER, 0, 0, 0, 0));
}
for (int a = 0; a < 2; a++) {
undoView[a] = new UndoView(context) {
@Override
public void setTranslationY(float translationY) {
super.setTranslationY(translationY);
if (this == undoView[0] && undoView[1].getVisibility() != VISIBLE) {
additionalFloatingTranslation = getMeasuredHeight() + AndroidUtilities.dp(8) - translationY;
if (additionalFloatingTranslation < 0) {
additionalFloatingTranslation = 0;
}
if (!floatingHidden) {
updateFloatingButtonOffset();
}
}
}
@Override
protected boolean canUndo() {
for (int a = 0; a < viewPages.length; a++) {
if (viewPages[a].dialogsItemAnimator.isRunning()) {
return false;
}
}
return true;
}
@Override
protected void onRemoveDialogAction(long currentDialogId, int action) {
if (action == UndoView.ACTION_DELETE || action == UndoView.ACTION_DELETE_FEW) {
debugLastUpdateAction = 1;
setDialogsListFrozen(true);
if (frozenDialogsList != null) {
int selectedIndex = -1;
for (int i = 0; i < frozenDialogsList.size(); i++) {
if (frozenDialogsList.get(i).id == currentDialogId) {
selectedIndex = i;
break;
}
}
if (selectedIndex >= 0) {
TLRPC.Dialog dialog = frozenDialogsList.remove(selectedIndex);
viewPages[0].dialogsAdapter.notifyDataSetChanged();
int finalSelectedIndex = selectedIndex;
AndroidUtilities.runOnUIThread(() -> {
if (frozenDialogsList != null) {
frozenDialogsList.add(finalSelectedIndex, dialog);
viewPages[0].dialogsAdapter.notifyItemInserted(finalSelectedIndex);
dialogInsertFinished = 2;
}
});
} else {
setDialogsListFrozen(false);
}
}
}
}
};
contentView.addView(undoView[a], LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT, Gravity.BOTTOM | Gravity.LEFT, 8, 0, 8, 8));
}
if (folderId != 0) {
viewPages[0].listView.setGlowColor(Theme.getColor(Theme.key_actionBarDefaultArchived));
actionBar.setTitleColor(Theme.getColor(Theme.key_actionBarDefaultArchivedTitle));
actionBar.setItemsColor(Theme.getColor(Theme.key_actionBarDefaultArchivedIcon), false);
actionBar.setItemsBackgroundColor(Theme.getColor(Theme.key_actionBarDefaultArchivedSelector), false);
actionBar.setSearchTextColor(Theme.getColor(Theme.key_actionBarDefaultArchivedSearch), false);
actionBar.setSearchTextColor(Theme.getColor(Theme.key_actionBarDefaultArchivedSearchPlaceholder), true);
}
if (!onlySelect && initialDialogsType == 0) {
blurredView = new View(context) {
@Override
public void setAlpha(float alpha) {
super.setAlpha(alpha);
if (fragmentView != null) {
fragmentView.invalidate();
}
}
};
blurredView.setVisibility(View.GONE);
contentView.addView(blurredView, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.MATCH_PARENT));
}
actionBarDefaultPaint.setColor(Theme.getColor(folderId == 0 ? Theme.key_actionBarDefault : Theme.key_actionBarDefaultArchived));
if (inPreviewMode) {
final TLRPC.User currentUser = getUserConfig().getCurrentUser();
avatarContainer = new ChatAvatarContainer(actionBar.getContext(), null, false);
avatarContainer.setTitle(UserObject.getUserName(currentUser));
avatarContainer.setSubtitle(LocaleController.formatUserStatus(currentAccount, currentUser));
avatarContainer.setUserAvatar(currentUser, true);
avatarContainer.setOccupyStatusBar(false);
avatarContainer.setLeftPadding(AndroidUtilities.dp(10));
actionBar.addView(avatarContainer, 0, LayoutHelper.createFrame(LayoutHelper.WRAP_CONTENT, LayoutHelper.MATCH_PARENT, Gravity.TOP | Gravity.LEFT, 0, 0, 40, 0));
floatingButton.setVisibility(View.INVISIBLE);
actionBar.setOccupyStatusBar(false);
actionBar.setBackgroundColor(Theme.getColor(Theme.key_actionBarDefault));
if (fragmentContextView != null) {
contentView.removeView(fragmentContextView);
}
if (fragmentLocationContextView != null) {
contentView.removeView(fragmentLocationContextView);
}
}
searchIsShowed = false;
updateFilterTabs(false, false);
if (searchString != null) {
showSearch(true, false);
actionBar.openSearchField(searchString, false);
} else if (initialSearchString != null) {
showSearch(true, false);
actionBar.openSearchField(initialSearchString, false);
initialSearchString = null;
if (filterTabsView != null) {
filterTabsView.setTranslationY(-AndroidUtilities.dp(44));
}
} else {
showSearch(false, false);
}
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
FilesMigrationService.checkBottomSheet(this);
}
updateMenuButton(false);
return fragmentView;
}
use of org.telegram.ui.Cells.DialogCell in project Telegram-FOSS by Telegram-FOSS-Team.
the class ChatActivity method getThemeDescriptions.
@Override
public ArrayList<ThemeDescription> getThemeDescriptions() {
if (isPauseOnThemePreview) {
isPauseOnThemePreview = false;
return null;
}
ThemeDescription.ThemeDescriptionDelegate selectedBackgroundDelegate = () -> {
if (chatActivityEnterView != null) {
chatActivityEnterView.updateColors();
}
Theme.refreshAttachButtonsColors();
if (chatAttachAlert != null) {
chatAttachAlert.checkColors();
}
if (chatListView != null) {
int count = chatListView.getChildCount();
for (int a = 0; a < count; a++) {
View child = chatListView.getChildAt(a);
if (child instanceof ChatMessageCell) {
((ChatMessageCell) child).createSelectorDrawable(0);
} else if (child instanceof ChatActionCell) {
((ChatActionCell) child).setInvalidateColors(true);
}
}
}
if (messagesSearchListView != null) {
int count = messagesSearchListView.getChildCount();
for (int a = 0; a < count; a++) {
View child = messagesSearchListView.getChildAt(a);
if (child instanceof DialogCell) {
((DialogCell) child).update(0);
}
}
}
if (scrimPopupWindowItems != null) {
for (int a = 0; a < scrimPopupWindowItems.length; a++) {
scrimPopupWindowItems[a].setColors(getThemedColor(Theme.key_actionBarDefaultSubmenuItem), getThemedColor(Theme.key_actionBarDefaultSubmenuItemIcon));
scrimPopupWindowItems[a].setSelectorColor(getThemedColor(Theme.key_dialogButtonSelector));
}
}
if (scrimPopupWindow != null) {
final View contentView = scrimPopupWindow.getContentView();
contentView.setBackgroundColor(getThemedColor(Theme.key_actionBarDefaultSubmenuBackground));
contentView.invalidate();
}
if (instantCameraView != null) {
instantCameraView.invalidateBlur();
}
if (pinnedLineView != null) {
pinnedLineView.updateColors();
}
if (chatActivityEnterTopView != null && chatActivityEnterTopView.getEditView() != null) {
chatActivityEnterTopView.getEditView().updateColors();
}
if (headerItem != null) {
headerItem.updateColor();
}
setNavigationBarColor(getThemedColor(Theme.key_windowBackgroundGray));
if (fragmentContextView != null) {
fragmentContextView.updateColors();
}
if (avatarContainer != null) {
avatarContainer.updateColors();
}
if (pinnedMessageView != null) {
pinnedMessageView.backgroundColor = getThemedColor(Theme.key_chat_topPanelBackground);
}
if (topChatPanelView != null) {
topChatPanelView.backgroundColor = getThemedColor(Theme.key_chat_topPanelBackground);
}
};
ArrayList<ThemeDescription> themeDescriptions = new ArrayList<>();
themeDescriptions.add(new ThemeDescription(fragmentView, 0, null, null, null, null, Theme.key_chat_wallpaper));
themeDescriptions.add(new ThemeDescription(fragmentView, 0, null, null, null, null, Theme.key_chat_wallpaper_gradient_to1));
themeDescriptions.add(new ThemeDescription(fragmentView, 0, null, null, null, null, Theme.key_chat_wallpaper_gradient_to2));
themeDescriptions.add(new ThemeDescription(fragmentView, 0, null, null, null, null, Theme.key_chat_wallpaper_gradient_to3));
themeDescriptions.add(new ThemeDescription(messagesSearchListView, ThemeDescription.FLAG_BACKGROUND, null, null, null, null, Theme.key_windowBackgroundWhite));
if (reportType < 0) {
themeDescriptions.add(new ThemeDescription(actionBar, ThemeDescription.FLAG_BACKGROUND, null, null, null, null, Theme.key_actionBarDefault));
themeDescriptions.add(new ThemeDescription(actionBar, ThemeDescription.FLAG_AB_ITEMSCOLOR, null, null, null, null, Theme.key_actionBarDefaultIcon));
themeDescriptions.add(new ThemeDescription(actionBar, ThemeDescription.FLAG_AB_SELECTORCOLOR, null, null, null, null, Theme.key_actionBarDefaultSelector));
themeDescriptions.add(new ThemeDescription(actionBar, ThemeDescription.FLAG_AB_TITLECOLOR, null, null, null, null, Theme.key_actionBarDefaultTitle));
themeDescriptions.add(new ThemeDescription(actionBar, ThemeDescription.FLAG_AB_SUBTITLECOLOR, null, null, null, null, Theme.key_actionBarDefaultSubtitle));
} else {
themeDescriptions.add(new ThemeDescription(actionBar, ThemeDescription.FLAG_BACKGROUND, null, null, null, null, Theme.key_actionBarActionModeDefault));
themeDescriptions.add(new ThemeDescription(actionBar, ThemeDescription.FLAG_AB_ITEMSCOLOR, null, null, null, null, Theme.key_actionBarActionModeDefaultIcon));
themeDescriptions.add(new ThemeDescription(actionBar, ThemeDescription.FLAG_AB_SELECTORCOLOR, null, null, null, null, Theme.key_actionBarActionModeDefaultSelector));
themeDescriptions.add(new ThemeDescription(actionBar, ThemeDescription.FLAG_AB_TITLECOLOR, null, null, null, null, Theme.key_actionBarActionModeDefaultIcon));
themeDescriptions.add(new ThemeDescription(actionBar, ThemeDescription.FLAG_AB_SUBTITLECOLOR, null, null, null, null, Theme.key_actionBarActionModeDefaultIcon));
}
themeDescriptions.add(new ThemeDescription(actionBar, ThemeDescription.FLAG_AB_SUBMENUBACKGROUND, null, null, null, selectedBackgroundDelegate, Theme.key_actionBarDefaultSubmenuBackground));
themeDescriptions.add(new ThemeDescription(actionBar, ThemeDescription.FLAG_AB_SUBMENUITEM, null, null, null, selectedBackgroundDelegate, Theme.key_actionBarDefaultSubmenuItem));
themeDescriptions.add(new ThemeDescription(actionBar, ThemeDescription.FLAG_AB_SUBMENUITEM | ThemeDescription.FLAG_IMAGECOLOR, null, null, null, selectedBackgroundDelegate, Theme.key_actionBarDefaultSubmenuItemIcon));
themeDescriptions.add(new ThemeDescription(chatListView, ThemeDescription.FLAG_LISTGLOWCOLOR, null, null, null, null, Theme.key_actionBarDefault));
themeDescriptions.add(new ThemeDescription(avatarContainer != null ? avatarContainer.getTitleTextView() : null, ThemeDescription.FLAG_TEXTCOLOR, null, null, null, null, Theme.key_actionBarDefaultTitle));
themeDescriptions.add(new ThemeDescription(avatarContainer != null ? avatarContainer.getTitleTextView() : null, ThemeDescription.FLAG_IMAGECOLOR, null, null, null, null, Theme.key_actionBarDefaultSubtitle));
themeDescriptions.add(new ThemeDescription(avatarContainer != null ? avatarContainer.getSubtitleTextView() : null, ThemeDescription.FLAG_TEXTCOLOR | ThemeDescription.FLAG_CHECKTAG, null, new Paint[] { Theme.chat_statusPaint, Theme.chat_statusRecordPaint }, null, null, Theme.key_chat_status, null));
themeDescriptions.add(new ThemeDescription(avatarContainer != null ? avatarContainer.getSubtitleTextView() : null, ThemeDescription.FLAG_TEXTCOLOR | ThemeDescription.FLAG_CHECKTAG, null, null, null, null, Theme.key_actionBarDefaultSubtitle, null));
themeDescriptions.add(new ThemeDescription(actionBar, ThemeDescription.FLAG_AB_SELECTORCOLOR, null, null, null, null, Theme.key_actionBarDefaultSelector));
themeDescriptions.add(new ThemeDescription(actionBar, ThemeDescription.FLAG_AB_SEARCH, null, null, null, null, Theme.key_actionBarDefaultSearch));
themeDescriptions.add(new ThemeDescription(actionBar, ThemeDescription.FLAG_AB_SEARCHPLACEHOLDER, null, null, null, null, Theme.key_actionBarDefaultSearchPlaceholder));
themeDescriptions.add(new ThemeDescription(actionBar, ThemeDescription.FLAG_AB_SEARCHPLACEHOLDER, null, null, null, null, Theme.key_actionBarDefaultSearchPlaceholder));
themeDescriptions.add(new ThemeDescription(actionBar, ThemeDescription.FLAG_AB_AM_ITEMSCOLOR, null, null, null, null, Theme.key_actionBarActionModeDefaultIcon));
themeDescriptions.add(new ThemeDescription(actionBar, ThemeDescription.FLAG_AB_AM_BACKGROUND, null, null, null, null, Theme.key_actionBarActionModeDefault));
themeDescriptions.add(new ThemeDescription(actionBar, ThemeDescription.FLAG_AB_AM_TOPBACKGROUND, null, null, null, null, Theme.key_actionBarActionModeDefaultTop));
themeDescriptions.add(new ThemeDescription(actionBar, ThemeDescription.FLAG_AB_AM_SELECTORCOLOR, null, null, null, null, Theme.key_actionBarActionModeDefaultSelector));
themeDescriptions.add(new ThemeDescription(selectedMessagesCountTextView, ThemeDescription.FLAG_TEXTCOLOR, null, null, null, null, Theme.key_actionBarActionModeDefaultIcon));
themeDescriptions.add(new ThemeDescription(avatarContainer != null ? avatarContainer.getTitleTextView() : null, 0, null, null, new Drawable[] { Theme.chat_muteIconDrawable }, null, Theme.key_chat_muteIcon));
themeDescriptions.add(new ThemeDescription(avatarContainer != null ? avatarContainer.getTitleTextView() : null, 0, null, null, new Drawable[] { Theme.chat_lockIconDrawable }, null, Theme.key_chat_lockIcon));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, Theme.avatarDrawables, null, Theme.key_avatar_text));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_avatar_backgroundRed));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_avatar_backgroundOrange));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_avatar_backgroundViolet));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_avatar_backgroundGreen));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_avatar_backgroundCyan));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_avatar_backgroundBlue));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_avatar_backgroundPink));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_avatar_nameInMessageRed));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_avatar_nameInMessageOrange));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_avatar_nameInMessageViolet));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_avatar_nameInMessageGreen));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_avatar_nameInMessageCyan));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_avatar_nameInMessageBlue));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_avatar_nameInMessagePink));
Theme.MessageDrawable msgInDrawable = (Theme.MessageDrawable) getThemedDrawable(Theme.key_drawable_msgIn);
Theme.MessageDrawable msgInMediaDrawable = (Theme.MessageDrawable) getThemedDrawable(Theme.key_drawable_msgInMedia);
Theme.MessageDrawable msgInSelectedDrawable = (Theme.MessageDrawable) getThemedDrawable(Theme.key_drawable_msgInSelected);
Theme.MessageDrawable msgInMediaSelectedDrawable = (Theme.MessageDrawable) getThemedDrawable(Theme.key_drawable_msgInMediaSelected);
Theme.MessageDrawable msgOutDrawable = (Theme.MessageDrawable) getThemedDrawable(Theme.key_drawable_msgOut);
Theme.MessageDrawable msgOutMediaDrawable = (Theme.MessageDrawable) getThemedDrawable(Theme.key_drawable_msgOutMedia);
Theme.MessageDrawable msgOutSelectedDrawable = (Theme.MessageDrawable) getThemedDrawable(Theme.key_drawable_msgOutSelected);
Theme.MessageDrawable msgOutMediaSelectedDrawable = (Theme.MessageDrawable) getThemedDrawable(Theme.key_drawable_msgOutMediaSelected);
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class, BotHelpCell.class }, null, new Drawable[] { msgInDrawable, msgInMediaDrawable }, null, Theme.key_chat_inBubble));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, new Drawable[] { msgInSelectedDrawable, msgInMediaSelectedDrawable }, null, Theme.key_chat_inBubbleSelected));
if (msgInDrawable != null) {
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, msgInDrawable.getShadowDrawables(), null, Theme.key_chat_inBubbleShadow));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, msgInMediaDrawable.getShadowDrawables(), null, Theme.key_chat_inBubbleShadow));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, msgOutDrawable.getShadowDrawables(), null, Theme.key_chat_outBubbleShadow));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, msgOutMediaDrawable.getShadowDrawables(), null, Theme.key_chat_outBubbleShadow));
}
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, new Drawable[] { msgOutDrawable, msgOutMediaDrawable }, null, Theme.key_chat_outBubble));
if (!themeDelegate.isThemeChangeAvailable()) {
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, new Drawable[] { msgOutDrawable, msgOutMediaDrawable }, null, Theme.key_chat_outBubbleGradient1));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, new Drawable[] { msgOutDrawable, msgOutMediaDrawable }, null, Theme.key_chat_outBubbleGradient2));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, new Drawable[] { msgOutDrawable, msgOutMediaDrawable }, null, Theme.key_chat_outBubbleGradient3));
}
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, new Drawable[] { msgOutSelectedDrawable, msgOutMediaSelectedDrawable }, null, Theme.key_chat_outBubbleSelected));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, new Drawable[] { msgOutSelectedDrawable, msgOutMediaSelectedDrawable }, null, Theme.key_chat_outBubbleGradientSelectedOverlay));
themeDescriptions.add(new ThemeDescription(chatListView, ThemeDescription.FLAG_TEXTCOLOR, new Class[] { ChatActionCell.class }, getThemedPaint(Theme.key_paint_chatActionText), null, null, Theme.key_chat_serviceText));
themeDescriptions.add(new ThemeDescription(chatListView, ThemeDescription.FLAG_LINKCOLOR, new Class[] { ChatActionCell.class }, getThemedPaint(Theme.key_paint_chatActionText), null, null, Theme.key_chat_serviceLink));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, new Drawable[] { Theme.chat_botCardDrawalbe, getThemedDrawable(Theme.key_drawable_shareIcon), getThemedDrawable(Theme.key_drawable_replyIcon), getThemedDrawable(Theme.key_drawable_botInline), getThemedDrawable(Theme.key_drawable_botLink), getThemedDrawable(Theme.key_drawable_goIcon), getThemedDrawable(Theme.key_drawable_commentSticker) }, null, Theme.key_chat_serviceIcon));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class, ChatActionCell.class }, null, null, null, Theme.key_chat_serviceBackground));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class, ChatActionCell.class }, null, null, null, Theme.key_chat_serviceBackgroundSelected));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class, BotHelpCell.class }, null, null, null, Theme.key_chat_messageTextIn));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_messageTextOut));
themeDescriptions.add(new ThemeDescription(chatListView, ThemeDescription.FLAG_LINKCOLOR, new Class[] { ChatMessageCell.class, BotHelpCell.class }, null, null, null, Theme.key_chat_messageLinkIn, null));
themeDescriptions.add(new ThemeDescription(chatListView, ThemeDescription.FLAG_LINKCOLOR, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_messageLinkOut, null));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, new Drawable[] { Theme.chat_msgNoSoundDrawable }, null, Theme.key_chat_mediaTimeText));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, new Drawable[] { getThemedDrawable(Theme.key_drawable_msgOutCheck) }, null, Theme.key_chat_outSentCheck));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, new Drawable[] { getThemedDrawable(Theme.key_drawable_msgOutCheckSelected) }, null, Theme.key_chat_outSentCheckSelected));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, new Drawable[] { getThemedDrawable(Theme.key_drawable_msgOutCheckRead), getThemedDrawable(Theme.key_drawable_msgOutHalfCheck) }, null, Theme.key_chat_outSentCheckRead));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, new Drawable[] { getThemedDrawable(Theme.key_drawable_msgOutCheckReadSelected), getThemedDrawable(Theme.key_drawable_msgOutHalfCheckSelected) }, null, Theme.key_chat_outSentCheckReadSelected));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_outSentClock));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_outSentClockSelected));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_inSentClock));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_inSentClockSelected));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, new Drawable[] { Theme.chat_msgMediaCheckDrawable, Theme.chat_msgMediaHalfCheckDrawable }, null, Theme.key_chat_mediaSentCheck));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, new Drawable[] { getThemedDrawable(Theme.key_drawable_msgStickerHalfCheck), getThemedDrawable(Theme.key_drawable_msgStickerCheck), getThemedDrawable(Theme.key_drawable_msgStickerClock), getThemedDrawable(Theme.key_drawable_msgStickerViews), getThemedDrawable(Theme.key_drawable_msgStickerReplies), getThemedDrawable(Theme.key_drawable_msgStickerPinned) }, null, Theme.key_chat_serviceText));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_mediaSentClock));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, new Drawable[] { getThemedDrawable(Theme.key_drawable_msgOutViews), getThemedDrawable(Theme.key_drawable_msgOutReplies), getThemedDrawable(Theme.key_drawable_msgOutPinned) }, null, Theme.key_chat_outViews));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, new Drawable[] { getThemedDrawable(Theme.key_drawable_msgOutViewsSelected), getThemedDrawable(Theme.key_drawable_msgOutRepliesSelected), getThemedDrawable(Theme.key_drawable_msgOutPinnedSelected) }, null, Theme.key_chat_outViewsSelected));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, new Drawable[] { Theme.chat_msgInViewsDrawable, Theme.chat_msgInRepliesDrawable, Theme.chat_msgInPinnedDrawable }, null, Theme.key_chat_inViews));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, new Drawable[] { Theme.chat_msgInViewsSelectedDrawable, Theme.chat_msgInRepliesSelectedDrawable, Theme.chat_msgInPinnedSelectedDrawable }, null, Theme.key_chat_inViewsSelected));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, new Drawable[] { Theme.chat_msgMediaViewsDrawable, Theme.chat_msgMediaRepliesDrawable, Theme.chat_msgMediaPinnedDrawable }, null, Theme.key_chat_mediaViews));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, new Drawable[] { getThemedDrawable(Theme.key_drawable_msgOutMenu) }, null, Theme.key_chat_outMenu));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, new Drawable[] { getThemedDrawable(Theme.key_drawable_msgOutMenuSelected) }, null, Theme.key_chat_outMenuSelected));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, new Drawable[] { Theme.chat_msgInMenuDrawable }, null, Theme.key_chat_inMenu));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, new Drawable[] { Theme.chat_msgInMenuSelectedDrawable }, null, Theme.key_chat_inMenuSelected));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, new Drawable[] { Theme.chat_msgMediaMenuDrawable }, null, Theme.key_chat_mediaMenu));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, new Drawable[] { getThemedDrawable(Theme.key_drawable_msgOutInstant) }, null, Theme.key_chat_outInstant));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, new Drawable[] { Theme.chat_msgInInstantDrawable, Theme.chat_commentDrawable, Theme.chat_commentArrowDrawable }, null, Theme.key_chat_inInstant));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, new Drawable[] { getThemedDrawable(Theme.key_drawable_msgOutCallAudio), getThemedDrawable(Theme.key_drawable_msgOutCallVideo) }, null, Theme.key_chat_outInstant));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, new Drawable[] { getThemedDrawable(Theme.key_drawable_msgOutCallAudioSelected), getThemedDrawable(Theme.key_drawable_msgOutCallVideoSelected) }, null, Theme.key_chat_outInstant));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, Theme.chat_msgInCallDrawable, null, Theme.key_chat_inInstant));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, Theme.chat_msgInCallSelectedDrawable, null, Theme.key_chat_inInstantSelected));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, new Drawable[] { Theme.chat_msgCallUpGreenDrawable }, null, Theme.key_chat_outGreenCall));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, new Drawable[] { Theme.chat_msgCallDownRedDrawable }, null, Theme.key_chat_inRedCall));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, new Drawable[] { Theme.chat_msgCallDownGreenDrawable }, null, Theme.key_chat_inGreenCall));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, Theme.chat_msgErrorPaint, null, null, Theme.key_chat_sentError));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, new Drawable[] { Theme.chat_msgErrorDrawable }, null, Theme.key_chat_sentErrorIcon));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, selectedBackgroundDelegate, Theme.key_chat_selectedBackground));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, Theme.chat_durationPaint, null, null, Theme.key_chat_previewDurationText));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, Theme.chat_gamePaint, null, null, Theme.key_chat_previewGameText));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_inPreviewInstantText));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_outPreviewInstantText));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_inPreviewInstantSelectedText));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_outPreviewInstantSelectedText));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, Theme.chat_deleteProgressPaint, null, null, Theme.key_chat_secretTimeText));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_stickerNameText));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, getThemedPaint(Theme.key_paint_chatBotButton), null, null, Theme.key_chat_botButtonText));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, Theme.chat_botProgressPaint, null, null, Theme.key_chat_botProgress));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, getThemedPaint(Theme.key_paint_chatTimeBackground), null, null, Theme.key_chat_mediaTimeBackground));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_inForwardedNameText));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_outForwardedNameText));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_inPsaNameText));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_outPsaNameText));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_inViaBotNameText));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_outViaBotNameText));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_stickerViaBotNameText));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_inReplyLine));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_outReplyLine));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_stickerReplyLine));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_inReplyNameText));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_outReplyNameText));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_stickerReplyNameText));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_inReplyMessageText));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_outReplyMessageText));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_inReplyMediaMessageText));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_outReplyMediaMessageText));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_inReplyMediaMessageSelectedText));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_outReplyMediaMessageSelectedText));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_stickerReplyMessageText));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_inPreviewLine));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_outPreviewLine));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_inSiteNameText));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_outSiteNameText));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_inContactNameText));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_outContactNameText));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_inContactPhoneText));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_inContactPhoneSelectedText));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_outContactPhoneText));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_outContactPhoneSelectedText));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_mediaProgress));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_inAudioProgress));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_outAudioProgress));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_inAudioSelectedProgress));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_outAudioSelectedProgress));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_mediaTimeText));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_inTimeText));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_outTimeText));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_inTimeSelectedText));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_inAdminText));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_inAdminSelectedText));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_outAdminText));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_outAdminSelectedText));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_outTimeSelectedText));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_inAudioPerformerText));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_inAudioPerformerSelectedText));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_outAudioPerformerText));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_outAudioPerformerSelectedText));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_inAudioTitleText));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_outAudioTitleText));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_inAudioDurationText));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_outAudioDurationText));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_inAudioDurationSelectedText));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_outAudioDurationSelectedText));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_inAudioSeekbar));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_outAudioSeekbar));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_inAudioSeekbarSelected));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_outAudioSeekbarSelected));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_inAudioSeekbarFill));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_inAudioCacheSeekbar));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_outAudioSeekbarFill));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_outAudioCacheSeekbar));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_inVoiceSeekbar));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_outVoiceSeekbar));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_inVoiceSeekbarSelected));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_outVoiceSeekbarSelected));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_inVoiceSeekbarFill));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_outVoiceSeekbarFill));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_inFileProgress));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_outFileProgress));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_inFileProgressSelected));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_outFileProgressSelected));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_inFileNameText));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_outFileNameText));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_inFileInfoText));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_outFileInfoText));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_inFileInfoSelectedText));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_outFileInfoSelectedText));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_inFileBackground));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_outFileBackground));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_inFileBackgroundSelected));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_outFileBackgroundSelected));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_inVenueInfoText));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_outVenueInfoText));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_inVenueInfoSelectedText));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_outVenueInfoSelectedText));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_mediaInfoText));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, Theme.chat_urlPaint, null, null, Theme.key_chat_linkSelectBackground));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, Theme.chat_textSearchSelectionPaint, null, null, Theme.key_chat_textSelectBackground));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_outLoader));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_outMediaIcon));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_outLoaderSelected));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_outMediaIconSelected));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_inLoader));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_inMediaIcon));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_inLoaderSelected));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_inMediaIconSelected));
themeDescriptions.add(new ThemeDescription(chatListView, ThemeDescription.FLAG_BACKGROUNDFILTER, new Class[] { ChatMessageCell.class }, null, new Drawable[] { Theme.chat_photoStatesDrawables[0][0], Theme.chat_photoStatesDrawables[1][0], Theme.chat_photoStatesDrawables[2][0], Theme.chat_photoStatesDrawables[3][0] }, null, Theme.key_chat_mediaLoaderPhoto));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, new Drawable[] { Theme.chat_photoStatesDrawables[0][0], Theme.chat_photoStatesDrawables[1][0], Theme.chat_photoStatesDrawables[2][0], Theme.chat_photoStatesDrawables[3][0] }, null, Theme.key_chat_mediaLoaderPhotoIcon));
themeDescriptions.add(new ThemeDescription(chatListView, ThemeDescription.FLAG_BACKGROUNDFILTER, new Class[] { ChatMessageCell.class }, null, new Drawable[] { Theme.chat_photoStatesDrawables[0][1], Theme.chat_photoStatesDrawables[1][1], Theme.chat_photoStatesDrawables[2][1], Theme.chat_photoStatesDrawables[3][1] }, null, Theme.key_chat_mediaLoaderPhotoSelected));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, new Drawable[] { Theme.chat_photoStatesDrawables[0][1], Theme.chat_photoStatesDrawables[1][1], Theme.chat_photoStatesDrawables[2][1], Theme.chat_photoStatesDrawables[3][1] }, null, Theme.key_chat_mediaLoaderPhotoIconSelected));
themeDescriptions.add(new ThemeDescription(chatListView, ThemeDescription.FLAG_BACKGROUNDFILTER, new Class[] { ChatMessageCell.class }, null, new Drawable[] { Theme.chat_photoStatesDrawables[7][0], Theme.chat_photoStatesDrawables[8][0] }, null, Theme.key_chat_outLoaderPhoto));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, new Drawable[] { Theme.chat_photoStatesDrawables[7][0], Theme.chat_photoStatesDrawables[8][0] }, null, Theme.key_chat_outLoaderPhotoIcon));
themeDescriptions.add(new ThemeDescription(chatListView, ThemeDescription.FLAG_BACKGROUNDFILTER, new Class[] { ChatMessageCell.class }, null, new Drawable[] { Theme.chat_photoStatesDrawables[7][1], Theme.chat_photoStatesDrawables[8][1] }, null, Theme.key_chat_outLoaderPhotoSelected));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, new Drawable[] { Theme.chat_photoStatesDrawables[7][1], Theme.chat_photoStatesDrawables[8][1] }, null, Theme.key_chat_outLoaderPhotoIconSelected));
themeDescriptions.add(new ThemeDescription(chatListView, ThemeDescription.FLAG_BACKGROUNDFILTER, new Class[] { ChatMessageCell.class }, null, new Drawable[] { Theme.chat_photoStatesDrawables[10][0], Theme.chat_photoStatesDrawables[11][0] }, null, Theme.key_chat_inLoaderPhoto));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, new Drawable[] { Theme.chat_photoStatesDrawables[10][0], Theme.chat_photoStatesDrawables[11][0] }, null, Theme.key_chat_inLoaderPhotoIcon));
themeDescriptions.add(new ThemeDescription(chatListView, ThemeDescription.FLAG_BACKGROUNDFILTER, new Class[] { ChatMessageCell.class }, null, new Drawable[] { Theme.chat_photoStatesDrawables[10][1], Theme.chat_photoStatesDrawables[11][1] }, null, Theme.key_chat_inLoaderPhotoSelected));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, new Drawable[] { Theme.chat_photoStatesDrawables[10][1], Theme.chat_photoStatesDrawables[11][1] }, null, Theme.key_chat_inLoaderPhotoIconSelected));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, new Drawable[] { Theme.chat_photoStatesDrawables[9][0] }, null, Theme.key_chat_outFileIcon));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, new Drawable[] { Theme.chat_photoStatesDrawables[9][1] }, null, Theme.key_chat_outFileSelectedIcon));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, new Drawable[] { Theme.chat_photoStatesDrawables[12][0] }, null, Theme.key_chat_inFileIcon));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, new Drawable[] { Theme.chat_photoStatesDrawables[12][1] }, null, Theme.key_chat_inFileSelectedIcon));
themeDescriptions.add(new ThemeDescription(chatListView, ThemeDescription.FLAG_BACKGROUNDFILTER, new Class[] { ChatMessageCell.class }, null, new Drawable[] { Theme.chat_contactDrawable[0] }, null, Theme.key_chat_inContactBackground));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, new Drawable[] { Theme.chat_contactDrawable[0] }, null, Theme.key_chat_inContactIcon));
themeDescriptions.add(new ThemeDescription(chatListView, ThemeDescription.FLAG_BACKGROUNDFILTER, new Class[] { ChatMessageCell.class }, null, new Drawable[] { Theme.chat_contactDrawable[1] }, null, Theme.key_chat_outContactBackground));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, new Drawable[] { Theme.chat_contactDrawable[1] }, null, Theme.key_chat_outContactIcon));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_inLocationBackground));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, new Drawable[] { Theme.chat_locationDrawable[0] }, null, Theme.key_chat_inLocationIcon));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_outLocationBackground));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, new Drawable[] { Theme.chat_locationDrawable[1] }, null, Theme.key_chat_outLocationIcon));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_inPollCorrectAnswer));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_outPollCorrectAnswer));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_inPollWrongAnswer));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_outPollWrongAnswer));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, new Drawable[] { Theme.chat_pollHintDrawable[0] }, null, Theme.key_chat_inPreviewInstantText));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, new Drawable[] { Theme.chat_pollHintDrawable[1] }, null, Theme.key_chat_outPreviewInstantText));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, new Drawable[] { Theme.chat_psaHelpDrawable[0] }, null, Theme.key_chat_inViews));
themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, new Drawable[] { Theme.chat_psaHelpDrawable[1] }, null, Theme.key_chat_outViews));
if (!themeDelegate.isThemeChangeAvailable()) {
themeDescriptions.add(new ThemeDescription(messagesSearchListView, 0, new Class[] { DialogCell.class }, null, Theme.avatarDrawables, null, Theme.key_avatar_text));
themeDescriptions.add(new ThemeDescription(messagesSearchListView, 0, new Class[] { DialogCell.class }, Theme.dialogs_countPaint, null, null, Theme.key_chats_unreadCounter));
themeDescriptions.add(new ThemeDescription(messagesSearchListView, 0, new Class[] { DialogCell.class }, null, new Paint[] { Theme.dialogs_namePaint[0], Theme.dialogs_namePaint[1], Theme.dialogs_searchNamePaint }, null, null, Theme.key_chats_name));
themeDescriptions.add(new ThemeDescription(messagesSearchListView, 0, new Class[] { DialogCell.class }, null, new Paint[] { Theme.dialogs_nameEncryptedPaint[0], Theme.dialogs_nameEncryptedPaint[1], Theme.dialogs_searchNameEncryptedPaint }, null, null, Theme.key_chats_secretName));
themeDescriptions.add(new ThemeDescription(messagesSearchListView, 0, new Class[] { DialogCell.class }, null, new Drawable[] { Theme.dialogs_lockDrawable }, null, Theme.key_chats_secretIcon));
themeDescriptions.add(new ThemeDescription(messagesSearchListView, 0, new Class[] { DialogCell.class }, null, new Drawable[] { Theme.dialogs_groupDrawable, Theme.dialogs_broadcastDrawable, Theme.dialogs_botDrawable }, null, Theme.key_chats_nameIcon));
themeDescriptions.add(new ThemeDescription(messagesSearchListView, 0, new Class[] { DialogCell.class }, null, new Drawable[] { Theme.dialogs_scamDrawable, Theme.dialogs_fakeDrawable }, null, Theme.key_chats_draft));
themeDescriptions.add(new ThemeDescription(messagesSearchListView, 0, new Class[] { DialogCell.class }, Theme.dialogs_messagePaint[1], null, null, Theme.key_chats_message_threeLines));
themeDescriptions.add(new ThemeDescription(messagesSearchListView, 0, new Class[] { DialogCell.class }, Theme.dialogs_messageNamePaint, null, null, Theme.key_chats_nameMessage_threeLines));
themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, selectedBackgroundDelegate, Theme.key_chats_nameMessage));
themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, selectedBackgroundDelegate, Theme.key_chats_attachMessage));
themeDescriptions.add(new ThemeDescription(messagesSearchListView, 0, new Class[] { DialogCell.class }, null, Theme.dialogs_messagePrintingPaint, null, null, Theme.key_chats_actionMessage));
themeDescriptions.add(new ThemeDescription(messagesSearchListView, 0, new Class[] { DialogCell.class }, Theme.dialogs_timePaint, null, null, Theme.key_chats_date));
themeDescriptions.add(new ThemeDescription(messagesSearchListView, 0, new Class[] { DialogCell.class }, null, new Drawable[] { Theme.dialogs_checkDrawable }, null, Theme.key_chats_sentCheck));
themeDescriptions.add(new ThemeDescription(messagesSearchListView, 0, new Class[] { DialogCell.class }, null, new Drawable[] { Theme.dialogs_checkReadDrawable, Theme.dialogs_halfCheckDrawable }, null, Theme.key_chats_sentReadCheck));
}
themeDescriptions.add(new ThemeDescription(mentionContainer, 0, null, getThemedPaint(Theme.key_paint_chatComposeBackground), null, null, Theme.key_chat_messagePanelBackground));
themeDescriptions.add(new ThemeDescription(mentionContainer, 0, null, null, new Drawable[] { Theme.chat_composeShadowDrawable }, null, Theme.key_chat_messagePanelShadow));
themeDescriptions.add(new ThemeDescription(mentionContainer, 0, null, null, new Drawable[] { Theme.chat_composeShadowRoundDrawable }, null, Theme.key_chat_messagePanelBackground));
themeDescriptions.add(new ThemeDescription(searchContainer, 0, null, getThemedPaint(Theme.key_paint_chatComposeBackground), null, null, Theme.key_chat_messagePanelBackground));
themeDescriptions.add(new ThemeDescription(searchContainer, 0, null, null, new Drawable[] { Theme.chat_composeShadowDrawable }, null, Theme.key_chat_messagePanelShadow));
themeDescriptions.add(new ThemeDescription(bottomOverlay, 0, null, getThemedPaint(Theme.key_paint_chatComposeBackground), null, null, Theme.key_chat_messagePanelBackground));
themeDescriptions.add(new ThemeDescription(bottomOverlay, 0, null, null, new Drawable[] { Theme.chat_composeShadowDrawable }, null, Theme.key_chat_messagePanelShadow));
themeDescriptions.add(new ThemeDescription(bottomOverlayChat, 0, null, getThemedPaint(Theme.key_paint_chatComposeBackground), null, null, Theme.key_chat_messagePanelBackground));
themeDescriptions.add(new ThemeDescription(bottomOverlayChat, 0, null, null, new Drawable[] { Theme.chat_composeShadowDrawable }, null, Theme.key_chat_messagePanelShadow));
themeDescriptions.add(new ThemeDescription(bottomMessagesActionContainer, 0, null, getThemedPaint(Theme.key_paint_chatComposeBackground), null, null, Theme.key_chat_messagePanelBackground));
themeDescriptions.add(new ThemeDescription(bottomMessagesActionContainer, 0, null, null, new Drawable[] { Theme.chat_composeShadowDrawable }, null, Theme.key_chat_messagePanelShadow));
themeDescriptions.add(new ThemeDescription(chatActivityEnterView, 0, null, getThemedPaint(Theme.key_paint_chatComposeBackground), null, null, Theme.key_chat_messagePanelBackground));
themeDescriptions.add(new ThemeDescription(chatActivityEnterView, 0, null, null, new Drawable[] { Theme.chat_composeShadowDrawable }, null, Theme.key_chat_messagePanelShadow));
themeDescriptions.add(new ThemeDescription(chatActivityEnterView, ThemeDescription.FLAG_TEXTCOLOR, new Class[] { ChatActivityEnterView.class }, new String[] { "messageEditText" }, null, null, null, Theme.key_chat_messagePanelText));
themeDescriptions.add(new ThemeDescription(chatActivityEnterView, ThemeDescription.FLAG_CURSORCOLOR, new Class[] { ChatActivityEnterView.class }, new String[] { "messageEditText" }, null, null, null, Theme.key_chat_messagePanelCursor));
themeDescriptions.add(new ThemeDescription(chatActivityEnterView, ThemeDescription.FLAG_HINTTEXTCOLOR, new Class[] { ChatActivityEnterView.class }, new String[] { "messageEditText" }, null, null, null, Theme.key_chat_messagePanelHint));
themeDescriptions.add(new ThemeDescription(chatActivityEnterView, ThemeDescription.FLAG_IMAGECOLOR, new Class[] { ChatActivityEnterView.class }, new String[] { "sendButton" }, null, null, null, Theme.key_chat_messagePanelSend));
themeDescriptions.add(new ThemeDescription(chatActivityEnterView, ThemeDescription.FLAG_USEBACKGROUNDDRAWABLE | ThemeDescription.FLAG_DRAWABLESELECTEDSTATE, new Class[] { ChatActivityEnterView.class }, new String[] { "sendButton" }, null, null, 24, null, Theme.key_chat_messagePanelSend));
themeDescriptions.add(new ThemeDescription(chatActivityEnterView, 0, new Class[] { ChatActivityEnterView.class }, new String[] { "botButton" }, null, null, null, Theme.key_chat_messagePanelIcons));
themeDescriptions.add(new ThemeDescription(chatActivityEnterView, ThemeDescription.FLAG_USEBACKGROUNDDRAWABLE | ThemeDescription.FLAG_DRAWABLESELECTEDSTATE, new Class[] { ChatActivityEnterView.class }, new String[] { "botButton" }, null, null, null, Theme.key_listSelector));
themeDescriptions.add(new ThemeDescription(chatActivityEnterView, 0, new Class[] { ChatActivityEnterView.class }, new String[] { "notifyButton" }, null, null, null, Theme.key_chat_messagePanelIcons));
themeDescriptions.add(new ThemeDescription(chatActivityEnterView, ThemeDescription.FLAG_IMAGECOLOR | ThemeDescription.FLAG_BACKGROUNDFILTER, new Class[] { ChatActivityEnterView.class }, new String[] { "scheduledButton" }, null, null, null, Theme.key_chat_messagePanelIcons));
themeDescriptions.add(new ThemeDescription(chatActivityEnterView, ThemeDescription.FLAG_IMAGECOLOR, new Class[] { ChatActivityEnterView.class }, new String[] { "scheduledButton" }, null, null, null, Theme.key_chat_recordedVoiceDot));
themeDescriptions.add(new ThemeDescription(chatActivityEnterView, ThemeDescription.FLAG_USEBACKGROUNDDRAWABLE | ThemeDescription.FLAG_DRAWABLESELECTEDSTATE, new Class[] { ChatActivityEnterView.class }, new String[] { "scheduledButton" }, null, null, null, Theme.key_listSelector));
themeDescriptions.add(new ThemeDescription(chatActivityEnterView, 0, new Class[] { ChatActivityEnterView.class }, new String[] { "attachButton" }, null, null, null, Theme.key_chat_messagePanelIcons));
themeDescriptions.add(new ThemeDescription(chatActivityEnterView, ThemeDescription.FLAG_USEBACKGROUNDDRAWABLE | ThemeDescription.FLAG_DRAWABLESELECTEDSTATE, new Class[] { ChatActivityEnterView.class }, new String[] { "attachButton" }, null, null, null, Theme.key_listSelector));
themeDescriptions.add(new ThemeDescription(chatActivityEnterView, 0, new Class[] { ChatActivityEnterView.class }, new String[] { "audioSendButton" }, null, null, null, Theme.key_chat_messagePanelIcons));
themeDescriptions.add(new ThemeDescription(chatActivityEnterView, 0, new Class[] { ChatActivityEnterView.class }, new String[] { "videoSendButton" }, null, null, null, Theme.key_chat_messagePanelIcons));
themeDescriptions.add(new ThemeDescription(chatActivityEnterView, 0, new Class[] { ChatActivityEnterView.class }, new String[] { "notifyButton" }, null, null, null, Theme.key_chat_messagePanelVideoFrame));
themeDescriptions.add(new ThemeDescription(chatActivityEnterView, ThemeDescription.FLAG_USEBACKGROUNDDRAWABLE | ThemeDescription.FLAG_DRAWABLESELECTEDSTATE, new Class[] { ChatActivityEnterView.class }, new String[] { "notifyButton" }, null, null, null, Theme.key_listSelector));
themeDescriptions.add(new ThemeDescription(chatActivityEnterView, 0, new Class[] { ChatActivityEnterView.class }, new String[] { "videoTimelineView" }, null, null, null, Theme.key_chat_messagePanelSend));
// themeDescriptions.add(new ThemeDescription(chatActivityEnterView, ThemeDescription.FLAG_IMAGECOLOR, new Class[]{ChatActivityEnterView.class}, new String[]{"doneButtonImage"}, null, null, null, Theme.key_chat_messagePanelBackground));
themeDescriptions.add(new ThemeDescription(chatActivityEnterView, 0, new Class[] { ChatActivityEnterView.class }, new String[] { "micDrawable" }, null, null, null, Theme.key_chat_messagePanelVoicePressed));
themeDescriptions.add(new ThemeDescription(chatActivityEnterView, 0, new Class[] { ChatActivityEnterView.class }, new String[] { "cameraDrawable" }, null, null, null, Theme.key_chat_messagePanelVoicePressed));
themeDescriptions.add(new ThemeDescription(chatActivityEnterView, 0, new Class[] { ChatActivityEnterView.class }, new String[] { "sendDrawable" }, null, null, null, Theme.key_chat_messagePanelVoicePressed));
themeDescriptions.add(new ThemeDescription(chatActivityEnterView, 0, null, null, null, null, Theme.key_chat_messagePanelVoiceLock));
themeDescriptions.add(new ThemeDescription(chatActivityEnterView, 0, new Class[] { ChatActivityEnterView.class }, null, null, null, Theme.key_chat_messagePanelVoiceLockBackground));
themeDescriptions.add(new ThemeDescription(chatActivityEnterView, 0, new Class[] { ChatActivityEnterView.class }, new String[] { "lockShadowDrawable" }, null, null, null, Theme.key_chat_messagePanelVoiceLockShadow));
themeDescriptions.add(new ThemeDescription(chatActivityEnterView, ThemeDescription.FLAG_USEBACKGROUNDDRAWABLE | ThemeDescription.FLAG_DRAWABLESELECTEDSTATE, new Class[] { ChatActivityEnterView.class }, new String[] { "recordDeleteImageView" }, null, null, null, Theme.key_listSelector));
themeDescriptions.add(new ThemeDescription(chatActivityEnterView, ThemeDescription.FLAG_BACKGROUNDFILTER, new Class[] { ChatActivityEnterView.class }, new String[] { "recordedAudioBackground" }, null, null, null, Theme.key_chat_recordedVoiceBackground));
themeDescriptions.add(new ThemeDescription(chatActivityEnterView, 0, null, null, null, null, Theme.key_chat_recordTime));
themeDescriptions.add(new ThemeDescription(chatActivityEnterView, 0, null, null, null, null, Theme.key_chat_recordVoiceCancel));
themeDescriptions.add(new ThemeDescription(chatActivityEnterView, ThemeDescription.FLAG_TEXTCOLOR, new Class[] { ChatActivityEnterView.class }, new String[] { "recordedAudioTimeTextView" }, null, null, null, Theme.key_chat_messagePanelVoiceDuration));
themeDescriptions.add(new ThemeDescription(chatActivityEnterView, 0, null, null, null, null, Theme.key_chat_recordVoiceCancel));
themeDescriptions.add(new ThemeDescription(chatActivityEnterView, 0, new Class[] { ChatActivityEnterView.class }, new String[] { "doneButtonProgress" }, null, null, null, Theme.key_contextProgressInner1));
themeDescriptions.add(new ThemeDescription(chatActivityEnterView, 0, new Class[] { ChatActivityEnterView.class }, new String[] { "doneButtonProgress" }, null, null, null, Theme.key_contextProgressOuter1));
themeDescriptions.add(new ThemeDescription(chatActivityEnterView, ThemeDescription.FLAG_IMAGECOLOR, new Class[] { ChatActivityEnterView.class }, new String[] { "cancelBotButton" }, null, null, null, Theme.key_chat_messagePanelCancelInlineBot));
themeDescriptions.add(new ThemeDescription(chatActivityEnterView, ThemeDescription.FLAG_USEBACKGROUNDDRAWABLE | ThemeDescription.FLAG_DRAWABLESELECTEDSTATE, new Class[] { ChatActivityEnterView.class }, new String[] { "cancelBotButton" }, null, null, null, Theme.key_listSelector));
themeDescriptions.add(new ThemeDescription(chatActivityEnterView, 0, new Class[] { ChatActivityEnterView.class }, new String[] { "redDotPaint" }, null, null, null, Theme.key_chat_recordedVoiceDot));
themeDescriptions.add(new ThemeDescription(chatActivityEnterView, 0, new Class[] { ChatActivityEnterView.class }, new String[] { "paint" }, null, null, null, Theme.key_chat_messagePanelVoiceBackground));
themeDescriptions.add(new ThemeDescription(chatActivityEnterView, 0, new Class[] { ChatActivityEnterView.class }, new String[] { "seekBarWaveform" }, null, null, null, Theme.key_chat_recordedVoiceProgress));
themeDescriptions.add(new ThemeDescription(chatActivityEnterView, 0, new Class[] { ChatActivityEnterView.class }, new String[] { "seekBarWaveform" }, null, null, null, Theme.key_chat_recordedVoiceProgressInner));
themeDescriptions.add(new ThemeDescription(chatActivityEnterView, 0, new Class[] { ChatActivityEnterView.class }, new String[] { "dotPaint" }, null, null, null, Theme.key_chat_emojiPanelNewTrending));
themeDescriptions.add(new ThemeDescription(chatActivityEnterView, 0, new Class[] { ChatActivityEnterView.class }, null, null, null, selectedBackgroundDelegate, Theme.key_chat_recordedVoicePlayPause));
themeDescriptions.add(new ThemeDescription(chatActivityEnterView != null ? chatActivityEnterView.getEmojiView() : null, 0, new Class[] { EmojiView.class }, null, null, null, selectedBackgroundDelegate, Theme.key_chat_emojiPanelBackground));
themeDescriptions.add(new ThemeDescription(chatActivityEnterView != null ? chatActivityEnterView.getEmojiView() : null, 0, new Class[] { EmojiView.class }, null, null, null, selectedBackgroundDelegate, Theme.key_chat_emojiPanelShadowLine));
themeDescriptions.add(new ThemeDescription(chatActivityEnterView != null ? chatActivityEnterView.getEmojiView() : null, 0, new Class[] { EmojiView.class }, null, null, null, selectedBackgroundDelegate, Theme.key_chat_emojiPanelEmptyText));
themeDescriptions.add(new ThemeDescription(chatActivityEnterView != null ? chatActivityEnterView.getEmojiView() : null, 0, new Class[] { EmojiView.class }, null, null, null, selectedBackgroundDelegate, Theme.key_chat_emojiPanelIcon));
themeDescriptions.add(new ThemeDescription(chatActivityEnterView != null ? chatActivityEnterView.getEmojiView() : null, 0, new Class[] { EmojiView.class }, null, null, null, selectedBackgroundDelegate, Theme.key_chat_emojiPanelIconSelected));
themeDescriptions.add(new ThemeDescription(chatActivityEnterView != null ? chatActivityEnterView.getEmojiView() : null, 0, new Class[] { EmojiView.class }, null, null, null, selectedBackgroundDelegate, Theme.key_chat_emojiPanelStickerPackSelector));
themeDescriptions.add(new ThemeDescription(chatActivityEnterView != null ? chatActivityEnterView.getEmojiView() : null, 0, new Class[] { EmojiView.class }, null, null, null, selectedBackgroundDelegate, Theme.key_chat_emojiPanelBackspace));
themeDescriptions.add(new ThemeDescription(chatActivityEnterView != null ? chatActivityEnterView.getEmojiView() : null, 0, new Class[] { EmojiView.class }, null, null, null, selectedBackgroundDelegate, Theme.key_chat_emojiPanelTrendingTitle));
themeDescriptions.add(new ThemeDescription(chatActivityEnterView != null ? chatActivityEnterView.getEmojiView() : null, 0, new Class[] { EmojiView.class }, null, null, null, selectedBackgroundDelegate, Theme.key_chat_emojiPanelTrendingDescription));
themeDescriptions.add(new ThemeDescription(chatActivityEnterView != null ? chatActivityEnterView.getEmojiView() : null, 0, new Class[] { EmojiView.class }, null, null, null, selectedBackgroundDelegate, Theme.key_chat_emojiPanelBadgeText));
themeDescriptions.add(new ThemeDescription(chatActivityEnterView != null ? chatActivityEnterView.getEmojiView() : null, 0, new Class[] { EmojiView.class }, null, null, null, selectedBackgroundDelegate, Theme.key_chat_emojiPanelBadgeBackground));
themeDescriptions.add(new ThemeDescription(chatActivityEnterView != null ? chatActivityEnterView.getEmojiView() : null, 0, new Class[] { EmojiView.class }, null, null, null, selectedBackgroundDelegate, Theme.key_chat_emojiBottomPanelIcon));
themeDescriptions.add(new ThemeDescription(chatActivityEnterView != null ? chatActivityEnterView.getEmojiView() : null, 0, new Class[] { EmojiView.class }, null, null, null, selectedBackgroundDelegate, Theme.key_chat_emojiSearchIcon));
themeDescriptions.add(new ThemeDescription(chatActivityEnterView != null ? chatActivityEnterView.getEmojiView() : null, 0, new Class[] { EmojiView.class }, null, null, null, selectedBackgroundDelegate, Theme.key_chat_emojiPanelStickerSetNameHighlight));
themeDescriptions.add(new ThemeDescription(chatActivityEnterView != null ? chatActivityEnterView.getEmojiView() : null, 0, new Class[] { EmojiView.class }, null, null, null, selectedBackgroundDelegate, Theme.key_chat_emojiPanelStickerPackSelectorLine));
if (chatActivityEnterView != null) {
final TrendingStickersAlert trendingStickersAlert = chatActivityEnterView.getTrendingStickersAlert();
if (trendingStickersAlert != null) {
themeDescriptions.addAll(trendingStickersAlert.getThemeDescriptions());
}
themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, new Drawable[] { chatActivityEnterView.getStickersArrowDrawable() }, null, Theme.key_chat_messagePanelIcons));
}
for (int a = 0; a < 2; a++) {
UndoView v = a == 0 ? undoView : topUndoView;
themeDescriptions.add(new ThemeDescription(v, ThemeDescription.FLAG_BACKGROUNDFILTER, null, null, null, null, Theme.key_undo_background));
themeDescriptions.add(new ThemeDescription(v, 0, new Class[] { UndoView.class }, new String[] { "undoImageView" }, null, null, null, Theme.key_undo_cancelColor));
themeDescriptions.add(new ThemeDescription(v, 0, new Class[] { UndoView.class }, new String[] { "undoTextView" }, null, null, null, Theme.key_undo_cancelColor));
themeDescriptions.add(new ThemeDescription(v, 0, new Class[] { UndoView.class }, new String[] { "infoTextView" }, null, null, null, Theme.key_undo_infoColor));
themeDescriptions.add(new ThemeDescription(v, 0, new Class[] { UndoView.class }, new String[] { "subinfoTextView" }, null, null, null, Theme.key_undo_infoColor));
themeDescriptions.add(new ThemeDescription(v, ThemeDescription.FLAG_LINKCOLOR, new Class[] { UndoView.class }, new String[] { "subinfoTextView" }, null, null, null, Theme.key_undo_cancelColor));
themeDescriptions.add(new ThemeDescription(v, 0, new Class[] { UndoView.class }, new String[] { "textPaint" }, null, null, null, Theme.key_undo_infoColor));
themeDescriptions.add(new ThemeDescription(v, 0, new Class[] { UndoView.class }, new String[] { "progressPaint" }, null, null, null, Theme.key_undo_infoColor));
themeDescriptions.add(new ThemeDescription(v, ThemeDescription.FLAG_IMAGECOLOR, new Class[] { UndoView.class }, new String[] { "leftImageView" }, null, null, null, Theme.key_undo_infoColor));
}
themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_chat_botKeyboardButtonText));
themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_chat_botKeyboardButtonBackground));
themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_chat_botKeyboardButtonBackgroundPressed));
themeDescriptions.add(new ThemeDescription(fragmentView, ThemeDescription.FLAG_BACKGROUND | ThemeDescription.FLAG_CHECKTAG, new Class[] { FragmentContextView.class }, new String[] { "frameLayout" }, null, null, null, Theme.key_inappPlayerBackground));
themeDescriptions.add(new ThemeDescription(fragmentView, ThemeDescription.FLAG_IMAGECOLOR, new Class[] { FragmentContextView.class }, new String[] { "playButton" }, null, null, null, Theme.key_inappPlayerPlayPause));
themeDescriptions.add(new ThemeDescription(fragmentView, ThemeDescription.FLAG_TEXTCOLOR | ThemeDescription.FLAG_CHECKTAG, new Class[] { FragmentContextView.class }, new String[] { "titleTextView" }, null, null, null, Theme.key_inappPlayerTitle));
themeDescriptions.add(new ThemeDescription(fragmentView, ThemeDescription.FLAG_TEXTCOLOR | ThemeDescription.FLAG_CHECKTAG, new Class[] { FragmentContextView.class }, new String[] { "titleTextView" }, null, null, null, Theme.key_inappPlayerPerformer));
themeDescriptions.add(new ThemeDescription(fragmentView, ThemeDescription.FLAG_TEXTCOLOR | ThemeDescription.FLAG_FASTSCROLL, new Class[] { FragmentContextView.class }, new String[] { "subtitleTextView" }, null, null, null, Theme.key_inappPlayerClose));
themeDescriptions.add(new ThemeDescription(fragmentView, ThemeDescription.FLAG_IMAGECOLOR, new Class[] { FragmentContextView.class }, new String[] { "closeButton" }, null, null, null, Theme.key_inappPlayerClose));
themeDescriptions.add(new ThemeDescription(fragmentView, ThemeDescription.FLAG_BACKGROUND | ThemeDescription.FLAG_CHECKTAG, new Class[] { FragmentContextView.class }, new String[] { "frameLayout" }, null, null, null, Theme.key_returnToCallBackground));
themeDescriptions.add(new ThemeDescription(fragmentView, ThemeDescription.FLAG_TEXTCOLOR | ThemeDescription.FLAG_CHECKTAG, new Class[] { FragmentContextView.class }, new String[] { "titleTextView" }, null, null, null, Theme.key_returnToCallText));
themeDescriptions.add(new ThemeDescription(pinnedLineView, 0, null, null, null, selectedBackgroundDelegate, Theme.key_chat_topPanelLine));
themeDescriptions.add(new ThemeDescription(pinnedLineView, 0, null, null, null, selectedBackgroundDelegate, Theme.key_windowBackgroundWhite));
themeDescriptions.add(new ThemeDescription(pinnedCounterTextView, ThemeDescription.FLAG_TEXTCOLOR, null, null, null, null, Theme.key_chat_topPanelTitle));
for (int a = 0; a < 2; a++) {
themeDescriptions.add(new ThemeDescription(pinnedNameTextView[a], ThemeDescription.FLAG_TEXTCOLOR, null, null, null, null, Theme.key_chat_topPanelTitle));
themeDescriptions.add(new ThemeDescription(pinnedMessageTextView[a], ThemeDescription.FLAG_TEXTCOLOR, null, null, null, null, Theme.key_chat_topPanelMessage));
}
themeDescriptions.add(new ThemeDescription(alertNameTextView, ThemeDescription.FLAG_TEXTCOLOR, null, null, null, null, Theme.key_chat_topPanelTitle));
themeDescriptions.add(new ThemeDescription(alertTextView, ThemeDescription.FLAG_TEXTCOLOR, null, null, null, null, Theme.key_chat_topPanelMessage));
themeDescriptions.add(new ThemeDescription(closePinned, ThemeDescription.FLAG_IMAGECOLOR, null, null, null, null, Theme.key_chat_topPanelClose));
themeDescriptions.add(new ThemeDescription(pinnedListButton, ThemeDescription.FLAG_IMAGECOLOR, null, null, null, null, Theme.key_chat_topPanelClose));
themeDescriptions.add(new ThemeDescription(closeReportSpam, ThemeDescription.FLAG_IMAGECOLOR, null, null, null, null, Theme.key_chat_topPanelClose));
themeDescriptions.add(new ThemeDescription(topChatPanelView, ThemeDescription.FLAG_BACKGROUNDFILTER, null, null, null, null, Theme.key_chat_topPanelBackground));
themeDescriptions.add(new ThemeDescription(alertView, ThemeDescription.FLAG_BACKGROUNDFILTER, null, null, null, null, Theme.key_chat_topPanelBackground));
themeDescriptions.add(new ThemeDescription(pinnedMessageView, ThemeDescription.FLAG_BACKGROUNDFILTER, null, null, null, null, Theme.key_chat_topPanelBackground));
themeDescriptions.add(new ThemeDescription(addToContactsButton, ThemeDescription.FLAG_TEXTCOLOR, null, null, null, null, Theme.key_chat_addContact));
themeDescriptions.add(new ThemeDescription(reportSpamButton, ThemeDescription.FLAG_TEXTCOLOR | ThemeDescription.FLAG_CHECKTAG, null, null, null, null, Theme.key_chat_reportSpam));
themeDescriptions.add(new ThemeDescription(reportSpamButton, ThemeDescription.FLAG_TEXTCOLOR | ThemeDescription.FLAG_CHECKTAG, null, null, null, null, Theme.key_chat_addContact));
themeDescriptions.add(new ThemeDescription(replyLineView, ThemeDescription.FLAG_BACKGROUND, null, null, null, null, Theme.key_chat_replyPanelLine));
themeDescriptions.add(new ThemeDescription(replyNameTextView, ThemeDescription.FLAG_TEXTCOLOR, null, null, null, null, Theme.key_chat_replyPanelName));
themeDescriptions.add(new ThemeDescription(replyObjectTextView, ThemeDescription.FLAG_TEXTCOLOR, null, null, null, null, Theme.key_windowBackgroundWhiteGrayText));
themeDescriptions.add(new ThemeDescription(replyObjectHintTextView, ThemeDescription.FLAG_TEXTCOLOR, null, null, null, null, Theme.key_windowBackgroundWhiteGrayText));
themeDescriptions.add(new ThemeDescription(replyIconImageView, ThemeDescription.FLAG_IMAGECOLOR, null, null, null, null, Theme.key_chat_replyPanelIcons));
themeDescriptions.add(new ThemeDescription(replyCloseImageView, ThemeDescription.FLAG_IMAGECOLOR, null, null, null, null, Theme.key_chat_replyPanelClose));
themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, selectedBackgroundDelegate, Theme.key_chat_replyPanelName));
themeDescriptions.add(new ThemeDescription(searchUpButton, ThemeDescription.FLAG_IMAGECOLOR, null, null, null, null, Theme.key_chat_searchPanelIcons));
themeDescriptions.add(new ThemeDescription(searchUpButton, ThemeDescription.FLAG_BACKGROUNDFILTER | ThemeDescription.FLAG_DRAWABLESELECTEDSTATE, null, null, null, null, Theme.key_actionBarActionModeDefaultSelector));
themeDescriptions.add(new ThemeDescription(searchDownButton, ThemeDescription.FLAG_IMAGECOLOR, null, null, null, null, Theme.key_chat_searchPanelIcons));
themeDescriptions.add(new ThemeDescription(searchDownButton, ThemeDescription.FLAG_BACKGROUNDFILTER | ThemeDescription.FLAG_DRAWABLESELECTEDSTATE, null, null, null, null, Theme.key_actionBarActionModeDefaultSelector));
themeDescriptions.add(new ThemeDescription(searchCalendarButton, ThemeDescription.FLAG_IMAGECOLOR, null, null, null, null, Theme.key_chat_searchPanelIcons));
themeDescriptions.add(new ThemeDescription(searchCalendarButton, ThemeDescription.FLAG_BACKGROUNDFILTER | ThemeDescription.FLAG_DRAWABLESELECTEDSTATE, null, null, null, null, Theme.key_actionBarActionModeDefaultSelector));
themeDescriptions.add(new ThemeDescription(searchUserButton, ThemeDescription.FLAG_IMAGECOLOR, null, null, null, null, Theme.key_chat_searchPanelIcons));
themeDescriptions.add(new ThemeDescription(searchUserButton, ThemeDescription.FLAG_BACKGROUNDFILTER | ThemeDescription.FLAG_DRAWABLESELECTEDSTATE, null, null, null, null, Theme.key_actionBarActionModeDefaultSelector));
themeDescriptions.add(new ThemeDescription(searchCountText, ThemeDescription.FLAG_TEXTCOLOR, null, null, null, null, Theme.key_chat_searchPanelText));
themeDescriptions.add(new ThemeDescription(searchAsListTogglerView, ThemeDescription.FLAG_BACKGROUNDFILTER | ThemeDescription.FLAG_DRAWABLESELECTEDSTATE, null, null, null, null, Theme.key_actionBarActionModeDefaultSelector));
themeDescriptions.add(new ThemeDescription(replyButton, ThemeDescription.FLAG_TEXTCOLOR | ThemeDescription.FLAG_IMAGECOLOR, null, null, null, null, Theme.key_actionBarActionModeDefaultIcon));
themeDescriptions.add(new ThemeDescription(replyButton, ThemeDescription.FLAG_BACKGROUNDFILTER | ThemeDescription.FLAG_DRAWABLESELECTEDSTATE, null, null, null, null, Theme.key_actionBarActionModeDefaultSelector));
themeDescriptions.add(new ThemeDescription(forwardButton, ThemeDescription.FLAG_TEXTCOLOR | ThemeDescription.FLAG_IMAGECOLOR, null, null, null, null, Theme.key_actionBarActionModeDefaultIcon));
themeDescriptions.add(new ThemeDescription(forwardButton, ThemeDescription.FLAG_BACKGROUNDFILTER | ThemeDescription.FLAG_DRAWABLESELECTEDSTATE, null, null, null, null, Theme.key_actionBarActionModeDefaultSelector));
themeDescriptions.add(new ThemeDescription(bottomOverlayText, ThemeDescription.FLAG_TEXTCOLOR, null, null, null, null, Theme.key_chat_secretChatStatusText));
themeDescriptions.add(new ThemeDescription(bottomOverlayChatText, 0, null, null, null, null, Theme.key_chat_fieldOverlayText));
themeDescriptions.add(new ThemeDescription(bottomOverlayChatText, 0, null, null, null, null, Theme.key_chat_goDownButtonCounterBackground));
themeDescriptions.add(new ThemeDescription(bottomOverlayChatText, 0, null, null, null, null, Theme.key_chat_messagePanelBackground));
themeDescriptions.add(new ThemeDescription(bottomOverlayProgress, 0, null, null, null, null, Theme.key_chat_fieldOverlayText));
themeDescriptions.add(new ThemeDescription(bottomOverlayImage, ThemeDescription.FLAG_IMAGECOLOR, null, null, null, null, Theme.key_chat_fieldOverlayText));
themeDescriptions.add(new ThemeDescription(bigEmptyView, ThemeDescription.FLAG_TEXTCOLOR, null, null, null, null, Theme.key_chat_serviceText));
themeDescriptions.add(new ThemeDescription(emptyView, ThemeDescription.FLAG_TEXTCOLOR, null, null, null, null, Theme.key_chat_serviceText));
themeDescriptions.add(new ThemeDescription(progressBar, ThemeDescription.FLAG_PROGRESSBAR, null, null, null, null, Theme.key_chat_serviceText));
themeDescriptions.add(new ThemeDescription(stickersPanelArrow, ThemeDescription.FLAG_IMAGECOLOR, null, null, null, null, Theme.key_chat_stickersHintPanel));
themeDescriptions.add(new ThemeDescription(stickersListView, ThemeDescription.FLAG_BACKGROUNDFILTER, new Class[] { StickerCell.class }, null, null, null, Theme.key_chat_stickersHintPanel));
themeDescriptions.add(new ThemeDescription(chatListView, ThemeDescription.FLAG_USEBACKGROUNDDRAWABLE, new Class[] { ChatUnreadCell.class }, new String[] { "backgroundLayout" }, null, null, null, Theme.key_chat_unreadMessagesStartBackground));
themeDescriptions.add(new ThemeDescription(chatListView, ThemeDescription.FLAG_IMAGECOLOR, new Class[] { ChatUnreadCell.class }, new String[] { "imageView" }, null, null, null, Theme.key_chat_unreadMessagesStartArrowIcon));
themeDescriptions.add(new ThemeDescription(chatListView, ThemeDescription.FLAG_TEXTCOLOR, new Class[] { ChatUnreadCell.class }, new String[] { "textView" }, null, null, null, Theme.key_chat_unreadMessagesStartText));
themeDescriptions.add(new ThemeDescription(progressView2, ThemeDescription.FLAG_SERVICEBACKGROUND, null, null, null, null, Theme.key_chat_serviceBackground));
themeDescriptions.add(new ThemeDescription(emptyView, ThemeDescription.FLAG_SERVICEBACKGROUND, null, null, null, null, Theme.key_chat_serviceBackground));
themeDescriptions.add(new ThemeDescription(bigEmptyView, ThemeDescription.FLAG_SERVICEBACKGROUND, null, null, null, null, Theme.key_chat_serviceBackground));
themeDescriptions.add(new ThemeDescription(chatListView, ThemeDescription.FLAG_SERVICEBACKGROUND, new Class[] { ChatLoadingCell.class }, new String[] { "textView" }, null, null, null, Theme.key_chat_serviceBackground));
themeDescriptions.add(new ThemeDescription(chatListView, ThemeDescription.FLAG_PROGRESSBAR, new Class[] { ChatLoadingCell.class }, new String[] { "textView" }, null, null, null, Theme.key_chat_serviceText));
themeDescriptions.add(new ThemeDescription(mentionListView, ThemeDescription.FLAG_TEXTCOLOR, new Class[] { BotSwitchCell.class }, new String[] { "textView" }, null, null, null, Theme.key_chat_botSwitchToInlineText));
themeDescriptions.add(new ThemeDescription(mentionListView, ThemeDescription.FLAG_TEXTCOLOR, new Class[] { MentionCell.class }, new String[] { "nameTextView" }, null, null, null, Theme.key_windowBackgroundWhiteBlackText));
themeDescriptions.add(new ThemeDescription(mentionListView, ThemeDescription.FLAG_TEXTCOLOR, new Class[] { MentionCell.class }, new String[] { "usernameTextView" }, null, null, null, Theme.key_windowBackgroundWhiteGrayText3));
themeDescriptions.add(new ThemeDescription(mentionListView, 0, new Class[] { ContextLinkCell.class }, null, new Drawable[] { Theme.chat_inlineResultFile, Theme.chat_inlineResultAudio, Theme.chat_inlineResultLocation }, null, Theme.key_chat_inlineResultIcon));
themeDescriptions.add(new ThemeDescription(mentionListView, 0, new Class[] { ContextLinkCell.class }, null, null, null, Theme.key_windowBackgroundWhiteGrayText2));
themeDescriptions.add(new ThemeDescription(mentionListView, 0, new Class[] { ContextLinkCell.class }, null, null, null, Theme.key_windowBackgroundWhiteLinkText));
themeDescriptions.add(new ThemeDescription(mentionListView, 0, new Class[] { ContextLinkCell.class }, null, null, null, Theme.key_windowBackgroundWhiteBlackText));
themeDescriptions.add(new ThemeDescription(mentionListView, 0, new Class[] { ContextLinkCell.class }, null, null, null, Theme.key_chat_inAudioProgress));
themeDescriptions.add(new ThemeDescription(mentionListView, 0, new Class[] { ContextLinkCell.class }, null, null, null, Theme.key_chat_inAudioSelectedProgress));
themeDescriptions.add(new ThemeDescription(mentionListView, 0, new Class[] { ContextLinkCell.class }, null, null, null, Theme.key_divider));
themeDescriptions.add(new ThemeDescription(gifHintTextView, ThemeDescription.FLAG_BACKGROUNDFILTER, null, null, null, null, Theme.key_chat_gifSaveHintBackground));
themeDescriptions.add(new ThemeDescription(gifHintTextView, ThemeDescription.FLAG_TEXTCOLOR, null, null, null, null, Theme.key_chat_gifSaveHintText));
themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, selectedBackgroundDelegate, Theme.key_chat_attachMediaBanBackground));
themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, selectedBackgroundDelegate, Theme.key_chat_attachMediaBanText));
themeDescriptions.add(new ThemeDescription(noSoundHintView, ThemeDescription.FLAG_TEXTCOLOR, new Class[] { HintView.class }, new String[] { "textView" }, null, null, null, Theme.key_chat_gifSaveHintText));
themeDescriptions.add(new ThemeDescription(noSoundHintView, ThemeDescription.FLAG_IMAGECOLOR, new Class[] { HintView.class }, new String[] { "imageView" }, null, null, null, Theme.key_chat_gifSaveHintText));
themeDescriptions.add(new ThemeDescription(noSoundHintView, ThemeDescription.FLAG_TEXTCOLOR, new Class[] { HintView.class }, new String[] { "arrowImageView" }, null, null, null, Theme.key_chat_gifSaveHintBackground));
themeDescriptions.add(new ThemeDescription(forwardHintView, ThemeDescription.FLAG_TEXTCOLOR, new Class[] { HintView.class }, new String[] { "textView" }, null, null, null, Theme.key_chat_gifSaveHintText));
themeDescriptions.add(new ThemeDescription(forwardHintView, ThemeDescription.FLAG_TEXTCOLOR, new Class[] { HintView.class }, new String[] { "arrowImageView" }, null, null, null, Theme.key_chat_gifSaveHintBackground));
themeDescriptions.add(new ThemeDescription(pagedownButtonCounter, ThemeDescription.FLAG_BACKGROUNDFILTER, null, null, null, null, Theme.key_chat_goDownButtonCounterBackground));
themeDescriptions.add(new ThemeDescription(pagedownButtonCounter, ThemeDescription.FLAG_TEXTCOLOR, null, null, null, null, Theme.key_chat_goDownButtonCounter));
themeDescriptions.add(new ThemeDescription(pagedownButtonImage, ThemeDescription.FLAG_BACKGROUNDFILTER, null, null, null, null, Theme.key_chat_goDownButton));
themeDescriptions.add(new ThemeDescription(pagedownButtonImage, ThemeDescription.FLAG_BACKGROUNDFILTER | ThemeDescription.FLAG_DRAWABLESELECTEDSTATE, null, null, null, null, Theme.key_chat_goDownButtonShadow));
themeDescriptions.add(new ThemeDescription(pagedownButtonImage, ThemeDescription.FLAG_IMAGECOLOR, null, null, null, null, Theme.key_chat_goDownButtonIcon));
themeDescriptions.add(new ThemeDescription(mentiondownButtonCounter, ThemeDescription.FLAG_BACKGROUNDFILTER, null, null, null, null, Theme.key_chat_goDownButtonCounterBackground));
themeDescriptions.add(new ThemeDescription(mentiondownButtonCounter, ThemeDescription.FLAG_TEXTCOLOR, null, null, null, null, Theme.key_chat_goDownButtonCounter));
themeDescriptions.add(new ThemeDescription(mentiondownButtonImage, ThemeDescription.FLAG_BACKGROUNDFILTER, null, null, null, null, Theme.key_chat_goDownButton));
themeDescriptions.add(new ThemeDescription(mentiondownButtonImage, ThemeDescription.FLAG_BACKGROUNDFILTER | ThemeDescription.FLAG_DRAWABLESELECTEDSTATE, null, null, null, null, Theme.key_chat_goDownButtonShadow));
themeDescriptions.add(new ThemeDescription(mentiondownButtonImage, ThemeDescription.FLAG_IMAGECOLOR, null, null, null, null, Theme.key_chat_goDownButtonIcon));
themeDescriptions.add(new ThemeDescription(avatarContainer != null ? avatarContainer.getTimeItem() : null, 0, null, null, null, null, Theme.key_chat_secretTimerBackground));
themeDescriptions.add(new ThemeDescription(avatarContainer != null ? avatarContainer.getTimeItem() : null, 0, null, null, null, null, Theme.key_chat_secretTimerText));
themeDescriptions.add(new ThemeDescription(floatingDateView, 0, null, null, null, null, Theme.key_chat_serviceText));
themeDescriptions.add(new ThemeDescription(floatingDateView, 0, null, null, null, null, Theme.key_chat_serviceBackground));
themeDescriptions.add(new ThemeDescription(infoTopView, 0, null, null, null, null, Theme.key_chat_serviceText));
themeDescriptions.add(new ThemeDescription(infoTopView, 0, null, null, null, null, Theme.key_chat_serviceBackground));
themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, selectedBackgroundDelegate, Theme.key_chat_attachGalleryIcon));
themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, selectedBackgroundDelegate, Theme.key_chat_attachGalleryBackground));
themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, selectedBackgroundDelegate, Theme.key_chat_attachGalleryText));
themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, selectedBackgroundDelegate, Theme.key_chat_attachAudioIcon));
themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, selectedBackgroundDelegate, Theme.key_chat_attachAudioBackground));
themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, selectedBackgroundDelegate, Theme.key_chat_attachAudioText));
themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, selectedBackgroundDelegate, Theme.key_chat_attachFileIcon));
themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, selectedBackgroundDelegate, Theme.key_chat_attachFileBackground));
themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, selectedBackgroundDelegate, Theme.key_chat_attachFileText));
themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, selectedBackgroundDelegate, Theme.key_chat_attachContactIcon));
themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, selectedBackgroundDelegate, Theme.key_chat_attachContactBackground));
themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, selectedBackgroundDelegate, Theme.key_chat_attachContactText));
themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, selectedBackgroundDelegate, Theme.key_chat_attachLocationIcon));
themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, selectedBackgroundDelegate, Theme.key_chat_attachLocationBackground));
themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, selectedBackgroundDelegate, Theme.key_chat_attachLocationText));
themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, selectedBackgroundDelegate, Theme.key_chat_attachPollIcon));
themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, selectedBackgroundDelegate, Theme.key_chat_attachPollBackground));
themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, selectedBackgroundDelegate, Theme.key_chat_attachPollText));
themeDescriptions.add(new ThemeDescription(null, 0, null, null, new Drawable[] { Theme.chat_attachEmptyDrawable }, null, Theme.key_chat_attachEmptyImage));
themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, selectedBackgroundDelegate, Theme.key_chat_attachPhotoBackground));
themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, selectedBackgroundDelegate, Theme.key_dialogBackground));
themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, selectedBackgroundDelegate, Theme.key_dialogBackgroundGray));
themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, selectedBackgroundDelegate, Theme.key_dialogTextGray2));
themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, selectedBackgroundDelegate, Theme.key_dialogScrollGlow));
themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, selectedBackgroundDelegate, Theme.key_dialogGrayLine));
themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, selectedBackgroundDelegate, Theme.key_dialogCameraIcon));
themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, selectedBackgroundDelegate, Theme.key_dialogButtonSelector));
themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_windowBackgroundWhiteLinkSelection));
themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_windowBackgroundWhiteInputField));
themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_chat_outTextSelectionHighlight));
themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_chat_inTextSelectionHighlight));
themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_chat_TextSelectionCursor));
themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_voipgroup_overlayGreen1));
themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_voipgroup_overlayGreen2));
themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_voipgroup_overlayBlue1));
themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_voipgroup_overlayBlue2));
themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_voipgroup_topPanelGreen1));
themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_voipgroup_topPanelGreen2));
themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_voipgroup_topPanelBlue1));
themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_voipgroup_topPanelBlue2));
themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_voipgroup_topPanelGray));
themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_voipgroup_overlayAlertGradientMuted));
themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_voipgroup_overlayAlertGradientMuted2));
themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_voipgroup_overlayAlertGradientUnmuted));
themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_voipgroup_overlayAlertGradientUnmuted2));
themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_voipgroup_mutedByAdminGradient));
themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_voipgroup_mutedByAdminGradient2));
themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_voipgroup_mutedByAdminGradient3));
themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_voipgroup_overlayAlertMutedByAdmin));
themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_voipgroup_overlayAlertMutedByAdmin2));
themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_windowBackgroundGray));
themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_chat_outReactionButtonBackground));
themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_chat_inReactionButtonBackground));
themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_chat_inReactionButtonText));
themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_chat_outReactionButtonText));
themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_chat_inReactionButtonTextSelected));
themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_chat_inReactionButtonTextSelected));
themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, selectedBackgroundDelegate, Theme.key_chat_BlurAlpha));
if (chatActivityEnterView != null) {
themeDescriptions.add(new ThemeDescription(chatActivityEnterView.botCommandsMenuContainer.listView, ThemeDescription.FLAG_TEXTCOLOR, new Class[] { BotCommandsMenuView.BotCommandView.class }, new String[] { "description" }, null, null, null, Theme.key_windowBackgroundWhiteBlackText));
themeDescriptions.add(new ThemeDescription(chatActivityEnterView.botCommandsMenuContainer.listView, ThemeDescription.FLAG_TEXTCOLOR, new Class[] { BotCommandsMenuView.BotCommandView.class }, new String[] { "command" }, null, null, null, Theme.key_windowBackgroundWhiteGrayText));
}
if (pendingRequestsDelegate != null) {
pendingRequestsDelegate.fillThemeDescriptions(themeDescriptions);
}
for (ThemeDescription description : themeDescriptions) {
description.resourcesProvider = themeDelegate;
}
return themeDescriptions;
}
use of org.telegram.ui.Cells.DialogCell in project Telegram-FOSS by Telegram-FOSS-Team.
the class DialogsItemAnimator method animateMove.
@Override
public boolean animateMove(final ViewHolder holder, ItemHolderInfo info, int fromX, int fromY, int toX, int toY) {
final View view = holder.itemView;
fromX += (int) holder.itemView.getTranslationX();
fromY += (int) holder.itemView.getTranslationY();
resetAnimation(holder);
int deltaX = toX - fromX;
int deltaY = toY - fromY;
if (deltaX == 0 && deltaY == 0) {
dispatchMoveFinished(holder);
return false;
}
if (deltaX != 0) {
view.setTranslationX(-deltaX);
}
if (deltaY != 0) {
view.setTranslationY(-deltaY);
}
if (holder.itemView instanceof DialogCell) {
((DialogCell) holder.itemView).setMoving(true);
} else if (holder.itemView instanceof DialogsAdapter.LastEmptyView) {
((DialogsAdapter.LastEmptyView) holder.itemView).moving = true;
}
mPendingMoves.add(new MoveInfo(holder, fromX, fromY, toX, toY));
return true;
}
use of org.telegram.ui.Cells.DialogCell in project Telegram-FOSS by Telegram-FOSS-Team.
the class DialogsActivity method updateDialogIndices.
private void updateDialogIndices() {
if (viewPages == null) {
return;
}
for (int b = 0; b < viewPages.length; b++) {
if (viewPages[b].getVisibility() != View.VISIBLE) {
continue;
}
ArrayList<TLRPC.Dialog> dialogs = getDialogsArray(currentAccount, viewPages[b].dialogsType, folderId, false);
int count = viewPages[b].listView.getChildCount();
for (int a = 0; a < count; a++) {
View child = viewPages[b].listView.getChildAt(a);
if (child instanceof DialogCell) {
DialogCell dialogCell = (DialogCell) child;
TLRPC.Dialog dialog = getMessagesController().dialogs_dict.get(dialogCell.getDialogId());
if (dialog == null) {
continue;
}
int index = dialogs.indexOf(dialog);
if (index < 0) {
continue;
}
dialogCell.setDialogIndex(index);
}
}
}
}
use of org.telegram.ui.Cells.DialogCell in project Telegram-FOSS by Telegram-FOSS-Team.
the class MessagesSearchAdapter method onCreateViewHolder.
@Override
public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
View view = null;
switch(viewType) {
case 0:
view = new DialogCell(null, mContext, false, true, currentAccount, resourcesProvider);
break;
case 1:
view = new LoadingCell(mContext);
break;
}
view.setLayoutParams(new RecyclerView.LayoutParams(RecyclerView.LayoutParams.MATCH_PARENT, RecyclerView.LayoutParams.WRAP_CONTENT));
return new RecyclerListView.Holder(view);
}
Aggregations