Search in sources :

Example 1 with UserCell2

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

the class ProfileNotificationsActivity 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 UserCell2) {
                    ((UserCell2) child).update(0);
                }
            }
        }
    };
    themeDescriptions.add(new ThemeDescription(listView, ThemeDescription.FLAG_CELLBACKGROUNDCOLOR, new Class[] { HeaderCell.class, TextSettingsCell.class, TextColorCell.class, RadioCell.class, UserCell2.class, TextCheckCell.class, TextCheckBoxCell.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, ThemeDescription.FLAG_BACKGROUNDFILTER, new Class[] { TextInfoPrivacyCell.class }, null, null, null, Theme.key_windowBackgroundGrayShadow));
    themeDescriptions.add(new ThemeDescription(listView, 0, new Class[] { HeaderCell.class }, new String[] { "textView" }, null, null, null, Theme.key_windowBackgroundWhiteBlueHeader));
    themeDescriptions.add(new ThemeDescription(listView, 0, new Class[] { TextSettingsCell.class }, new String[] { "textView" }, null, null, null, Theme.key_windowBackgroundWhiteBlackText));
    themeDescriptions.add(new ThemeDescription(listView, 0, new Class[] { TextSettingsCell.class }, new String[] { "valueTextView" }, null, null, null, Theme.key_windowBackgroundWhiteValueText));
    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[] { TextColorCell.class }, new String[] { "textView" }, null, null, null, Theme.key_windowBackgroundWhiteBlackText));
    themeDescriptions.add(new ThemeDescription(listView, 0, new Class[] { RadioCell.class }, new String[] { "textView" }, null, null, null, Theme.key_windowBackgroundWhiteBlackText));
    themeDescriptions.add(new ThemeDescription(listView, ThemeDescription.FLAG_CHECKBOX, new Class[] { RadioCell.class }, new String[] { "radioButton" }, null, null, null, Theme.key_radioBackground));
    themeDescriptions.add(new ThemeDescription(listView, ThemeDescription.FLAG_CHECKBOXCHECK, new Class[] { RadioCell.class }, new String[] { "radioButton" }, null, null, null, Theme.key_radioBackgroundChecked));
    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[] { TextCheckCell.class }, new String[] { "textView" }, null, null, null, Theme.key_windowBackgroundWhiteBlackText));
    themeDescriptions.add(new ThemeDescription(listView, 0, new Class[] { TextCheckCell.class }, new String[] { "valueTextView" }, null, null, null, Theme.key_windowBackgroundWhiteGrayText2));
    themeDescriptions.add(new ThemeDescription(listView, 0, new Class[] { TextCheckCell.class }, new String[] { "checkBox" }, null, null, null, Theme.key_switchTrack));
    themeDescriptions.add(new ThemeDescription(listView, 0, new Class[] { TextCheckCell.class }, new String[] { "checkBox" }, null, null, null, Theme.key_switchTrackChecked));
    themeDescriptions.add(new ThemeDescription(listView, 0, new Class[] { UserCell2.class }, new String[] { "nameTextView" }, null, null, null, Theme.key_windowBackgroundWhiteBlackText));
    themeDescriptions.add(new ThemeDescription(listView, 0, new Class[] { UserCell2.class }, new String[] { "statusColor" }, null, null, cellDelegate, Theme.key_windowBackgroundWhiteGrayText));
    themeDescriptions.add(new ThemeDescription(listView, 0, new Class[] { UserCell2.class }, new String[] { "statusOnlineColor" }, null, null, cellDelegate, Theme.key_windowBackgroundWhiteBlueText));
    themeDescriptions.add(new ThemeDescription(listView, 0, new Class[] { UserCell2.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[] { TextCheckBoxCell.class }, new String[] { "textView" }, null, null, null, Theme.key_windowBackgroundWhiteBlackText));
    themeDescriptions.add(new ThemeDescription(listView, 0, new Class[] { TextCheckBoxCell.class }, null, null, null, Theme.key_checkboxSquareUnchecked));
    themeDescriptions.add(new ThemeDescription(listView, 0, new Class[] { TextCheckBoxCell.class }, null, null, null, Theme.key_checkboxSquareDisabled));
    themeDescriptions.add(new ThemeDescription(listView, 0, new Class[] { TextCheckBoxCell.class }, null, null, null, Theme.key_checkboxSquareBackground));
    themeDescriptions.add(new ThemeDescription(listView, 0, new Class[] { TextCheckBoxCell.class }, null, null, null, Theme.key_checkboxSquareCheck));
    return themeDescriptions;
}
Also used : ShadowSectionCell(org.telegram.ui.Cells.ShadowSectionCell) TextCheckCell(org.telegram.ui.Cells.TextCheckCell) HeaderCell(org.telegram.ui.Cells.HeaderCell) ArrayList(java.util.ArrayList) RadioCell(org.telegram.ui.Cells.RadioCell) TextCheckBoxCell(org.telegram.ui.Cells.TextCheckBoxCell) TextInfoPrivacyCell(org.telegram.ui.Cells.TextInfoPrivacyCell) ThemeDescription(org.telegram.ui.ActionBar.ThemeDescription) View(android.view.View) RecyclerView(androidx.recyclerview.widget.RecyclerView) TextView(android.widget.TextView) RecyclerListView(org.telegram.ui.Components.RecyclerListView) TextSettingsCell(org.telegram.ui.Cells.TextSettingsCell) TextColorCell(org.telegram.ui.Cells.TextColorCell) UserCell2(org.telegram.ui.Cells.UserCell2)

