Search in sources :

Example 91 with ThemeDescription

use of org.telegram.ui.ActionBar.ThemeDescription in project Telegram-FOSS by Telegram-FOSS-Team.

the class PhotoPickerActivity method getThemeDescriptions.

@Override
public ArrayList<ThemeDescription> getThemeDescriptions() {
    ArrayList<ThemeDescription> themeDescriptions = new ArrayList<>();
    themeDescriptions.add(new ThemeDescription(sizeNotifierFrameLayout, ThemeDescription.FLAG_BACKGROUND, null, null, null, null, dialogBackgroundKey));
    themeDescriptions.add(new ThemeDescription(actionBar, ThemeDescription.FLAG_BACKGROUND, null, null, null, null, dialogBackgroundKey));
    themeDescriptions.add(new ThemeDescription(actionBar, ThemeDescription.FLAG_AB_ITEMSCOLOR, null, null, null, null, textKey));
    themeDescriptions.add(new ThemeDescription(actionBar, ThemeDescription.FLAG_AB_TITLECOLOR, null, null, null, null, textKey));
    themeDescriptions.add(new ThemeDescription(actionBar, ThemeDescription.FLAG_AB_SELECTORCOLOR, null, null, null, null, selectorKey));
    themeDescriptions.add(new ThemeDescription(actionBar, ThemeDescription.FLAG_AB_SEARCH, null, null, null, null, textKey));
    themeDescriptions.add(new ThemeDescription(actionBar, ThemeDescription.FLAG_AB_SEARCHPLACEHOLDER, null, null, null, null, Theme.key_chat_messagePanelHint));
    themeDescriptions.add(new ThemeDescription(searchItem != null ? searchItem.getSearchField() : null, ThemeDescription.FLAG_CURSORCOLOR, null, null, null, null, textKey));
    themeDescriptions.add(new ThemeDescription(listView, ThemeDescription.FLAG_LISTGLOWCOLOR, null, null, null, null, dialogBackgroundKey));
    themeDescriptions.add(new ThemeDescription(listView, 0, new Class[] { View.class }, null, new Drawable[] { Theme.chat_attachEmptyDrawable }, null, Theme.key_chat_attachEmptyImage));
    themeDescriptions.add(new ThemeDescription(listView, 0, new Class[] { View.class }, null, null, null, Theme.key_chat_attachPhotoBackground));
    return themeDescriptions;
}
Also used : ArrayList(java.util.ArrayList) Drawable(android.graphics.drawable.Drawable) CombinedDrawable(org.telegram.ui.Components.CombinedDrawable) ThemeDescription(org.telegram.ui.ActionBar.ThemeDescription) ImageView(android.widget.ImageView) RadialProgressView(org.telegram.ui.Components.RadialProgressView) View(android.view.View) RecyclerView(androidx.recyclerview.widget.RecyclerView) EmptyTextProgressView(org.telegram.ui.Components.EmptyTextProgressView) TextView(android.widget.TextView) SimpleTextView(org.telegram.ui.ActionBar.SimpleTextView) BackupImageView(org.telegram.ui.Components.BackupImageView) RecyclerListView(org.telegram.ui.Components.RecyclerListView)

Example 92 with ThemeDescription

use of org.telegram.ui.ActionBar.ThemeDescription in project Telegram-FOSS by Telegram-FOSS-Team.

the class ChatAttachAlertDocumentLayout method getThemeDescriptions.

