Search in sources :

Example 6 with ManageChatUserCell

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

the class PrivacyUsersActivity 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 ManageChatUserCell) {
                    ((ManageChatUserCell) child).update(0);
                }
            }
        }
    };
    themeDescriptions.add(new ThemeDescription(fragmentView, ThemeDescription.FLAG_BACKGROUND, null, null, null, null, Theme.key_windowBackgroundGray));
    themeDescriptions.add(new ThemeDescription(listView, ThemeDescription.FLAG_CELLBACKGROUNDCOLOR, new Class[] { ManageChatUserCell.class, ManageChatTextCell.class, HeaderCell.class }, 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(listView, ThemeDescription.FLAG_SELECTOR, null, null, null, null, Theme.key_listSelector));
    themeDescriptions.add(new ThemeDescription(emptyView, ThemeDescription.FLAG_TEXTCOLOR, null, null, null, null, Theme.key_emptyListPlaceholder));
    themeDescriptions.add(new ThemeDescription(emptyView, ThemeDescription.FLAG_PROGRESSBAR, null, null, null, null, Theme.key_progressCircle));
    themeDescriptions.add(new ThemeDescription(listView, ThemeDescription.FLAG_BACKGROUNDFILTER, new Class[] { ShadowSectionCell.class }, null, null, null, Theme.key_windowBackgroundGrayShadow));
    themeDescriptions.add(new ThemeDescription(listView, 0, new Class[] { ManageChatUserCell.class }, new String[] { "nameTextView" }, null, null, null, Theme.key_windowBackgroundWhiteBlackText));
    themeDescriptions.add(new ThemeDescription(listView, 0, new Class[] { ManageChatUserCell.class }, new String[] { "statusColor" }, null, null, cellDelegate, Theme.key_windowBackgroundWhiteGrayText));
    themeDescriptions.add(new ThemeDescription(listView, 0, new Class[] { ManageChatUserCell.class }, new String[] { "statusOnlineColor" }, null, null, cellDelegate, Theme.key_windowBackgroundWhiteBlueText));
    themeDescriptions.add(new ThemeDescription(listView, 0, new Class[] { ManageChatUserCell.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, 0, new Class[] { HeaderCell.class }, new String[] { "textView" }, null, null, null, Theme.key_windowBackgroundWhiteBlueHeader));
    themeDescriptions.add(new ThemeDescription(listView, ThemeDescription.FLAG_CHECKTAG, new Class[] { ManageChatTextCell.class }, new String[] { "textView" }, null, null, null, Theme.key_windowBackgroundWhiteBlackText));
    themeDescriptions.add(new ThemeDescription(listView, ThemeDescription.FLAG_CHECKTAG, new Class[] { ManageChatTextCell.class }, new String[] { "imageView" }, null, null, null, Theme.key_windowBackgroundWhiteGrayIcon));
    themeDescriptions.add(new ThemeDescription(listView, ThemeDescription.FLAG_CHECKTAG, new Class[] { ManageChatTextCell.class }, new String[] { "imageView" }, null, null, null, Theme.key_windowBackgroundWhiteBlueButton));
    themeDescriptions.add(new ThemeDescription(listView, ThemeDescription.FLAG_CHECKTAG, new Class[] { ManageChatTextCell.class }, new String[] { "textView" }, null, null, null, Theme.key_windowBackgroundWhiteBlueIcon));
    return themeDescriptions;
}
Also used : ManageChatUserCell(org.telegram.ui.Cells.ManageChatUserCell) ShadowSectionCell(org.telegram.ui.Cells.ShadowSectionCell) ManageChatTextCell(org.telegram.ui.Cells.ManageChatTextCell) HeaderCell(org.telegram.ui.Cells.HeaderCell) ArrayList(java.util.ArrayList) ThemeDescription(org.telegram.ui.ActionBar.ThemeDescription) View(android.view.View) RecyclerView(androidx.recyclerview.widget.RecyclerView) EmptyTextProgressView(org.telegram.ui.Components.EmptyTextProgressView) RecyclerListView(org.telegram.ui.Components.RecyclerListView)

Example 7 with ManageChatUserCell

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

the class ChatLinkActivity 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 ManageChatUserCell) {
                    ((ManageChatUserCell) child).update(0);
                }
            }
        }
    };
    themeDescriptions.add(new ThemeDescription(listView, ThemeDescription.FLAG_CELLBACKGROUNDCOLOR, new Class[] { ManageChatUserCell.class, ManageChatTextCell.class }, null, null, null, Theme.key_windowBackgroundWhite));
    themeDescriptions.add(new ThemeDescription(fragmentView, ThemeDescription.FLAG_BACKGROUND | ThemeDescription.FLAG_CHECKTAG, null, null, null, null, Theme.key_windowBackgroundGray));
    themeDescriptions.add(new ThemeDescription(fragmentView, ThemeDescription.FLAG_BACKGROUND | ThemeDescription.FLAG_CHECKTAG, 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(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, 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, 0, new Class[] { ManageChatUserCell.class }, new String[] { "nameTextView" }, null, null, null, Theme.key_windowBackgroundWhiteBlackText));
    themeDescriptions.add(new ThemeDescription(listView, 0, new Class[] { ManageChatUserCell.class }, new String[] { "statusColor" }, null, null, cellDelegate, Theme.key_windowBackgroundWhiteGrayText));
    themeDescriptions.add(new ThemeDescription(listView, 0, new Class[] { ManageChatUserCell.class }, new String[] { "statusOnlineColor" }, null, null, cellDelegate, Theme.key_windowBackgroundWhiteBlueText));
    themeDescriptions.add(new ThemeDescription(listView, 0, new Class[] { ManageChatUserCell.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, 0, new Class[] { HintInnerCell.class }, new String[] { "messageTextView" }, null, null, null, Theme.key_chats_message));
    themeDescriptions.add(new ThemeDescription(listView, ThemeDescription.FLAG_CHECKTAG, new Class[] { ManageChatTextCell.class }, new String[] { "textView" }, null, null, null, Theme.key_windowBackgroundWhiteBlackText));
    themeDescriptions.add(new ThemeDescription(listView, ThemeDescription.FLAG_CHECKTAG, new Class[] { ManageChatTextCell.class }, new String[] { "imageView" }, null, null, null, Theme.key_windowBackgroundWhiteGrayIcon));
    themeDescriptions.add(new ThemeDescription(listView, ThemeDescription.FLAG_CHECKTAG, new Class[] { ManageChatTextCell.class }, new String[] { "imageView" }, null, null, null, Theme.key_windowBackgroundWhiteBlueButton));
    themeDescriptions.add(new ThemeDescription(listView, ThemeDescription.FLAG_CHECKTAG, new Class[] { ManageChatTextCell.class }, new String[] { "textView" }, null, null, null, Theme.key_windowBackgroundWhiteBlueIcon));
    return themeDescriptions;
}
Also used : ManageChatUserCell(org.telegram.ui.Cells.ManageChatUserCell) ManageChatTextCell(org.telegram.ui.Cells.ManageChatTextCell) ArrayList(java.util.ArrayList) TextInfoPrivacyCell(org.telegram.ui.Cells.TextInfoPrivacyCell) ThemeDescription(org.telegram.ui.ActionBar.ThemeDescription) View(android.view.View) RecyclerView(androidx.recyclerview.widget.RecyclerView) EmptyTextProgressView(org.telegram.ui.Components.EmptyTextProgressView) BackupImageView(org.telegram.ui.Components.BackupImageView) TextView(android.widget.TextView) RecyclerListView(org.telegram.ui.Components.RecyclerListView)

Aggregations

ManageChatUserCell (org.telegram.ui.Cells.ManageChatUserCell)7 View (android.view.View)6 RecyclerView (androidx.recyclerview.widget.RecyclerView)6 ArrayList (java.util.ArrayList)6 ThemeDescription (org.telegram.ui.ActionBar.ThemeDescription)6 ManageChatTextCell (org.telegram.ui.Cells.ManageChatTextCell)6 RecyclerListView (org.telegram.ui.Components.RecyclerListView)6 TextView (android.widget.TextView)5 HeaderCell (org.telegram.ui.Cells.HeaderCell)5 ShadowSectionCell (org.telegram.ui.Cells.ShadowSectionCell)5 ImageView (android.widget.ImageView)4 RadialProgressView (org.telegram.ui.Components.RadialProgressView)3 UndoView (org.telegram.ui.Components.UndoView)3 TextInfoPrivacyCell (org.telegram.ui.Cells.TextInfoPrivacyCell)2 BackupImageView (org.telegram.ui.Components.BackupImageView)2 EmptyTextProgressView (org.telegram.ui.Components.EmptyTextProgressView)2 Animator (android.animation.Animator)1 AnimatorListenerAdapter (android.animation.AnimatorListenerAdapter)1 AnimatorSet (android.animation.AnimatorSet)1 ObjectAnimator (android.animation.ObjectAnimator)1