Example 2 with UserCell2

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

the class ChatRightsEditActivity 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 UserCell2) {
                    ((UserCell2) child).update(0);
                }
            }
        }
    };
    themeDescriptions.add(new ThemeDescription(listView, ThemeDescription.FLAG_CELLBACKGROUNDCOLOR, new Class[] { UserCell2.class, TextSettingsCell.class, TextCheckCell2.class, HeaderCell.class, TextDetailCell.class, PollEditTextCell.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, 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_CHECKTAG, new Class[] { TextSettingsCell.class }, new String[] { "textView" }, null, null, null, Theme.key_windowBackgroundWhiteRedText5));
    themeDescriptions.add(new ThemeDescription(listView, ThemeDescription.FLAG_CHECKTAG, new Class[] { TextSettingsCell.class }, new String[] { "textView" }, null, null, null, Theme.key_windowBackgroundWhiteBlackText));
    themeDescriptions.add(new ThemeDescription(listView, 0, new Class[] { TextSettingsCell.class }, new String[] { "valueTextView" }, null, null, null, Theme.key_windowBackgroundWhiteValueText));
    themeDescriptions.add(new ThemeDescription(listView, 0, new Class[] { TextSettingsCell.class }, new String[] { "valueImageView" }, null, null, null, Theme.key_windowBackgroundWhiteGrayIcon));
    themeDescriptions.add(new ThemeDescription(listView, 0, new Class[] { TextDetailCell.class }, new String[] { "textView" }, null, null, null, Theme.key_windowBackgroundWhiteBlackText));
    themeDescriptions.add(new ThemeDescription(listView, 0, new Class[] { TextDetailCell.class }, new String[] { "valueTextView" }, null, null, null, Theme.key_windowBackgroundWhiteGrayText2));
    themeDescriptions.add(new ThemeDescription(listView, 0, new Class[] { TextCheckCell2.class }, new String[] { "textView" }, null, null, null, Theme.key_windowBackgroundWhiteBlackText));
    themeDescriptions.add(new ThemeDescription(listView, 0, new Class[] { TextCheckCell2.class }, new String[] { "valueTextView" }, null, null, null, Theme.key_windowBackgroundWhiteGrayText2));
    themeDescriptions.add(new ThemeDescription(listView, 0, new Class[] { TextCheckCell2.class }, new String[] { "checkBox" }, null, null, null, Theme.key_switch2Track));
    themeDescriptions.add(new ThemeDescription(listView, 0, new Class[] { TextCheckCell2.class }, new String[] { "checkBox" }, null, null, null, Theme.key_switch2TrackChecked));
    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[] { HeaderCell.class }, new String[] { "textView" }, null, null, null, Theme.key_windowBackgroundWhiteBlueHeader));
    themeDescriptions.add(new ThemeDescription(listView, ThemeDescription.FLAG_CHECKTAG, new Class[] { HeaderCell.class }, new String[] { "textView2" }, null, null, null, Theme.key_windowBackgroundWhiteRedText5));
    themeDescriptions.add(new ThemeDescription(listView, ThemeDescription.FLAG_CHECKTAG, new Class[] { HeaderCell.class }, new String[] { "textView2" }, null, null, null, Theme.key_windowBackgroundWhiteGrayText3));
    themeDescriptions.add(new ThemeDescription(listView, ThemeDescription.FLAG_TEXTCOLOR, new Class[] { PollEditTextCell.class }, new String[] { "textView" }, null, null, null, Theme.key_windowBackgroundWhiteBlackText));
    themeDescriptions.add(new ThemeDescription(listView, ThemeDescription.FLAG_HINTTEXTCOLOR, new Class[] { PollEditTextCell.class }, new String[] { "textView" }, null, null, null, Theme.key_windowBackgroundWhiteHintText));
    themeDescriptions.add(new ThemeDescription(listView, 0, new Class[] { UserCell2.class }, new String[] { "nameTextView" }, null, null, null, Theme.key_windowBackgroundWhiteBlackText));
    themeDescriptions.add(new ThemeDescription(listView, 0, new Class[] { UserCell2.class }, new String[] { "statusColor" }, null, null, cellDelegate, Theme.key_windowBackgroundWhiteGrayText));
    themeDescriptions.add(new ThemeDescription(listView, 0, new Class[] { UserCell2.class }, new String[] { "statusOnlineColor" }, null, null, cellDelegate, Theme.key_windowBackgroundWhiteBlueText));
    themeDescriptions.add(new ThemeDescription(listView, 0, new Class[] { UserCell2.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(null, 0, new Class[] { DialogRadioCell.class }, new String[] { "textView" }, null, null, null, Theme.key_dialogTextBlack));
    themeDescriptions.add(new ThemeDescription(null, 0, new Class[] { DialogRadioCell.class }, new String[] { "textView" }, null, null, null, Theme.key_dialogTextGray2));
    themeDescriptions.add(new ThemeDescription(null, ThemeDescription.FLAG_CHECKBOX, new Class[] { DialogRadioCell.class }, new String[] { "radioButton" }, null, null, null, Theme.key_dialogRadioBackground));
    themeDescriptions.add(new ThemeDescription(null, ThemeDescription.FLAG_CHECKBOXCHECK, new Class[] { DialogRadioCell.class }, new String[] { "radioButton" }, null, null, null, Theme.key_dialogRadioBackgroundChecked));
    return themeDescriptions;
}
Also used : TextDetailCell(org.telegram.ui.Cells.TextDetailCell) 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) TextCheckCell2(org.telegram.ui.Cells.TextCheckCell2) ImageView(android.widget.ImageView) View(android.view.View) RecyclerView(androidx.recyclerview.widget.RecyclerView) TextView(android.widget.TextView) SimpleTextView(org.telegram.ui.ActionBar.SimpleTextView) RecyclerListView(org.telegram.ui.Components.RecyclerListView) PollEditTextCell(org.telegram.ui.Cells.PollEditTextCell) TextSettingsCell(org.telegram.ui.Cells.TextSettingsCell) DialogRadioCell(org.telegram.ui.Cells.DialogRadioCell) UserCell2(org.telegram.ui.Cells.UserCell2)

