Search in sources :

Example 11 with UserCell

use of org.telegram.ui.Cells.UserCell in project Telegram-FOSS by Telegram-FOSS-Team.

the class ContactsActivity method getThemeDescriptions.

@Override
public ArrayList<ThemeDescription> getThemeDescriptions() {
    ArrayList<ThemeDescription> themeDescriptions = new ArrayList<>();
    ThemeDescription.ThemeDescriptionDelegate cellDelegate = () -> {
        if (listView != null) {
            int count = listView.getChildCount();
            for (int a = 0; a < count; a++) {
                View child = listView.getChildAt(a);
                if (child instanceof UserCell) {
                    ((UserCell) child).update(0);
                } else if (child instanceof ProfileSearchCell) {
                    ((ProfileSearchCell) child).update(0);
                }
            }
        }
    };
    themeDescriptions.add(new ThemeDescription(fragmentView, ThemeDescription.FLAG_BACKGROUND, null, null, null, null, Theme.key_windowBackgroundWhite));
    themeDescriptions.add(new ThemeDescription(actionBar, ThemeDescription.FLAG_BACKGROUND, null, null, null, null, Theme.key_actionBarDefault));
    themeDescriptions.add(new ThemeDescription(listView, ThemeDescription.FLAG_LISTGLOWCOLOR, 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_TITLECOLOR, null, null, null, null, Theme.key_actionBarDefaultTitle));
    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(listView, ThemeDescription.FLAG_SELECTOR, null, null, null, null, Theme.key_listSelector));
    themeDescriptions.add(new ThemeDescription(listView, ThemeDescription.FLAG_SECTIONS, new Class[] { LetterSectionCell.class }, new String[] { "textView" }, null, null, null, Theme.key_windowBackgroundWhiteGrayText4));
    themeDescriptions.add(new ThemeDescription(listView, 0, new Class[] { View.class }, Theme.dividerPaint, null, null, Theme.key_divider));
    themeDescriptions.add(new ThemeDescription(listView, ThemeDescription.FLAG_FASTSCROLL, null, null, null, null, Theme.key_fastScrollActive));
    themeDescriptions.add(new ThemeDescription(listView, ThemeDescription.FLAG_FASTSCROLL, null, null, null, null, Theme.key_fastScrollInactive));
    themeDescriptions.add(new ThemeDescription(listView, ThemeDescription.FLAG_FASTSCROLL, null, null, null, null, Theme.key_fastScrollText));
    themeDescriptions.add(new ThemeDescription(listView, 0, new Class[] { UserCell.class }, new String[] { "nameTextView" }, null, null, null, Theme.key_windowBackgroundWhiteBlackText));
    themeDescriptions.add(new ThemeDescription(listView, 0, new Class[] { UserCell.class }, new String[] { "statusColor" }, null, null, cellDelegate, Theme.key_windowBackgroundWhiteGrayText));
    themeDescriptions.add(new ThemeDescription(listView, 0, new Class[] { UserCell.class }, new String[] { "statusOnlineColor" }, null, null, cellDelegate, Theme.key_windowBackgroundWhiteBlueText));
    themeDescriptions.add(new ThemeDescription(listView, 0, new Class[] { UserCell.class }, null, Theme.avatarDrawables, null, Theme.key_avatar_text));
    themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, cellDelegate, Theme.key_avatar_backgroundRed));
    themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, cellDelegate, Theme.key_avatar_backgroundOrange));
    themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, cellDelegate, Theme.key_avatar_backgroundViolet));
    themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, cellDelegate, Theme.key_avatar_backgroundGreen));
    themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, cellDelegate, Theme.key_avatar_backgroundCyan));
    themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, cellDelegate, Theme.key_avatar_backgroundBlue));
    themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, cellDelegate, Theme.key_avatar_backgroundPink));
    themeDescriptions.add(new ThemeDescription(listView, ThemeDescription.FLAG_TEXTCOLOR | ThemeDescription.FLAG_CHECKTAG, new Class[] { TextCell.class }, new String[] { "textView" }, null, null, null, Theme.key_windowBackgroundWhiteBlackText));
    themeDescriptions.add(new ThemeDescription(listView, ThemeDescription.FLAG_TEXTCOLOR | ThemeDescription.FLAG_CHECKTAG, new Class[] { TextCell.class }, new String[] { "textView" }, null, null, null, Theme.key_windowBackgroundWhiteBlueText2));
    themeDescriptions.add(new ThemeDescription(listView, 0, new Class[] { TextCell.class }, new String[] { "imageView" }, null, null, null, Theme.key_windowBackgroundWhiteGrayIcon));
    themeDescriptions.add(new ThemeDescription(floatingButton, ThemeDescription.FLAG_IMAGECOLOR, null, null, null, null, Theme.key_chats_actionIcon));
    themeDescriptions.add(new ThemeDescription(floatingButton, ThemeDescription.FLAG_BACKGROUNDFILTER, null, null, null, null, Theme.key_chats_actionBackground));
    themeDescriptions.add(new ThemeDescription(floatingButton, ThemeDescription.FLAG_BACKGROUNDFILTER | ThemeDescription.FLAG_DRAWABLESELECTEDSTATE, null, null, null, null, Theme.key_chats_actionPressedBackground));
    themeDescriptions.add(new ThemeDescription(listView, 0, new Class[] { GraySectionCell.class }, new String[] { "textView" }, null, null, null, Theme.key_graySectionText));
    themeDescriptions.add(new ThemeDescription(listView, ThemeDescription.FLAG_CELLBACKGROUNDCOLOR, new Class[] { GraySectionCell.class }, null, null, null, Theme.key_graySection));
    themeDescriptions.add(new ThemeDescription(listView, 0, new Class[] { ProfileSearchCell.class }, null, new Drawable[] { Theme.dialogs_groupDrawable, Theme.dialogs_broadcastDrawable, Theme.dialogs_botDrawable }, null, Theme.key_chats_nameIcon));
    themeDescriptions.add(new ThemeDescription(listView, 0, new Class[] { ProfileSearchCell.class }, null, new Drawable[] { Theme.dialogs_verifiedCheckDrawable }, null, Theme.key_chats_verifiedCheck));
    themeDescriptions.add(new ThemeDescription(listView, 0, new Class[] { ProfileSearchCell.class }, null, new Drawable[] { Theme.dialogs_verifiedDrawable }, null, Theme.key_chats_verifiedBackground));
    themeDescriptions.add(new ThemeDescription(listView, 0, new Class[] { ProfileSearchCell.class }, Theme.dialogs_offlinePaint, null, null, Theme.key_windowBackgroundWhiteGrayText3));
    themeDescriptions.add(new ThemeDescription(listView, 0, new Class[] { ProfileSearchCell.class }, Theme.dialogs_onlinePaint, null, null, Theme.key_windowBackgroundWhiteBlueText3));
    themeDescriptions.add(new ThemeDescription(listView, 0, new Class[] { ProfileSearchCell.class }, null, new Paint[] { Theme.dialogs_namePaint[0], Theme.dialogs_namePaint[1], Theme.dialogs_searchNamePaint }, null, null, Theme.key_chats_name));
    themeDescriptions.add(new ThemeDescription(listView, 0, new Class[] { ProfileSearchCell.class }, null, new Paint[] { Theme.dialogs_nameEncryptedPaint[0], Theme.dialogs_nameEncryptedPaint[1], Theme.dialogs_searchNameEncryptedPaint }, null, null, Theme.key_chats_secretName));
    return themeDescriptions;
}
Also used : GraySectionCell(org.telegram.ui.Cells.GraySectionCell) ArrayList(java.util.ArrayList) Drawable(android.graphics.drawable.Drawable) CombinedDrawable(org.telegram.ui.Components.CombinedDrawable) Paint(android.graphics.Paint) ThemeDescription(org.telegram.ui.ActionBar.ThemeDescription) ImageView(android.widget.ImageView) View(android.view.View) RecyclerView(androidx.recyclerview.widget.RecyclerView) RLottieImageView(org.telegram.ui.Components.RLottieImageView) StickerEmptyView(org.telegram.ui.Components.StickerEmptyView) FlickerLoadingView(org.telegram.ui.Components.FlickerLoadingView) RecyclerListView(org.telegram.ui.Components.RecyclerListView) TextCell(org.telegram.ui.Cells.TextCell) ProfileSearchCell(org.telegram.ui.Cells.ProfileSearchCell) LetterSectionCell(org.telegram.ui.Cells.LetterSectionCell) UserCell(org.telegram.ui.Cells.UserCell)