@Override
ArrayList<ThemeDescription> getThemeDescriptions() {
    ArrayList<ThemeDescription> themeDescriptions = new ArrayList<>();
    themeDescriptions.add(new ThemeDescription(searchItem.getSearchField(), ThemeDescription.FLAG_CURSORCOLOR, null, null, null, null, Theme.key_dialogTextBlack));
    themeDescriptions.add(new ThemeDescription(listView, ThemeDescription.FLAG_LISTGLOWCOLOR, null, null, null, null, Theme.key_dialogScrollGlow));
    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 | ThemeDescription.FLAG_CELLBACKGROUNDCOLOR, new Class[] { ShadowSectionCell.class }, null, null, null, Theme.key_windowBackgroundGray));
    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_TEXTCOLOR, new Class[] { SharedDocumentCell.class }, new String[] { "nameTextView" }, null, null, null, Theme.key_windowBackgroundWhiteBlackText));
    themeDescriptions.add(new ThemeDescription(listView, ThemeDescription.FLAG_TEXTCOLOR, new Class[] { SharedDocumentCell.class }, new String[] { "dateTextView" }, null, null, null, Theme.key_windowBackgroundWhiteGrayText3));
    themeDescriptions.add(new ThemeDescription(listView, ThemeDescription.FLAG_CHECKBOX, new Class[] { SharedDocumentCell.class }, new String[] { "checkBox" }, null, null, null, Theme.key_checkbox));
    themeDescriptions.add(new ThemeDescription(listView, ThemeDescription.FLAG_CHECKBOXCHECK, new Class[] { SharedDocumentCell.class }, new String[] { "checkBox" }, null, null, null, Theme.key_checkboxCheck));
    themeDescriptions.add(new ThemeDescription(listView, ThemeDescription.FLAG_IMAGECOLOR, new Class[] { SharedDocumentCell.class }, new String[] { "thumbImageView" }, null, null, null, Theme.key_files_folderIcon));
    themeDescriptions.add(new ThemeDescription(listView, ThemeDescription.FLAG_IMAGECOLOR | ThemeDescription.FLAG_BACKGROUNDFILTER, new Class[] { SharedDocumentCell.class }, new String[] { "thumbImageView" }, null, null, null, Theme.key_files_folderIconBackground));
    themeDescriptions.add(new ThemeDescription(listView, ThemeDescription.FLAG_TEXTCOLOR, new Class[] { SharedDocumentCell.class }, new String[] { "extTextView" }, null, null, null, Theme.key_files_iconText));
    return themeDescriptions;
}
Also used : ShadowSectionCell(org.telegram.ui.Cells.ShadowSectionCell) ArrayList(java.util.ArrayList) ThemeDescription(org.telegram.ui.ActionBar.ThemeDescription) FiltersView(org.telegram.ui.Adapters.FiltersView) View(android.view.View) RecyclerView(androidx.recyclerview.widget.RecyclerView) TextView(android.widget.TextView) FilteredSearchView(org.telegram.ui.FilteredSearchView) SharedDocumentCell(org.telegram.ui.Cells.SharedDocumentCell)

Example 93 with ThemeDescription

use of org.telegram.ui.ActionBar.ThemeDescription in project Telegram-FOSS by Telegram-FOSS-Team.

the class ChatAttachAlertLocationLayout method getThemeDescriptions.