Aggregations

View (android.view.View)2 TextView (android.widget.TextView)2 RecyclerView (androidx.recyclerview.widget.RecyclerView)2 ArrayList (java.util.ArrayList)2 ThemeDescription (org.telegram.ui.ActionBar.ThemeDescription)2 HeaderCell (org.telegram.ui.Cells.HeaderCell)2 ShadowSectionCell (org.telegram.ui.Cells.ShadowSectionCell)2 TextInfoPrivacyCell (org.telegram.ui.Cells.TextInfoPrivacyCell)2 TextSettingsCell (org.telegram.ui.Cells.TextSettingsCell)2 UserCell2 (org.telegram.ui.Cells.UserCell2)2 RecyclerListView (org.telegram.ui.Components.RecyclerListView)2 ImageView (android.widget.ImageView)1 SimpleTextView (org.telegram.ui.ActionBar.SimpleTextView)1 DialogRadioCell (org.telegram.ui.Cells.DialogRadioCell)1 PollEditTextCell (org.telegram.ui.Cells.PollEditTextCell)1 RadioCell (org.telegram.ui.Cells.RadioCell)1 TextCheckBoxCell (org.telegram.ui.Cells.TextCheckBoxCell)1 TextCheckCell (org.telegram.ui.Cells.TextCheckCell)1 TextCheckCell2 (org.telegram.ui.Cells.TextCheckCell2)1 TextColorCell (org.telegram.ui.Cells.TextColorCell)1