Example 12 with UserCell

use of org.telegram.ui.Cells.UserCell in project Telegram-FOSS by Telegram-FOSS-Team.

the class InviteLinkBottomSheet method updateColorForView.

private void updateColorForView(View view) {
    if (view instanceof HeaderCell) {
        ((HeaderCell) view).getTextView().setTextColor(Theme.getColor(Theme.key_windowBackgroundWhiteBlueHeader));
    } else if (view instanceof LinkActionView) {
        ((LinkActionView) view).updateColors();
    } else if (view instanceof TextInfoPrivacyCell) {
        CombinedDrawable combinedDrawable = new CombinedDrawable(new ColorDrawable(Theme.getColor(Theme.key_windowBackgroundGray)), Theme.getThemedDrawable(view.getContext(), R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
        combinedDrawable.setFullsize(true);
        view.setBackground(combinedDrawable);
        ((TextInfoPrivacyCell) view).setTextColor(Theme.getColor(Theme.key_windowBackgroundWhiteGrayText4));
    } else if (view instanceof UserCell) {
        ((UserCell) view).update(0);
    }
    RecyclerView.ViewHolder holder = listView.getChildViewHolder(view);
    if (holder != null) {
        if (holder.getItemViewType() == 7) {
            Drawable shadowDrawable = Theme.getThemedDrawable(view.getContext(), R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow);
            Drawable background = new ColorDrawable(Theme.getColor(Theme.key_windowBackgroundGray));
            CombinedDrawable combinedDrawable = new CombinedDrawable(background, shadowDrawable, 0, 0);
            combinedDrawable.setFullsize(true);
            view.setBackgroundDrawable(combinedDrawable);
        } else if (holder.getItemViewType() == 2) {
            Drawable shadowDrawable = Theme.getThemedDrawable(view.getContext(), R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow);
            Drawable background = new ColorDrawable(Theme.getColor(Theme.key_windowBackgroundGray));
            CombinedDrawable combinedDrawable = new CombinedDrawable(background, shadowDrawable, 0, 0);
            combinedDrawable.setFullsize(true);
            view.setBackgroundDrawable(combinedDrawable);
        }
    }
}
Also used : ColorDrawable(android.graphics.drawable.ColorDrawable) HeaderCell(org.telegram.ui.Cells.HeaderCell) ColorDrawable(android.graphics.drawable.ColorDrawable) Drawable(android.graphics.drawable.Drawable) TextInfoPrivacyCell(org.telegram.ui.Cells.TextInfoPrivacyCell) RecyclerView(androidx.recyclerview.widget.RecyclerView) UserCell(org.telegram.ui.Cells.UserCell)

Example 13 with UserCell

use of org.telegram.ui.Cells.UserCell in project Telegram-FOSS by Telegram-FOSS-Team.

the class FilterCreateActivity method createView.

@Override
public View createView(Context context) {
    actionBar.setBackButtonImage(R.drawable.ic_ab_back);
    actionBar.setAllowOverlayTitle(true);
    ActionBarMenu menu = actionBar.createMenu();
    if (creatingNew) {
        actionBar.setTitle(LocaleController.getString("FilterNew", R.string.FilterNew));
    } else {
        TextPaint paint = new TextPaint(Paint.ANTI_ALIAS_FLAG);
        paint.setTextSize(AndroidUtilities.dp(20));
        actionBar.setTitle(Emoji.replaceEmoji(filter.name, paint.getFontMetricsInt(), AndroidUtilities.dp(20), false));
    }
    actionBar.setActionBarMenuOnItemClick(new ActionBar.ActionBarMenuOnItemClick() {

        @Override
        public void onItemClick(int id) {
            if (id == -1) {
                if (checkDiscard()) {
                    finishFragment();
                }
            } else if (id == done_button) {
                processDone();
            }
        }
    });
    doneItem = menu.addItem(done_button, LocaleController.getString("Save", R.string.Save).toUpperCase());
    fragmentView = new FrameLayout(context);
    FrameLayout frameLayout = (FrameLayout) fragmentView;
    frameLayout.setBackgroundColor(Theme.getColor(Theme.key_windowBackgroundGray));
    listView = new RecyclerListView(context) {

        @Override
        public boolean requestFocus(int direction, Rect previouslyFocusedRect) {
            return false;
        }
    };
    listView.setLayoutManager(new LinearLayoutManager(context, LinearLayoutManager.VERTICAL, false));
    listView.setVerticalScrollBarEnabled(false);
    frameLayout.addView(listView, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.MATCH_PARENT));
    listView.setAdapter(adapter = new ListAdapter(context));
    listView.setOnItemClickListener((view, position) -> {
        if (getParentActivity() == null) {
            return;
        }
        if (position == includeShowMoreRow) {
            includeExpanded = true;
            updateRows();
        } else if (position == excludeShowMoreRow) {
            excludeExpanded = true;
            updateRows();
        } else if (position == includeAddRow || position == excludeAddRow) {
            ArrayList<Long> arrayList = position == excludeAddRow ? newNeverShow : newAlwaysShow;
            FilterUsersActivity fragment = new FilterUsersActivity(position == includeAddRow, arrayList, newFilterFlags);
            fragment.setDelegate((ids, flags) -> {
                newFilterFlags = flags;
                if (position == excludeAddRow) {
                    newNeverShow = ids;
                    for (int a = 0; a < newNeverShow.size(); a++) {
                        Long id = newNeverShow.get(a);
                        newAlwaysShow.remove(id);
                        newPinned.delete(id);
                    }
                } else {
                    newAlwaysShow = ids;
                    for (int a = 0; a < newAlwaysShow.size(); a++) {
                        newNeverShow.remove(newAlwaysShow.get(a));
                    }
                    ArrayList<Long> toRemove = new ArrayList<>();
                    for (int a = 0, N = newPinned.size(); a < N; a++) {
                        Long did = newPinned.keyAt(a);
                        if (DialogObject.isEncryptedDialog(did)) {
                            continue;
                        }
                        if (newAlwaysShow.contains(did)) {
                            continue;
                        }
                        toRemove.add(did);
                    }
                    for (int a = 0, N = toRemove.size(); a < N; a++) {
                        newPinned.delete(toRemove.get(a));
                    }
                }
                fillFilterName();
                checkDoneButton(false);
                updateRows();
            });
            presentFragment(fragment);
        } else if (position == removeRow) {
            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), (dialog, which) -> {
                AlertDialog progressDialog = null;
                if (getParentActivity() != null) {
                    progressDialog = new AlertDialog(getParentActivity(), 3);
                    progressDialog.setCanCacnel(false);
                    progressDialog.show();
                }
                final AlertDialog progressDialogFinal = progressDialog;
                TLRPC.TL_messages_updateDialogFilter req = new TLRPC.TL_messages_updateDialogFilter();
                req.id = filter.id;
                getConnectionsManager().sendRequest(req, (response, error) -> AndroidUtilities.runOnUIThread(() -> {
                    try {
                        if (progressDialogFinal != null) {
                            progressDialogFinal.dismiss();
                        }
                    } catch (Exception e) {
                        FileLog.e(e);
                    }
                    getMessagesController().removeFilter(filter);
                    getMessagesStorage().deleteDialogFilter(filter);
                    finishFragment();
                }));
            });
            AlertDialog alertDialog = builder.create();
            showDialog(alertDialog);
            TextView button = (TextView) alertDialog.getButton(DialogInterface.BUTTON_POSITIVE);
            if (button != null) {
                button.setTextColor(Theme.getColor(Theme.key_dialogTextRed2));
            }
        } else if (position == nameRow) {
            PollEditTextCell cell = (PollEditTextCell) view;
            cell.getTextView().requestFocus();
            AndroidUtilities.showKeyboard(cell.getTextView());
        } else if (view instanceof UserCell) {
            UserCell cell = (UserCell) view;
            showRemoveAlert(position, cell.getName(), cell.getCurrentObject(), position < includeSectionRow);
        }
    });
    listView.setOnItemLongClickListener((view, position) -> {
        if (view instanceof UserCell) {
            UserCell cell = (UserCell) view;
            showRemoveAlert(position, cell.getName(), cell.getCurrentObject(), position < includeSectionRow);
            return true;
        }
        return false;
    });
    checkDoneButton(false);
    return fragmentView;
}
Also used : AlertDialog(org.telegram.ui.ActionBar.AlertDialog) ThemeDescription(org.telegram.ui.ActionBar.ThemeDescription) Context(android.content.Context) Rect(android.graphics.Rect) ActionBarMenuItem(org.telegram.ui.ActionBar.ActionBarMenuItem) Theme(org.telegram.ui.ActionBar.Theme) FrameLayout(android.widget.FrameLayout) ImageView(android.widget.ImageView) AndroidUtilities(org.telegram.messenger.AndroidUtilities) LocaleController(org.telegram.messenger.LocaleController) HeaderCell(org.telegram.ui.Cells.HeaderCell) EditTextBoldCursor(org.telegram.ui.Components.EditTextBoldCursor) Editable(android.text.Editable) TextInfoPrivacyCell(org.telegram.ui.Cells.TextInfoPrivacyCell) ArrayList(java.util.ArrayList) ShadowSectionCell(org.telegram.ui.Cells.ShadowSectionCell) TextCell(org.telegram.ui.Cells.TextCell) TLRPC(org.telegram.tgnet.TLRPC) ActionBar(org.telegram.ui.ActionBar.ActionBar) View(android.view.View) Emoji(org.telegram.messenger.Emoji) RecyclerView(androidx.recyclerview.widget.RecyclerView) DialogInterface(android.content.DialogInterface) LongSparseIntArray(org.telegram.messenger.support.LongSparseIntArray) SimpleTextView(org.telegram.ui.ActionBar.SimpleTextView) PollEditTextCell(org.telegram.ui.Cells.PollEditTextCell) DialogObject(org.telegram.messenger.DialogObject) ActionBarMenu(org.telegram.ui.ActionBar.ActionBarMenu) UserCell(org.telegram.ui.Cells.UserCell) RLottieImageView(org.telegram.ui.Components.RLottieImageView) R(org.telegram.messenger.R) TextUtils(android.text.TextUtils) BaseFragment(org.telegram.ui.ActionBar.BaseFragment) LayoutHelper(org.telegram.ui.Components.LayoutHelper) FileLog(org.telegram.messenger.FileLog) ViewGroup(android.view.ViewGroup) MessagesController(org.telegram.messenger.MessagesController) NotificationCenter(org.telegram.messenger.NotificationCenter) Gravity(android.view.Gravity) TextView(android.widget.TextView) TextPaint(android.text.TextPaint) Paint(android.graphics.Paint) LinearLayoutManager(androidx.recyclerview.widget.LinearLayoutManager) EditorInfo(android.view.inputmethod.EditorInfo) ChatObject(org.telegram.messenger.ChatObject) AlertDialog(org.telegram.ui.ActionBar.AlertDialog) Collections(java.util.Collections) RecyclerListView(org.telegram.ui.Components.RecyclerListView) TextWatcher(android.text.TextWatcher) ArrayList(java.util.ArrayList) RecyclerListView(org.telegram.ui.Components.RecyclerListView) LinearLayoutManager(androidx.recyclerview.widget.LinearLayoutManager) TLRPC(org.telegram.tgnet.TLRPC) SimpleTextView(org.telegram.ui.ActionBar.SimpleTextView) TextView(android.widget.TextView) UserCell(org.telegram.ui.Cells.UserCell) ActionBar(org.telegram.ui.ActionBar.ActionBar) Rect(android.graphics.Rect) ActionBarMenu(org.telegram.ui.ActionBar.ActionBarMenu) TextPaint(android.text.TextPaint) Paint(android.graphics.Paint) TextPaint(android.text.TextPaint) PollEditTextCell(org.telegram.ui.Cells.PollEditTextCell) FrameLayout(android.widget.FrameLayout)