@Override
public ArrayList<ThemeDescription> getThemeDescriptions() {
    ArrayList<ThemeDescription> themeDescriptions = new ArrayList<>();
    ThemeDescription.ThemeDescriptionDelegate cellDelegate = () -> {
        mapTypeButton.setIconColor(getThemedColor(Theme.key_location_actionIcon));
        mapTypeButton.redrawPopup(getThemedColor(Theme.key_actionBarDefaultSubmenuBackground));
        mapTypeButton.setPopupItemsColor(getThemedColor(Theme.key_actionBarDefaultSubmenuItemIcon), true);
        mapTypeButton.setPopupItemsColor(getThemedColor(Theme.key_actionBarDefaultSubmenuItem), false);
        if (mapView != null) {
            if (isActiveThemeDark()) {
                if (!currentMapStyleDark) {
                    currentMapStyleDark = true;
                // TODO dark
                }
            } else {
                if (currentMapStyleDark) {
                    currentMapStyleDark = false;
                // TODO dark
                }
            }
        }
    };
    themeDescriptions.add(new ThemeDescription(mapViewClip, ThemeDescription.FLAG_BACKGROUND, null, null, null, null, Theme.key_dialogBackground));
    themeDescriptions.add(new ThemeDescription(listView, ThemeDescription.FLAG_LISTGLOWCOLOR, null, null, null, null, Theme.key_dialogScrollGlow));
    themeDescriptions.add(new ThemeDescription(searchItem != null ? searchItem.getSearchField() : null, ThemeDescription.FLAG_CURSORCOLOR, null, null, null, null, Theme.key_dialogTextBlack));
    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(emptyImageView, ThemeDescription.FLAG_IMAGECOLOR, null, null, null, null, Theme.key_dialogEmptyImage));
    themeDescriptions.add(new ThemeDescription(emptyTitleTextView, ThemeDescription.FLAG_TEXTCOLOR, null, null, null, null, Theme.key_dialogEmptyText));
    themeDescriptions.add(new ThemeDescription(emptySubtitleTextView, ThemeDescription.FLAG_TEXTCOLOR, null, null, null, null, Theme.key_dialogEmptyText));
    themeDescriptions.add(new ThemeDescription(locationButton, ThemeDescription.FLAG_IMAGECOLOR | ThemeDescription.FLAG_CHECKTAG, null, null, null, null, Theme.key_location_actionIcon));
    themeDescriptions.add(new ThemeDescription(locationButton, ThemeDescription.FLAG_IMAGECOLOR | ThemeDescription.FLAG_CHECKTAG, null, null, null, null, Theme.key_location_actionActiveIcon));
    themeDescriptions.add(new ThemeDescription(locationButton, ThemeDescription.FLAG_BACKGROUNDFILTER, null, null, null, null, Theme.key_location_actionBackground));
    themeDescriptions.add(new ThemeDescription(locationButton, ThemeDescription.FLAG_BACKGROUNDFILTER | ThemeDescription.FLAG_DRAWABLESELECTEDSTATE, null, null, null, null, Theme.key_location_actionPressedBackground));
    themeDescriptions.add(new ThemeDescription(mapTypeButton, 0, null, null, null, cellDelegate, Theme.key_location_actionIcon));
    themeDescriptions.add(new ThemeDescription(mapTypeButton, ThemeDescription.FLAG_BACKGROUNDFILTER, null, null, null, null, Theme.key_location_actionBackground));
    themeDescriptions.add(new ThemeDescription(mapTypeButton, ThemeDescription.FLAG_BACKGROUNDFILTER | ThemeDescription.FLAG_DRAWABLESELECTEDSTATE, null, null, null, null, Theme.key_location_actionPressedBackground));
    themeDescriptions.add(new ThemeDescription(searchAreaButton, ThemeDescription.FLAG_TEXTCOLOR, null, null, null, null, Theme.key_location_actionActiveIcon));
    themeDescriptions.add(new ThemeDescription(searchAreaButton, ThemeDescription.FLAG_BACKGROUNDFILTER, null, null, null, null, Theme.key_location_actionBackground));
    themeDescriptions.add(new ThemeDescription(searchAreaButton, ThemeDescription.FLAG_BACKGROUNDFILTER | ThemeDescription.FLAG_DRAWABLESELECTEDSTATE, null, null, null, null, Theme.key_location_actionPressedBackground));
    themeDescriptions.add(new ThemeDescription(null, 0, null, null, Theme.avatarDrawables, cellDelegate, 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, null, null, null, null, Theme.key_location_liveLocationProgress));
    themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_location_placeLocationBackground));
    themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_dialog_liveLocationProgress));
    themeDescriptions.add(new ThemeDescription(listView, ThemeDescription.FLAG_USEBACKGROUNDDRAWABLE | ThemeDescription.FLAG_CHECKTAG, new Class[] { SendLocationCell.class }, new String[] { "imageView" }, null, null, null, Theme.key_location_sendLocationIcon));
    themeDescriptions.add(new ThemeDescription(listView, ThemeDescription.FLAG_USEBACKGROUNDDRAWABLE | ThemeDescription.FLAG_CHECKTAG, new Class[] { SendLocationCell.class }, new String[] { "imageView" }, null, null, null, Theme.key_location_sendLiveLocationIcon));
    themeDescriptions.add(new ThemeDescription(listView, ThemeDescription.FLAG_BACKGROUNDFILTER | ThemeDescription.FLAG_USEBACKGROUNDDRAWABLE | ThemeDescription.FLAG_CHECKTAG, new Class[] { SendLocationCell.class }, new String[] { "imageView" }, null, null, null, Theme.key_location_sendLocationBackground));
    themeDescriptions.add(new ThemeDescription(listView, ThemeDescription.FLAG_BACKGROUNDFILTER | ThemeDescription.FLAG_USEBACKGROUNDDRAWABLE | ThemeDescription.FLAG_CHECKTAG, new Class[] { SendLocationCell.class }, new String[] { "imageView" }, null, null, null, Theme.key_location_sendLiveLocationBackground));
    themeDescriptions.add(new ThemeDescription(listView, 0, new Class[] { SendLocationCell.class }, new String[] { "accurateTextView" }, null, null, null, Theme.key_windowBackgroundWhiteGrayText3));
    themeDescriptions.add(new ThemeDescription(listView, ThemeDescription.FLAG_CHECKTAG, new Class[] { SendLocationCell.class }, new String[] { "titleTextView" }, null, null, null, Theme.key_location_sendLiveLocationText));
    themeDescriptions.add(new ThemeDescription(listView, ThemeDescription.FLAG_CHECKTAG, new Class[] { SendLocationCell.class }, new String[] { "titleTextView" }, null, null, null, Theme.key_location_sendLocationText));
    themeDescriptions.add(new ThemeDescription(listView, 0, new Class[] { LocationDirectionCell.class }, new String[] { "buttonTextView" }, null, null, null, Theme.key_featuredStickers_buttonText));
    themeDescriptions.add(new ThemeDescription(listView, ThemeDescription.FLAG_USEBACKGROUNDDRAWABLE, new Class[] { LocationDirectionCell.class }, new String[] { "frameLayout" }, null, null, null, Theme.key_featuredStickers_addButton));
    themeDescriptions.add(new ThemeDescription(listView, ThemeDescription.FLAG_USEBACKGROUNDDRAWABLE | ThemeDescription.FLAG_DRAWABLESELECTEDSTATE, new Class[] { LocationDirectionCell.class }, new String[] { "frameLayout" }, null, null, null, Theme.key_featuredStickers_addButtonPressed));
    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 | ThemeDescription.FLAG_CELLBACKGROUNDCOLOR, new Class[] { ShadowSectionCell.class }, null, null, null, Theme.key_windowBackgroundGray));
    themeDescriptions.add(new ThemeDescription(listView, 0, new Class[] { HeaderCell.class }, new String[] { "textView" }, null, null, null, Theme.key_dialogTextBlue2));
    themeDescriptions.add(new ThemeDescription(listView, ThemeDescription.FLAG_BACKGROUNDFILTER, new Class[] { LocationCell.class }, new String[] { "imageView" }, null, null, null, Theme.key_windowBackgroundWhiteGrayText3));
    themeDescriptions.add(new ThemeDescription(listView, 0, new Class[] { LocationCell.class }, new String[] { "nameTextView" }, null, null, null, Theme.key_windowBackgroundWhiteBlackText));
    themeDescriptions.add(new ThemeDescription(listView, 0, new Class[] { LocationCell.class }, new String[] { "addressTextView" }, null, null, null, Theme.key_windowBackgroundWhiteGrayText3));
    themeDescriptions.add(new ThemeDescription(searchListView, ThemeDescription.FLAG_BACKGROUNDFILTER, new Class[] { LocationCell.class }, new String[] { "imageView" }, null, null, null, Theme.key_windowBackgroundWhiteGrayText3));
    themeDescriptions.add(new ThemeDescription(searchListView, 0, new Class[] { LocationCell.class }, new String[] { "nameTextView" }, null, null, null, Theme.key_windowBackgroundWhiteBlackText));
    themeDescriptions.add(new ThemeDescription(searchListView, 0, new Class[] { LocationCell.class }, new String[] { "addressTextView" }, null, null, null, Theme.key_windowBackgroundWhiteGrayText3));
    themeDescriptions.add(new ThemeDescription(listView, 0, new Class[] { SharingLiveLocationCell.class }, new String[] { "nameTextView" }, null, null, null, Theme.key_windowBackgroundWhiteBlackText));
    themeDescriptions.add(new ThemeDescription(listView, 0, new Class[] { SharingLiveLocationCell.class }, new String[] { "distanceTextView" }, null, null, null, Theme.key_windowBackgroundWhiteGrayText3));
    themeDescriptions.add(new ThemeDescription(listView, 0, new Class[] { LocationLoadingCell.class }, new String[] { "progressBar" }, null, null, null, Theme.key_progressCircle));
    themeDescriptions.add(new ThemeDescription(listView, 0, new Class[] { LocationLoadingCell.class }, new String[] { "textView" }, null, null, null, Theme.key_windowBackgroundWhiteGrayText3));
    themeDescriptions.add(new ThemeDescription(listView, 0, new Class[] { LocationLoadingCell.class }, new String[] { "imageView" }, null, null, null, Theme.key_windowBackgroundWhiteGrayText3));
    themeDescriptions.add(new ThemeDescription(listView, 0, new Class[] { LocationPoweredCell.class }, new String[] { "textView" }, null, null, null, Theme.key_windowBackgroundWhiteGrayText3));
    themeDescriptions.add(new ThemeDescription(listView, ThemeDescription.FLAG_IMAGECOLOR, new Class[] { LocationPoweredCell.class }, new String[] { "imageView" }, null, null, null, Theme.key_dialogEmptyImage));
    themeDescriptions.add(new ThemeDescription(listView, 0, new Class[] { LocationPoweredCell.class }, new String[] { "textView2" }, null, null, null, Theme.key_dialogEmptyText));
    return themeDescriptions;
}
Also used : ShadowSectionCell(org.telegram.ui.Cells.ShadowSectionCell) SharingLiveLocationCell(org.telegram.ui.Cells.SharingLiveLocationCell) HeaderCell(org.telegram.ui.Cells.HeaderCell) ArrayList(java.util.ArrayList) ThemeDescription(org.telegram.ui.ActionBar.ThemeDescription) ImageView(android.widget.ImageView) View(android.view.View) RecyclerView(androidx.recyclerview.widget.RecyclerView) TextView(android.widget.TextView) MapView(org.osmdroid.views.MapView) LocationLoadingCell(org.telegram.ui.Cells.LocationLoadingCell) LocationDirectionCell(org.telegram.ui.Cells.LocationDirectionCell) LocationPoweredCell(org.telegram.ui.Cells.LocationPoweredCell) SendLocationCell(org.telegram.ui.Cells.SendLocationCell) SharingLiveLocationCell(org.telegram.ui.Cells.SharingLiveLocationCell) LocationCell(org.telegram.ui.Cells.LocationCell) SendLocationCell(org.telegram.ui.Cells.SendLocationCell)

Example 94 with ThemeDescription

use of org.telegram.ui.ActionBar.ThemeDescription in project Telegram-FOSS by Telegram-FOSS-Team.

the class ChatAttachAlertPollLayout method getThemeDescriptions.

@Override
public ArrayList<ThemeDescription> getThemeDescriptions() {
    ArrayList<ThemeDescription> themeDescriptions = new ArrayList<>();
    themeDescriptions.add(new ThemeDescription(listView, ThemeDescription.FLAG_LISTGLOWCOLOR, null, null, null, null, Theme.key_dialogScrollGlow));
    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 | ThemeDescription.FLAG_CELLBACKGROUNDCOLOR, new Class[] { ShadowSectionCell.class }, null, null, null, Theme.key_windowBackgroundGray));
    themeDescriptions.add(new ThemeDescription(listView, ThemeDescription.FLAG_CELLBACKGROUNDCOLOR, new Class[] { EmptyView.class }, null, null, null, Theme.key_windowBackgroundGray));
    themeDescriptions.add(new ThemeDescription(listView, ThemeDescription.FLAG_BACKGROUNDFILTER, new Class[] { TextInfoPrivacyCell.class }, null, null, null, Theme.key_windowBackgroundGrayShadow));
    themeDescriptions.add(new ThemeDescription(listView, ThemeDescription.FLAG_BACKGROUNDFILTER | ThemeDescription.FLAG_CELLBACKGROUNDCOLOR, new Class[] { TextInfoPrivacyCell.class }, null, null, null, Theme.key_windowBackgroundGray));
    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[] { 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, ThemeDescription.FLAG_HINTTEXTCOLOR, new Class[] { PollEditTextCell.class }, new String[] { "deleteImageView" }, null, null, null, Theme.key_windowBackgroundWhiteGrayIcon));
    themeDescriptions.add(new ThemeDescription(listView, ThemeDescription.FLAG_HINTTEXTCOLOR, new Class[] { PollEditTextCell.class }, new String[] { "moveImageView" }, null, null, null, Theme.key_windowBackgroundWhiteGrayIcon));
    themeDescriptions.add(new ThemeDescription(listView, ThemeDescription.FLAG_USEBACKGROUNDDRAWABLE | ThemeDescription.FLAG_DRAWABLESELECTEDSTATE, new Class[] { PollEditTextCell.class }, new String[] { "deleteImageView" }, null, null, null, Theme.key_stickers_menuSelector));
    themeDescriptions.add(new ThemeDescription(listView, ThemeDescription.FLAG_CHECKTAG, new Class[] { PollEditTextCell.class }, new String[] { "textView2" }, null, null, null, Theme.key_windowBackgroundWhiteRedText5));
    themeDescriptions.add(new ThemeDescription(listView, 0, new Class[] { PollEditTextCell.class }, new String[] { "checkBox" }, null, null, null, Theme.key_windowBackgroundWhiteGrayIcon));
    themeDescriptions.add(new ThemeDescription(listView, 0, new Class[] { PollEditTextCell.class }, new String[] { "checkBox" }, null, null, null, Theme.key_checkboxCheck));
    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, 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[] { TextCell.class }, new String[] { "textView" }, null, null, null, Theme.key_windowBackgroundWhiteBlueText4));
    themeDescriptions.add(new ThemeDescription(listView, ThemeDescription.FLAG_BACKGROUNDFILTER, new Class[] { TextCell.class }, new String[] { "imageView" }, null, null, null, Theme.key_switchTrackChecked));
    themeDescriptions.add(new ThemeDescription(listView, 0, new Class[] { TextCell.class }, new String[] { "imageView" }, null, null, null, Theme.key_checkboxCheck));
    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) TextInfoPrivacyCell(org.telegram.ui.Cells.TextInfoPrivacyCell) ThemeDescription(org.telegram.ui.ActionBar.ThemeDescription) View(android.view.View) RecyclerView(androidx.recyclerview.widget.RecyclerView) SimpleTextView(org.telegram.ui.ActionBar.SimpleTextView) TextCell(org.telegram.ui.Cells.TextCell) PollEditTextCell(org.telegram.ui.Cells.PollEditTextCell) PollEditTextCell(org.telegram.ui.Cells.PollEditTextCell)