Example 14 with UserCell

use of org.telegram.ui.Cells.UserCell in project Telegram-FOSS by Telegram-FOSS-Team.

the class FilterCreateActivity method getThemeDescriptions.

@Override
public ArrayList<ThemeDescription> getThemeDescriptions() {
    ArrayList<ThemeDescription> themeDescriptions = new ArrayList<>();
    ThemeDescription.ThemeDescriptionDelegate themeDelegate = () -> {
        if (listView != null) {
            int count = listView.getChildCount();
            for (int a = 0; a < count; a++) {
                View child = listView.getChildAt(a);
                if (child instanceof UserCell) {
                    ((UserCell) child).update(0);
                }
            }
        }
    };
    themeDescriptions.add(new ThemeDescription(listView, ThemeDescription.FLAG_CELLBACKGROUNDCOLOR, new Class[] { HeaderCell.class, TextCell.class, PollEditTextCell.class, UserCell.class }, null, null, null, Theme.key_windowBackgroundWhite));
    themeDescriptions.add(new ThemeDescription(fragmentView, ThemeDescription.FLAG_BACKGROUND, null, null, null, null, Theme.key_windowBackgroundGray));
    themeDescriptions.add(new ThemeDescription(actionBar, ThemeDescription.FLAG_BACKGROUND, null, null, null, null, Theme.key_actionBarDefault));
    themeDescriptions.add(new ThemeDescription(listView, ThemeDescription.FLAG_LISTGLOWCOLOR, 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_TITLECOLOR, null, null, null, null, Theme.key_actionBarDefaultTitle));
    themeDescriptions.add(new ThemeDescription(actionBar, ThemeDescription.FLAG_AB_SELECTORCOLOR, null, null, null, null, Theme.key_actionBarDefaultSelector));
    themeDescriptions.add(new ThemeDescription(listView, ThemeDescription.FLAG_SELECTOR, null, null, null, null, Theme.key_listSelector));
    themeDescriptions.add(new ThemeDescription(listView, 0, new Class[] { View.class }, Theme.dividerPaint, null, null, Theme.key_divider));
    themeDescriptions.add(new ThemeDescription(listView, 0, new Class[] { HeaderCell.class }, new String[] { "textView" }, null, null, null, Theme.key_windowBackgroundWhiteBlueHeader));
    themeDescriptions.add(new ThemeDescription(listView, ThemeDescription.FLAG_CHECKTAG, new Class[] { TextCell.class }, new String[] { "textView" }, null, null, null, Theme.key_windowBackgroundWhiteBlackText));
    themeDescriptions.add(new ThemeDescription(listView, ThemeDescription.FLAG_CHECKTAG, new Class[] { TextCell.class }, new String[] { "textView" }, null, null, null, Theme.key_windowBackgroundWhiteRedText5));
    themeDescriptions.add(new ThemeDescription(listView, ThemeDescription.FLAG_CHECKTAG, new Class[] { TextCell.class }, new String[] { "textView" }, null, null, null, Theme.key_windowBackgroundWhiteBlueText4));
    themeDescriptions.add(new ThemeDescription(listView, ThemeDescription.FLAG_CHECKTAG, new Class[] { TextCell.class }, new String[] { "ImageView" }, null, null, null, Theme.key_switchTrackChecked));
    themeDescriptions.add(new ThemeDescription(listView, ThemeDescription.FLAG_BACKGROUNDFILTER, new Class[] { ShadowSectionCell.class }, null, null, null, Theme.key_windowBackgroundGrayShadow));
    themeDescriptions.add(new ThemeDescription(listView, ThemeDescription.FLAG_BACKGROUNDFILTER, new Class[] { TextInfoPrivacyCell.class }, null, null, null, Theme.key_windowBackgroundGrayShadow));
    themeDescriptions.add(new ThemeDescription(listView, 0, new Class[] { TextInfoPrivacyCell.class }, new String[] { "textView" }, null, null, null, Theme.key_windowBackgroundWhiteGrayText4));
    themeDescriptions.add(new ThemeDescription(listView, ThemeDescription.FLAG_TEXTCOLOR, new Class[] { UserCell.class }, new String[] { "adminTextView" }, null, null, null, Theme.key_profile_creatorIcon));
    themeDescriptions.add(new ThemeDescription(listView, 0, new Class[] { UserCell.class }, new String[] { "imageView" }, null, null, null, Theme.key_windowBackgroundWhiteGrayIcon));
    themeDescriptions.add(new ThemeDescription(listView, 0, new Class[] { UserCell.class }, new String[] { "nameTextView" }, null, null, null, Theme.key_windowBackgroundWhiteBlackText));
    themeDescriptions.add(new ThemeDescription(listView, 0, new Class[] { UserCell.class }, new String[] { "statusColor" }, null, null, themeDelegate, Theme.key_windowBackgroundWhiteGrayText));
    themeDescriptions.add(new ThemeDescription(listView, 0, new Class[] { UserCell.class }, new String[] { "statusOnlineColor" }, null, null, themeDelegate, Theme.key_windowBackgroundWhiteBlueText));
    themeDescriptions.add(new ThemeDescription(listView, 0, new Class[] { UserCell.class }, null, Theme.avatarDrawables, null, Theme.key_avatar_text));
    themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, themeDelegate, Theme.key_avatar_backgroundRed));
    themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, themeDelegate, Theme.key_avatar_backgroundOrange));
    themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, themeDelegate, Theme.key_avatar_backgroundViolet));
    themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, themeDelegate, Theme.key_avatar_backgroundGreen));
    themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, themeDelegate, Theme.key_avatar_backgroundCyan));
    themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, themeDelegate, Theme.key_avatar_backgroundBlue));
    themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, themeDelegate, Theme.key_avatar_backgroundPink));
    return themeDescriptions;
}
Also used : ShadowSectionCell(org.telegram.ui.Cells.ShadowSectionCell) HeaderCell(org.telegram.ui.Cells.HeaderCell) ArrayList(java.util.ArrayList) TextInfoPrivacyCell(org.telegram.ui.Cells.TextInfoPrivacyCell) ThemeDescription(org.telegram.ui.ActionBar.ThemeDescription) ImageView(android.widget.ImageView) View(android.view.View) RecyclerView(androidx.recyclerview.widget.RecyclerView) SimpleTextView(org.telegram.ui.ActionBar.SimpleTextView) RLottieImageView(org.telegram.ui.Components.RLottieImageView) TextView(android.widget.TextView) RecyclerListView(org.telegram.ui.Components.RecyclerListView) TextCell(org.telegram.ui.Cells.TextCell) PollEditTextCell(org.telegram.ui.Cells.PollEditTextCell) PollEditTextCell(org.telegram.ui.Cells.PollEditTextCell) UserCell(org.telegram.ui.Cells.UserCell)