Example 95 with ThemeDescription

use of org.telegram.ui.ActionBar.ThemeDescription in project Telegram-FOSS by Telegram-FOSS-Team.

the class ChatAttachAlertContactsLayout method getThemeDescriptions.

@Override
public ArrayList<ThemeDescription> getThemeDescriptions() {
    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);
                }
            }
        }
    };
    ArrayList<ThemeDescription> themeDescriptions = new ArrayList<>();
    themeDescriptions.add(new ThemeDescription(frameLayout, ThemeDescription.FLAG_BACKGROUND, null, null, null, null, Theme.key_dialogBackground));
    themeDescriptions.add(new ThemeDescription(shadow, ThemeDescription.FLAG_BACKGROUND, null, null, null, null, Theme.key_dialogShadowLine));
    themeDescriptions.add(new ThemeDescription(searchField.getSearchBackground(), ThemeDescription.FLAG_BACKGROUNDFILTER, null, null, null, null, Theme.key_dialogSearchBackground));
    themeDescriptions.add(new ThemeDescription(searchField, ThemeDescription.FLAG_IMAGECOLOR, new Class[] { SearchField.class }, new String[] { "searchIconImageView" }, null, null, null, Theme.key_dialogSearchIcon));
    themeDescriptions.add(new ThemeDescription(searchField, ThemeDescription.FLAG_IMAGECOLOR, new Class[] { SearchField.class }, new String[] { "clearSearchImageView" }, null, null, null, Theme.key_dialogSearchIcon));
    themeDescriptions.add(new ThemeDescription(searchField.getSearchEditText(), ThemeDescription.FLAG_TEXTCOLOR, null, null, null, null, Theme.key_dialogSearchText));
    themeDescriptions.add(new ThemeDescription(searchField.getSearchEditText(), ThemeDescription.FLAG_HINTTEXTCOLOR, null, null, null, null, Theme.key_dialogSearchHint));
    themeDescriptions.add(new ThemeDescription(searchField.getSearchEditText(), ThemeDescription.FLAG_CURSORCOLOR, null, null, null, null, Theme.key_featuredStickers_addedIcon));
    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_LISTGLOWCOLOR, null, null, null, null, Theme.key_dialogScrollGlow));
    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[] { UserCell.class }, new String[] { "nameTextView" }, null, null, null, Theme.key_dialogTextGray2));
    themeDescriptions.add(new ThemeDescription(listView, 0, new Class[] { UserCell.class }, new String[] { "statusTextView" }, null, null, cellDelegate, Theme.key_dialogTextGray2));
    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));
    return themeDescriptions;
}
Also used : ArrayList(java.util.ArrayList) ThemeDescription(org.telegram.ui.ActionBar.ThemeDescription) View(android.view.View) RecyclerView(androidx.recyclerview.widget.RecyclerView) SimpleTextView(org.telegram.ui.ActionBar.SimpleTextView)

Aggregations

ThemeDescription (org.telegram.ui.ActionBar.ThemeDescription)106 ArrayList (java.util.ArrayList)92 View (android.view.View)62 RecyclerView (androidx.recyclerview.widget.RecyclerView)57 TextView (android.widget.TextView)48 RecyclerListView (org.telegram.ui.Components.RecyclerListView)47 HeaderCell (org.telegram.ui.Cells.HeaderCell)38 TextInfoPrivacyCell (org.telegram.ui.Cells.TextInfoPrivacyCell)38 ShadowSectionCell (org.telegram.ui.Cells.ShadowSectionCell)36 ImageView (android.widget.ImageView)30 TextSettingsCell (org.telegram.ui.Cells.TextSettingsCell)28 Drawable (android.graphics.drawable.Drawable)25 Paint (android.graphics.Paint)18 TextCheckCell (org.telegram.ui.Cells.TextCheckCell)16 EmptyTextProgressView (org.telegram.ui.Components.EmptyTextProgressView)16 SuppressLint (android.annotation.SuppressLint)14 SimpleTextView (org.telegram.ui.ActionBar.SimpleTextView)13 TextCell (org.telegram.ui.Cells.TextCell)13 BackupImageView (org.telegram.ui.Components.BackupImageView)11 RadialProgressView (org.telegram.ui.Components.RadialProgressView)11