Aggregations

UserCell (org.telegram.ui.Cells.UserCell)14 RecyclerView (androidx.recyclerview.widget.RecyclerView)12 View (android.view.View)11 ArrayList (java.util.ArrayList)10 TextCell (org.telegram.ui.Cells.TextCell)10 RecyclerListView (org.telegram.ui.Components.RecyclerListView)10 TextView (android.widget.TextView)9 ImageView (android.widget.ImageView)8 Drawable (android.graphics.drawable.Drawable)7 ThemeDescription (org.telegram.ui.ActionBar.ThemeDescription)7 ShadowSectionCell (org.telegram.ui.Cells.ShadowSectionCell)7 RLottieImageView (org.telegram.ui.Components.RLottieImageView)7 Paint (android.graphics.Paint)6 GraySectionCell (org.telegram.ui.Cells.GraySectionCell)6 HeaderCell (org.telegram.ui.Cells.HeaderCell)6 TextInfoPrivacyCell (org.telegram.ui.Cells.TextInfoPrivacyCell)6 ColorDrawable (android.graphics.drawable.ColorDrawable)4 TextPaint (android.text.TextPaint)4 TLRPC (org.telegram.tgnet.TLRPC)4 SimpleTextView (org.telegram.ui.ActionBar.SimpleTextView)4