Search in sources :

Example 1 with DrawerProfileCell

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

the class DialogsActivity method getThemeDescriptions.

@Override
public ArrayList<ThemeDescription> getThemeDescriptions() {
    ThemeDescription.ThemeDescriptionDelegate cellDelegate = () -> {
        for (int b = 0; b < 3; b++) {
            RecyclerListView list;
            if (b == 2) {
                if (searchViewPager == null) {
                    continue;
                }
                list = searchViewPager.searchListView;
            } else if (viewPages != null) {
                list = b < viewPages.length ? viewPages[b].listView : null;
            } else {
                continue;
            }
            if (list == null) {
                continue;
            }
            int count = list.getChildCount();
            for (int a = 0; a < count; a++) {
                View child = list.getChildAt(a);
                if (child instanceof ProfileSearchCell) {
                    ((ProfileSearchCell) child).update(0);
                } else if (child instanceof DialogCell) {
                    ((DialogCell) child).update(0);
                } else if (child instanceof UserCell) {
                    ((UserCell) child).update(0);
                }
            }
        }
        if (searchViewPager != null && searchViewPager.dialogsSearchAdapter != null) {
            RecyclerListView recyclerListView = searchViewPager.dialogsSearchAdapter.getInnerListView();
            if (recyclerListView != null) {
                int count = recyclerListView.getChildCount();
                for (int a = 0; a < count; a++) {
                    View child = recyclerListView.getChildAt(a);
                    if (child instanceof HintDialogCell) {
                        ((HintDialogCell) child).update();
                    }
                }
            }
        }
        if (sideMenu != null) {
            View child = sideMenu.getChildAt(0);
            if (child instanceof DrawerProfileCell) {
                DrawerProfileCell profileCell = (DrawerProfileCell) child;
                profileCell.applyBackground(true);
                profileCell.updateColors();
            }
        }
        if (viewPages != null) {
            for (int a = 0; a < viewPages.length; a++) {
                if (viewPages[a].pullForegroundDrawable == null) {
                    continue;
                }
                viewPages[a].pullForegroundDrawable.updateColors();
            }
        }
        if (actionBar != null) {
            actionBar.setPopupBackgroundColor(Theme.getColor(Theme.key_actionBarDefaultSubmenuBackground), true);
            actionBar.setPopupItemsColor(Theme.getColor(Theme.key_actionBarDefaultSubmenuItem), false, true);
            actionBar.setPopupItemsColor(Theme.getColor(Theme.key_actionBarDefaultSubmenuItemIcon), true, true);
            actionBar.setPopupItemsSelectorColor(Theme.getColor(Theme.key_dialogButtonSelector), true);
        }
        if (scrimPopupWindowItems != null) {
            for (int a = 0; a < scrimPopupWindowItems.length; a++) {
                scrimPopupWindowItems[a].setColors(Theme.getColor(Theme.key_actionBarDefaultSubmenuItem), Theme.getColor(Theme.key_actionBarDefaultSubmenuItemIcon));
                scrimPopupWindowItems[a].setSelectorColor(Theme.getColor(Theme.key_dialogButtonSelector));
            }
        }
        if (scrimPopupWindow != null) {
            final View contentView = scrimPopupWindow.getContentView();
            contentView.setBackgroundColor(Theme.getColor(Theme.key_actionBarDefaultSubmenuBackground));
            contentView.invalidate();
        }
        if (doneItem != null) {
            doneItem.setIconColor(Theme.getColor(Theme.key_actionBarDefaultIcon));
        }
        if (commentView != null) {
            commentView.updateColors();
        }
        if (filtersView != null) {
            filtersView.updateColors();
        }
        if (searchViewPager != null) {
            searchViewPager.updateColors();
        }
        if (searchTabsView != null) {
            searchTabsView.updateColors();
        }
        if (searchItem != null) {
            EditTextBoldCursor editText = searchItem.getSearchField();
            if (whiteActionBar) {
                editText.setTextColor(Theme.getColor(Theme.key_windowBackgroundWhiteBlackText));
                editText.setHintTextColor(Theme.getColor(Theme.key_player_time));
                editText.setCursorColor(Theme.getColor(Theme.key_chat_messagePanelCursor));
            } else {
                editText.setCursorColor(Theme.getColor(Theme.key_actionBarDefaultSearch));
                editText.setHintTextColor(Theme.getColor(Theme.key_actionBarDefaultSearchPlaceholder));
                editText.setTextColor(Theme.getColor(Theme.key_actionBarDefaultSearch));
            }
            searchItem.updateColor();
        }
        setSearchAnimationProgress(searchAnimationProgress);
    };
    ArrayList<ThemeDescription> arrayList = new ArrayList<>();
    arrayList.add(new ThemeDescription(fragmentView, ThemeDescription.FLAG_BACKGROUND, null, null, null, null, Theme.key_windowBackgroundWhite));
    if (movingView != null) {
        arrayList.add(new ThemeDescription(movingView, ThemeDescription.FLAG_BACKGROUND, null, null, null, null, Theme.key_windowBackgroundWhite));
    }
    if (doneItem != null) {
        arrayList.add(new ThemeDescription(doneItem, ThemeDescription.FLAG_BACKGROUNDFILTER, null, null, null, null, Theme.key_actionBarDefaultSelector));
    }
    if (folderId == 0) {
        if (onlySelect) {
            arrayList.add(new ThemeDescription(actionBar, ThemeDescription.FLAG_BACKGROUND, null, null, null, null, Theme.key_actionBarDefault));
        }
        arrayList.add(new ThemeDescription(fragmentView, 0, null, actionBarDefaultPaint, null, null, Theme.key_actionBarDefault));
        if (searchViewPager != null) {
            arrayList.add(new ThemeDescription(searchViewPager.searchListView, ThemeDescription.FLAG_LISTGLOWCOLOR, null, null, null, null, Theme.key_actionBarDefault));
        }
        arrayList.add(new ThemeDescription(actionBar, ThemeDescription.FLAG_AB_ITEMSCOLOR, null, null, null, cellDelegate, Theme.key_actionBarDefaultIcon));
        arrayList.add(new ThemeDescription(actionBar, ThemeDescription.FLAG_AB_TITLECOLOR, null, null, new Drawable[] { Theme.dialogs_holidayDrawable }, null, Theme.key_actionBarDefaultTitle));
        arrayList.add(new ThemeDescription(actionBar, ThemeDescription.FLAG_AB_SELECTORCOLOR, null, null, null, null, Theme.key_actionBarDefaultSelector));
        arrayList.add(new ThemeDescription(actionBar, ThemeDescription.FLAG_AB_SEARCH, null, null, null, null, Theme.key_actionBarDefaultSearch));
        arrayList.add(new ThemeDescription(actionBar, ThemeDescription.FLAG_AB_SEARCHPLACEHOLDER, null, null, null, null, Theme.key_actionBarDefaultSearchPlaceholder));
    } else {
        arrayList.add(new ThemeDescription(fragmentView, 0, null, actionBarDefaultPaint, null, null, Theme.key_actionBarDefaultArchived));
        if (searchViewPager != null) {
            arrayList.add(new ThemeDescription(searchViewPager.searchListView, ThemeDescription.FLAG_LISTGLOWCOLOR, null, null, null, null, Theme.key_actionBarDefaultArchived));
        }
        arrayList.add(new ThemeDescription(actionBar, ThemeDescription.FLAG_AB_ITEMSCOLOR, null, null, null, null, Theme.key_actionBarDefaultArchivedIcon));
        arrayList.add(new ThemeDescription(actionBar, ThemeDescription.FLAG_AB_TITLECOLOR, null, null, new Drawable[] { Theme.dialogs_holidayDrawable }, null, Theme.key_actionBarDefaultArchivedTitle));
        arrayList.add(new ThemeDescription(actionBar, ThemeDescription.FLAG_AB_SELECTORCOLOR, null, null, null, null, Theme.key_actionBarDefaultArchivedSelector));
        arrayList.add(new ThemeDescription(actionBar, ThemeDescription.FLAG_AB_SEARCH, null, null, null, null, Theme.key_actionBarDefaultArchivedSearch));
        arrayList.add(new ThemeDescription(actionBar, ThemeDescription.FLAG_AB_SEARCHPLACEHOLDER, null, null, null, null, Theme.key_actionBarDefaultArchivedSearchPlaceholder));
    }
    arrayList.add(new ThemeDescription(actionBar, ThemeDescription.FLAG_AB_AM_ITEMSCOLOR, null, null, null, null, Theme.key_actionBarActionModeDefaultIcon));
    // arrayList.add(new ThemeDescription(actionBar, ThemeDescription.FLAG_AB_AM_BACKGROUND, null, null, null, null, Theme.key_actionBarActionModeDefault));
    arrayList.add(new ThemeDescription(actionBar, ThemeDescription.FLAG_AB_AM_TOPBACKGROUND, null, null, null, null, Theme.key_actionBarActionModeDefaultTop));
    arrayList.add(new ThemeDescription(actionBar, ThemeDescription.FLAG_AB_AM_SELECTORCOLOR, null, null, null, null, Theme.key_actionBarActionModeDefaultSelector));
    arrayList.add(new ThemeDescription(selectedDialogsCountTextView, ThemeDescription.FLAG_TEXTCOLOR, null, null, null, null, Theme.key_actionBarActionModeDefaultIcon));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, cellDelegate, Theme.key_actionBarDefaultSubmenuBackground));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, cellDelegate, Theme.key_actionBarDefaultSubmenuItem));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, cellDelegate, Theme.key_actionBarDefaultSubmenuItemIcon));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, cellDelegate, Theme.key_dialogButtonSelector));
    if (filterTabsView != null) {
        if (actionBar.isActionModeShowed()) {
            arrayList.add(new ThemeDescription(filterTabsView, 0, new Class[] { FilterTabsView.class }, new String[] { "selectorDrawable" }, null, null, null, Theme.key_profile_tabSelectedLine));
            arrayList.add(new ThemeDescription(filterTabsView.getTabsContainer(), ThemeDescription.FLAG_TEXTCOLOR | ThemeDescription.FLAG_CHECKTAG, new Class[] { FilterTabsView.TabView.class }, null, null, null, Theme.key_profile_tabSelectedText));
            arrayList.add(new ThemeDescription(filterTabsView.getTabsContainer(), ThemeDescription.FLAG_TEXTCOLOR | ThemeDescription.FLAG_CHECKTAG, new Class[] { FilterTabsView.TabView.class }, null, null, null, Theme.key_profile_tabText));
            arrayList.add(new ThemeDescription(filterTabsView.getTabsContainer(), ThemeDescription.FLAG_BACKGROUNDFILTER | ThemeDescription.FLAG_DRAWABLESELECTEDSTATE, new Class[] { FilterTabsView.TabView.class }, null, null, null, Theme.key_profile_tabSelector));
        } else {
            arrayList.add(new ThemeDescription(filterTabsView, 0, new Class[] { FilterTabsView.class }, new String[] { "selectorDrawable" }, null, null, null, Theme.key_actionBarTabLine));
            arrayList.add(new ThemeDescription(filterTabsView.getTabsContainer(), ThemeDescription.FLAG_TEXTCOLOR | ThemeDescription.FLAG_CHECKTAG, new Class[] { FilterTabsView.TabView.class }, null, null, null, Theme.key_actionBarTabActiveText));
            arrayList.add(new ThemeDescription(filterTabsView.getTabsContainer(), ThemeDescription.FLAG_TEXTCOLOR | ThemeDescription.FLAG_CHECKTAG, new Class[] { FilterTabsView.TabView.class }, null, null, null, Theme.key_actionBarTabUnactiveText));
            arrayList.add(new ThemeDescription(filterTabsView.getTabsContainer(), ThemeDescription.FLAG_SELECTOR, null, null, null, null, Theme.key_actionBarTabSelector));
        }
        arrayList.add(new ThemeDescription(filterTabsView.getTabsContainer(), 0, new Class[] { FilterTabsView.TabView.class }, null, null, null, Theme.key_chats_tabUnreadActiveBackground));
        arrayList.add(new ThemeDescription(filterTabsView.getTabsContainer(), 0, new Class[] { FilterTabsView.TabView.class }, null, null, null, Theme.key_chats_tabUnreadUnactiveBackground));
    }
    arrayList.add(new ThemeDescription(floatingButton, ThemeDescription.FLAG_IMAGECOLOR, null, null, null, null, Theme.key_chats_actionIcon));
    arrayList.add(new ThemeDescription(floatingButton, ThemeDescription.FLAG_BACKGROUNDFILTER, null, null, null, null, Theme.key_chats_actionBackground));
    arrayList.add(new ThemeDescription(floatingButton, ThemeDescription.FLAG_BACKGROUNDFILTER | ThemeDescription.FLAG_DRAWABLESELECTEDSTATE, null, null, null, null, Theme.key_chats_actionPressedBackground));
    for (int a = 0; a < 3; a++) {
        RecyclerListView list;
        if (a == 2) {
            if (searchViewPager == null) {
                continue;
            }
            list = searchViewPager.searchListView;
        } else if (viewPages != null) {
            list = a < viewPages.length ? viewPages[a].listView : null;
        } else {
            continue;
        }
        if (list == null) {
            continue;
        }
        arrayList.add(new ThemeDescription(list, ThemeDescription.FLAG_SELECTOR, null, null, null, null, Theme.key_listSelector));
        arrayList.add(new ThemeDescription(list, 0, new Class[] { View.class }, Theme.dividerPaint, null, null, Theme.key_divider));
        arrayList.add(new ThemeDescription(list, 0, new Class[] { DialogCell.class, ProfileSearchCell.class }, null, Theme.avatarDrawables, null, Theme.key_avatar_text));
        arrayList.add(new ThemeDescription(list, 0, new Class[] { DialogCell.class }, Theme.dialogs_countPaint, null, null, Theme.key_chats_unreadCounter));
        arrayList.add(new ThemeDescription(list, 0, new Class[] { DialogCell.class }, Theme.dialogs_countGrayPaint, null, null, Theme.key_chats_unreadCounterMuted));
        arrayList.add(new ThemeDescription(list, 0, new Class[] { DialogCell.class }, Theme.dialogs_countTextPaint, null, null, Theme.key_chats_unreadCounterText));
        arrayList.add(new ThemeDescription(list, 0, new Class[] { DialogCell.class, ProfileSearchCell.class }, null, new Drawable[] { Theme.dialogs_lockDrawable }, null, Theme.key_chats_secretIcon));
        arrayList.add(new ThemeDescription(list, 0, new Class[] { DialogCell.class, ProfileSearchCell.class }, null, new Drawable[] { Theme.dialogs_groupDrawable, Theme.dialogs_broadcastDrawable, Theme.dialogs_botDrawable }, null, Theme.key_chats_nameIcon));
        arrayList.add(new ThemeDescription(list, 0, new Class[] { DialogCell.class, ProfileSearchCell.class }, null, new Drawable[] { Theme.dialogs_scamDrawable, Theme.dialogs_fakeDrawable }, null, Theme.key_chats_draft));
        arrayList.add(new ThemeDescription(list, 0, new Class[] { DialogCell.class }, null, new Drawable[] { Theme.dialogs_pinnedDrawable, Theme.dialogs_reorderDrawable }, null, Theme.key_chats_pinnedIcon));
        arrayList.add(new ThemeDescription(list, 0, new Class[] { DialogCell.class, ProfileSearchCell.class }, null, new Paint[] { Theme.dialogs_namePaint[0], Theme.dialogs_namePaint[1], Theme.dialogs_searchNamePaint }, null, null, Theme.key_chats_name));
        arrayList.add(new ThemeDescription(list, 0, new Class[] { DialogCell.class, ProfileSearchCell.class }, null, new Paint[] { Theme.dialogs_nameEncryptedPaint[0], Theme.dialogs_nameEncryptedPaint[1], Theme.dialogs_searchNameEncryptedPaint }, null, null, Theme.key_chats_secretName));
        arrayList.add(new ThemeDescription(list, 0, new Class[] { DialogCell.class }, Theme.dialogs_messagePaint[1], null, null, Theme.key_chats_message_threeLines));
        arrayList.add(new ThemeDescription(list, 0, new Class[] { DialogCell.class }, Theme.dialogs_messagePaint[0], null, null, Theme.key_chats_message));
        arrayList.add(new ThemeDescription(list, 0, new Class[] { DialogCell.class }, Theme.dialogs_messageNamePaint, null, null, Theme.key_chats_nameMessage_threeLines));
        arrayList.add(new ThemeDescription(list, 0, new Class[] { DialogCell.class }, null, null, null, Theme.key_chats_draft));
        arrayList.add(new ThemeDescription(list, 0, new Class[] { DialogCell.class }, null, Theme.dialogs_messagePrintingPaint, null, null, Theme.key_chats_actionMessage));
        arrayList.add(new ThemeDescription(list, 0, new Class[] { DialogCell.class }, Theme.dialogs_timePaint, null, null, Theme.key_chats_date));
        arrayList.add(new ThemeDescription(list, 0, new Class[] { DialogCell.class }, Theme.dialogs_pinnedPaint, null, null, Theme.key_chats_pinnedOverlay));
        arrayList.add(new ThemeDescription(list, 0, new Class[] { DialogCell.class }, Theme.dialogs_tabletSeletedPaint, null, null, Theme.key_chats_tabletSelectedOverlay));
        arrayList.add(new ThemeDescription(list, 0, new Class[] { DialogCell.class }, null, new Drawable[] { Theme.dialogs_checkDrawable }, null, Theme.key_chats_sentCheck));
        arrayList.add(new ThemeDescription(list, 0, new Class[] { DialogCell.class }, null, new Drawable[] { Theme.dialogs_checkReadDrawable, Theme.dialogs_halfCheckDrawable }, null, Theme.key_chats_sentReadCheck));
        arrayList.add(new ThemeDescription(list, 0, new Class[] { DialogCell.class }, null, new Drawable[] { Theme.dialogs_clockDrawable }, null, Theme.key_chats_sentClock));
        arrayList.add(new ThemeDescription(list, 0, new Class[] { DialogCell.class }, Theme.dialogs_errorPaint, null, null, Theme.key_chats_sentError));
        arrayList.add(new ThemeDescription(list, 0, new Class[] { DialogCell.class }, null, new Drawable[] { Theme.dialogs_errorDrawable }, null, Theme.key_chats_sentErrorIcon));
        arrayList.add(new ThemeDescription(list, 0, new Class[] { DialogCell.class, ProfileSearchCell.class }, null, new Drawable[] { Theme.dialogs_verifiedCheckDrawable }, null, Theme.key_chats_verifiedCheck));
        arrayList.add(new ThemeDescription(list, 0, new Class[] { DialogCell.class, ProfileSearchCell.class }, null, new Drawable[] { Theme.dialogs_verifiedDrawable }, null, Theme.key_chats_verifiedBackground));
        arrayList.add(new ThemeDescription(list, 0, new Class[] { DialogCell.class }, null, new Drawable[] { Theme.dialogs_muteDrawable }, null, Theme.key_chats_muteIcon));
        arrayList.add(new ThemeDescription(list, 0, new Class[] { DialogCell.class }, null, new Drawable[] { Theme.dialogs_mentionDrawable }, null, Theme.key_chats_mentionIcon));
        arrayList.add(new ThemeDescription(list, 0, new Class[] { DialogCell.class }, null, null, null, Theme.key_chats_archivePinBackground));
        arrayList.add(new ThemeDescription(list, 0, new Class[] { DialogCell.class }, null, null, null, Theme.key_chats_archiveBackground));
        arrayList.add(new ThemeDescription(list, 0, new Class[] { DialogCell.class }, null, null, null, Theme.key_chats_onlineCircle));
        arrayList.add(new ThemeDescription(list, 0, new Class[] { DialogCell.class }, null, null, null, Theme.key_windowBackgroundWhite));
        arrayList.add(new ThemeDescription(list, ThemeDescription.FLAG_CHECKBOX, new Class[] { DialogCell.class }, new String[] { "checkBox" }, null, null, null, Theme.key_windowBackgroundWhite));
        arrayList.add(new ThemeDescription(list, ThemeDescription.FLAG_CHECKBOXCHECK, new Class[] { DialogCell.class }, new String[] { "checkBox" }, null, null, null, Theme.key_checkboxCheck));
        arrayList.add(new ThemeDescription(list, 0, new Class[] { LoadingCell.class }, new String[] { "progressBar" }, null, null, null, Theme.key_progressCircle));
        arrayList.add(new ThemeDescription(list, 0, new Class[] { ProfileSearchCell.class }, Theme.dialogs_offlinePaint, null, null, Theme.key_windowBackgroundWhiteGrayText3));
        arrayList.add(new ThemeDescription(list, 0, new Class[] { ProfileSearchCell.class }, Theme.dialogs_onlinePaint, null, null, Theme.key_windowBackgroundWhiteBlueText3));
        GraySectionCell.createThemeDescriptions(arrayList, list);
        arrayList.add(new ThemeDescription(list, ThemeDescription.FLAG_TEXTCOLOR, new Class[] { HashtagSearchCell.class }, null, null, null, Theme.key_windowBackgroundWhiteBlackText));
        arrayList.add(new ThemeDescription(list, ThemeDescription.FLAG_BACKGROUNDFILTER, new Class[] { ShadowSectionCell.class }, null, null, null, Theme.key_windowBackgroundGrayShadow));
        arrayList.add(new ThemeDescription(list, ThemeDescription.FLAG_BACKGROUNDFILTER | ThemeDescription.FLAG_CELLBACKGROUNDCOLOR, new Class[] { ShadowSectionCell.class }, null, null, null, Theme.key_windowBackgroundGray));
        arrayList.add(new ThemeDescription(list, ThemeDescription.FLAG_BACKGROUNDFILTER, new Class[] { TextInfoPrivacyCell.class }, null, null, null, Theme.key_windowBackgroundGrayShadow));
        arrayList.add(new ThemeDescription(list, ThemeDescription.FLAG_BACKGROUNDFILTER | ThemeDescription.FLAG_CELLBACKGROUNDCOLOR, new Class[] { TextInfoPrivacyCell.class }, null, null, null, Theme.key_windowBackgroundGray));
        arrayList.add(new ThemeDescription(list, 0, new Class[] { TextInfoPrivacyCell.class }, new String[] { "textView" }, null, null, null, Theme.key_windowBackgroundWhiteGrayText4));
        arrayList.add(new ThemeDescription(list, ThemeDescription.FLAG_TEXTCOLOR, new Class[] { TextCell.class }, new String[] { "textView" }, null, null, null, Theme.key_windowBackgroundWhiteBlueText2));
    }
    arrayList.add(new ThemeDescription(null, 0, null, null, null, cellDelegate, Theme.key_avatar_backgroundRed));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, cellDelegate, Theme.key_avatar_backgroundOrange));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, cellDelegate, Theme.key_avatar_backgroundViolet));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, cellDelegate, Theme.key_avatar_backgroundGreen));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, cellDelegate, Theme.key_avatar_backgroundCyan));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, cellDelegate, Theme.key_avatar_backgroundBlue));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, cellDelegate, Theme.key_avatar_backgroundPink));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, cellDelegate, Theme.key_avatar_backgroundSaved));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, cellDelegate, Theme.key_avatar_backgroundArchived));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, cellDelegate, Theme.key_avatar_backgroundArchivedHidden));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, cellDelegate, Theme.key_chats_nameMessage));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, cellDelegate, Theme.key_chats_draft));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, cellDelegate, Theme.key_chats_attachMessage));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, cellDelegate, Theme.key_chats_nameArchived));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, cellDelegate, Theme.key_chats_nameMessageArchived));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, cellDelegate, Theme.key_chats_nameMessageArchived_threeLines));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, cellDelegate, Theme.key_chats_messageArchived));
    if (viewPages != null) {
        for (int a = 0; a < viewPages.length; a++) {
            if (folderId == 0) {
                arrayList.add(new ThemeDescription(viewPages[a].listView, ThemeDescription.FLAG_LISTGLOWCOLOR, null, null, null, null, Theme.key_actionBarDefault));
            } else {
                arrayList.add(new ThemeDescription(viewPages[a].listView, ThemeDescription.FLAG_LISTGLOWCOLOR, null, null, null, null, Theme.key_actionBarDefaultArchived));
            }
            arrayList.add(new ThemeDescription(viewPages[a].listView, ThemeDescription.FLAG_TEXTCOLOR, new Class[] { DialogsEmptyCell.class }, new String[] { "emptyTextView1" }, null, null, null, Theme.key_chats_nameMessage_threeLines));
            arrayList.add(new ThemeDescription(viewPages[a].listView, ThemeDescription.FLAG_TEXTCOLOR, new Class[] { DialogsEmptyCell.class }, new String[] { "emptyTextView2" }, null, null, null, Theme.key_chats_message));
            if (SharedConfig.archiveHidden) {
                arrayList.add(new ThemeDescription(viewPages[a].listView, 0, new Class[] { DialogCell.class }, new RLottieDrawable[] { Theme.dialogs_archiveAvatarDrawable }, "Arrow1", Theme.key_avatar_backgroundArchivedHidden));
                arrayList.add(new ThemeDescription(viewPages[a].listView, 0, new Class[] { DialogCell.class }, new RLottieDrawable[] { Theme.dialogs_archiveAvatarDrawable }, "Arrow2", Theme.key_avatar_backgroundArchivedHidden));
            } else {
                arrayList.add(new ThemeDescription(viewPages[a].listView, 0, new Class[] { DialogCell.class }, new RLottieDrawable[] { Theme.dialogs_archiveAvatarDrawable }, "Arrow1", Theme.key_avatar_backgroundArchived));
                arrayList.add(new ThemeDescription(viewPages[a].listView, 0, new Class[] { DialogCell.class }, new RLottieDrawable[] { Theme.dialogs_archiveAvatarDrawable }, "Arrow2", Theme.key_avatar_backgroundArchived));
            }
            arrayList.add(new ThemeDescription(viewPages[a].listView, 0, new Class[] { DialogCell.class }, new RLottieDrawable[] { Theme.dialogs_archiveAvatarDrawable }, "Box2", Theme.key_avatar_text));
            arrayList.add(new ThemeDescription(viewPages[a].listView, 0, new Class[] { DialogCell.class }, new RLottieDrawable[] { Theme.dialogs_archiveAvatarDrawable }, "Box1", Theme.key_avatar_text));
            arrayList.add(new ThemeDescription(viewPages[a].listView, 0, new Class[] { DialogCell.class }, new RLottieDrawable[] { Theme.dialogs_pinArchiveDrawable }, "Arrow", Theme.key_chats_archiveIcon));
            arrayList.add(new ThemeDescription(viewPages[a].listView, 0, new Class[] { DialogCell.class }, new RLottieDrawable[] { Theme.dialogs_pinArchiveDrawable }, "Line", Theme.key_chats_archiveIcon));
            arrayList.add(new ThemeDescription(viewPages[a].listView, 0, new Class[] { DialogCell.class }, new RLottieDrawable[] { Theme.dialogs_unpinArchiveDrawable }, "Arrow", Theme.key_chats_archiveIcon));
            arrayList.add(new ThemeDescription(viewPages[a].listView, 0, new Class[] { DialogCell.class }, new RLottieDrawable[] { Theme.dialogs_unpinArchiveDrawable }, "Line", Theme.key_chats_archiveIcon));
            arrayList.add(new ThemeDescription(viewPages[a].listView, 0, new Class[] { DialogCell.class }, new RLottieDrawable[] { Theme.dialogs_archiveDrawable }, "Arrow", Theme.key_chats_archiveBackground));
            arrayList.add(new ThemeDescription(viewPages[a].listView, 0, new Class[] { DialogCell.class }, new RLottieDrawable[] { Theme.dialogs_archiveDrawable }, "Box2", Theme.key_chats_archiveIcon));
            arrayList.add(new ThemeDescription(viewPages[a].listView, 0, new Class[] { DialogCell.class }, new RLottieDrawable[] { Theme.dialogs_archiveDrawable }, "Box1", Theme.key_chats_archiveIcon));
            arrayList.add(new ThemeDescription(viewPages[a].listView, 0, new Class[] { DialogCell.class }, new RLottieDrawable[] { Theme.dialogs_hidePsaDrawable }, "Line 1", Theme.key_chats_archiveBackground));
            arrayList.add(new ThemeDescription(viewPages[a].listView, 0, new Class[] { DialogCell.class }, new RLottieDrawable[] { Theme.dialogs_hidePsaDrawable }, "Line 2", Theme.key_chats_archiveBackground));
            arrayList.add(new ThemeDescription(viewPages[a].listView, 0, new Class[] { DialogCell.class }, new RLottieDrawable[] { Theme.dialogs_hidePsaDrawable }, "Line 3", Theme.key_chats_archiveBackground));
            arrayList.add(new ThemeDescription(viewPages[a].listView, 0, new Class[] { DialogCell.class }, new RLottieDrawable[] { Theme.dialogs_hidePsaDrawable }, "Cup Red", Theme.key_chats_archiveIcon));
            arrayList.add(new ThemeDescription(viewPages[a].listView, 0, new Class[] { DialogCell.class }, new RLottieDrawable[] { Theme.dialogs_hidePsaDrawable }, "Box", Theme.key_chats_archiveIcon));
            arrayList.add(new ThemeDescription(viewPages[a].listView, 0, new Class[] { DialogCell.class }, new RLottieDrawable[] { Theme.dialogs_unarchiveDrawable }, "Arrow1", Theme.key_chats_archiveIcon));
            arrayList.add(new ThemeDescription(viewPages[a].listView, 0, new Class[] { DialogCell.class }, new RLottieDrawable[] { Theme.dialogs_unarchiveDrawable }, "Arrow2", Theme.key_chats_archivePinBackground));
            arrayList.add(new ThemeDescription(viewPages[a].listView, 0, new Class[] { DialogCell.class }, new RLottieDrawable[] { Theme.dialogs_unarchiveDrawable }, "Box2", Theme.key_chats_archiveIcon));
            arrayList.add(new ThemeDescription(viewPages[a].listView, 0, new Class[] { DialogCell.class }, new RLottieDrawable[] { Theme.dialogs_unarchiveDrawable }, "Box1", Theme.key_chats_archiveIcon));
            arrayList.add(new ThemeDescription(viewPages[a].listView, 0, new Class[] { UserCell.class }, new String[] { "nameTextView" }, null, null, null, Theme.key_windowBackgroundWhiteBlackText));
            arrayList.add(new ThemeDescription(viewPages[a].listView, 0, new Class[] { UserCell.class }, new String[] { "statusColor" }, null, null, cellDelegate, Theme.key_windowBackgroundWhiteGrayText));
            arrayList.add(new ThemeDescription(viewPages[a].listView, 0, new Class[] { UserCell.class }, new String[] { "statusOnlineColor" }, null, null, cellDelegate, Theme.key_windowBackgroundWhiteBlueText));
            arrayList.add(new ThemeDescription(viewPages[a].listView, 0, new Class[] { TextCell.class }, new String[] { "textView" }, null, null, null, Theme.key_windowBackgroundWhiteBlueText4));
            arrayList.add(new ThemeDescription(viewPages[a].listView, 0, new Class[] { TextCell.class }, new String[] { "imageView" }, null, null, null, Theme.key_windowBackgroundWhiteBlueText4));
            arrayList.add(new ThemeDescription(viewPages[a].progressView, ThemeDescription.FLAG_PROGRESSBAR, null, null, null, null, Theme.key_progressCircle));
            ViewPager pager = viewPages[a].dialogsAdapter.getArchiveHintCellPager();
            arrayList.add(new ThemeDescription(pager, 0, new Class[] { ArchiveHintInnerCell.class }, new String[] { "imageView" }, null, null, null, Theme.key_chats_nameMessage_threeLines));
            arrayList.add(new ThemeDescription(pager, 0, new Class[] { ArchiveHintInnerCell.class }, new String[] { "imageView2" }, null, null, null, Theme.key_chats_unreadCounter));
            arrayList.add(new ThemeDescription(pager, 0, new Class[] { ArchiveHintInnerCell.class }, new String[] { "headerTextView" }, null, null, null, Theme.key_chats_nameMessage_threeLines));
            arrayList.add(new ThemeDescription(pager, 0, new Class[] { ArchiveHintInnerCell.class }, new String[] { "messageTextView" }, null, null, null, Theme.key_chats_message));
            arrayList.add(new ThemeDescription(pager, ThemeDescription.FLAG_LISTGLOWCOLOR, null, null, null, null, Theme.key_actionBarDefaultArchived));
        }
    }
    arrayList.add(new ThemeDescription(null, 0, null, null, null, cellDelegate, Theme.key_chats_archivePullDownBackground));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, cellDelegate, Theme.key_chats_archivePullDownBackgroundActive));
    arrayList.add(new ThemeDescription(sideMenu, ThemeDescription.FLAG_BACKGROUND, null, null, null, null, Theme.key_chats_menuBackground));
    arrayList.add(new ThemeDescription(sideMenu, 0, new Class[] { DrawerProfileCell.class }, null, null, null, Theme.key_chats_menuName));
    arrayList.add(new ThemeDescription(sideMenu, 0, new Class[] { DrawerProfileCell.class }, null, null, null, Theme.key_chats_menuPhone));
    arrayList.add(new ThemeDescription(sideMenu, 0, new Class[] { DrawerProfileCell.class }, null, null, null, Theme.key_chats_menuPhoneCats));
    arrayList.add(new ThemeDescription(sideMenu, 0, new Class[] { DrawerProfileCell.class }, null, null, null, Theme.key_chats_menuCloudBackgroundCats));
    arrayList.add(new ThemeDescription(sideMenu, 0, new Class[] { DrawerProfileCell.class }, null, null, null, Theme.key_chat_serviceBackground));
    arrayList.add(new ThemeDescription(sideMenu, 0, new Class[] { DrawerProfileCell.class }, null, null, null, Theme.key_chats_menuTopShadow));
    arrayList.add(new ThemeDescription(sideMenu, 0, new Class[] { DrawerProfileCell.class }, null, null, null, Theme.key_chats_menuTopShadowCats));
    arrayList.add(new ThemeDescription(sideMenu, ThemeDescription.FLAG_IMAGECOLOR, new Class[] { DrawerProfileCell.class }, new String[] { "darkThemeView" }, null, null, null, Theme.key_chats_menuName));
    arrayList.add(new ThemeDescription(sideMenu, ThemeDescription.FLAG_CELLBACKGROUNDCOLOR | ThemeDescription.FLAG_CHECKTAG, new Class[] { DrawerProfileCell.class }, null, null, cellDelegate, Theme.key_chats_menuTopBackgroundCats));
    arrayList.add(new ThemeDescription(sideMenu, ThemeDescription.FLAG_CELLBACKGROUNDCOLOR | ThemeDescription.FLAG_CHECKTAG, new Class[] { DrawerProfileCell.class }, null, null, cellDelegate, Theme.key_chats_menuTopBackground));
    arrayList.add(new ThemeDescription(sideMenu, ThemeDescription.FLAG_IMAGECOLOR, new Class[] { DrawerActionCell.class }, new String[] { "textView" }, null, null, null, Theme.key_chats_menuItemIcon));
    arrayList.add(new ThemeDescription(sideMenu, 0, new Class[] { DrawerActionCell.class }, new String[] { "textView" }, null, null, null, Theme.key_chats_menuItemText));
    arrayList.add(new ThemeDescription(sideMenu, 0, new Class[] { DrawerUserCell.class }, new String[] { "textView" }, null, null, null, Theme.key_chats_menuItemText));
    arrayList.add(new ThemeDescription(sideMenu, ThemeDescription.FLAG_TEXTCOLOR, new Class[] { DrawerUserCell.class }, new String[] { "checkBox" }, null, null, null, Theme.key_chats_unreadCounterText));
    arrayList.add(new ThemeDescription(sideMenu, ThemeDescription.FLAG_TEXTCOLOR, new Class[] { DrawerUserCell.class }, new String[] { "checkBox" }, null, null, null, Theme.key_chats_unreadCounter));
    arrayList.add(new ThemeDescription(sideMenu, ThemeDescription.FLAG_TEXTCOLOR, new Class[] { DrawerUserCell.class }, new String[] { "checkBox" }, null, null, null, Theme.key_chats_menuBackground));
    arrayList.add(new ThemeDescription(sideMenu, ThemeDescription.FLAG_IMAGECOLOR, new Class[] { DrawerAddCell.class }, new String[] { "textView" }, null, null, null, Theme.key_chats_menuItemIcon));
    arrayList.add(new ThemeDescription(sideMenu, 0, new Class[] { DrawerAddCell.class }, new String[] { "textView" }, null, null, null, Theme.key_chats_menuItemText));
    arrayList.add(new ThemeDescription(sideMenu, 0, new Class[] { DividerCell.class }, Theme.dividerPaint, null, null, Theme.key_divider));
    if (searchViewPager != null) {
        arrayList.add(new ThemeDescription(searchViewPager.dialogsSearchAdapter != null ? searchViewPager.dialogsSearchAdapter.getInnerListView() : null, 0, new Class[] { HintDialogCell.class }, Theme.dialogs_countPaint, null, null, Theme.key_chats_unreadCounter));
        arrayList.add(new ThemeDescription(searchViewPager.dialogsSearchAdapter != null ? searchViewPager.dialogsSearchAdapter.getInnerListView() : null, 0, new Class[] { HintDialogCell.class }, Theme.dialogs_countGrayPaint, null, null, Theme.key_chats_unreadCounterMuted));
        arrayList.add(new ThemeDescription(searchViewPager.dialogsSearchAdapter != null ? searchViewPager.dialogsSearchAdapter.getInnerListView() : null, 0, new Class[] { HintDialogCell.class }, Theme.dialogs_countTextPaint, null, null, Theme.key_chats_unreadCounterText));
        arrayList.add(new ThemeDescription(searchViewPager.dialogsSearchAdapter != null ? searchViewPager.dialogsSearchAdapter.getInnerListView() : null, 0, new Class[] { HintDialogCell.class }, Theme.dialogs_archiveTextPaint, null, null, Theme.key_chats_archiveText));
        arrayList.add(new ThemeDescription(searchViewPager.dialogsSearchAdapter != null ? searchViewPager.dialogsSearchAdapter.getInnerListView() : null, 0, new Class[] { HintDialogCell.class }, new String[] { "nameTextView" }, null, null, null, Theme.key_windowBackgroundWhiteBlackText));
        arrayList.add(new ThemeDescription(searchViewPager.dialogsSearchAdapter != null ? searchViewPager.dialogsSearchAdapter.getInnerListView() : null, 0, new Class[] { HintDialogCell.class }, null, null, null, Theme.key_chats_onlineCircle));
    }
    arrayList.add(new ThemeDescription(fragmentView, ThemeDescription.FLAG_BACKGROUND | ThemeDescription.FLAG_CHECKTAG, new Class[] { FragmentContextView.class }, new String[] { "frameLayout" }, null, null, null, Theme.key_inappPlayerBackground));
    arrayList.add(new ThemeDescription(fragmentView, ThemeDescription.FLAG_IMAGECOLOR, new Class[] { FragmentContextView.class }, new String[] { "playButton" }, null, null, null, Theme.key_inappPlayerPlayPause));
    arrayList.add(new ThemeDescription(fragmentView, ThemeDescription.FLAG_TEXTCOLOR | ThemeDescription.FLAG_CHECKTAG, new Class[] { FragmentContextView.class }, new String[] { "titleTextView" }, null, null, null, Theme.key_inappPlayerTitle));
    arrayList.add(new ThemeDescription(fragmentView, ThemeDescription.FLAG_TEXTCOLOR | ThemeDescription.FLAG_FASTSCROLL, new Class[] { FragmentContextView.class }, new String[] { "titleTextView" }, null, null, null, Theme.key_inappPlayerPerformer));
    arrayList.add(new ThemeDescription(fragmentView, ThemeDescription.FLAG_IMAGECOLOR, new Class[] { FragmentContextView.class }, new String[] { "closeButton" }, null, null, null, Theme.key_inappPlayerClose));
    arrayList.add(new ThemeDescription(fragmentView, ThemeDescription.FLAG_BACKGROUND | ThemeDescription.FLAG_CHECKTAG, new Class[] { FragmentContextView.class }, new String[] { "frameLayout" }, null, null, null, Theme.key_returnToCallBackground));
    arrayList.add(new ThemeDescription(fragmentView, ThemeDescription.FLAG_TEXTCOLOR | ThemeDescription.FLAG_CHECKTAG, new Class[] { FragmentContextView.class }, new String[] { "titleTextView" }, null, null, null, Theme.key_returnToCallText));
    for (int a = 0; a < undoView.length; a++) {
        arrayList.add(new ThemeDescription(undoView[a], ThemeDescription.FLAG_BACKGROUNDFILTER, null, null, null, null, Theme.key_undo_background));
        arrayList.add(new ThemeDescription(undoView[a], 0, new Class[] { UndoView.class }, new String[] { "undoImageView" }, null, null, null, Theme.key_undo_cancelColor));
        arrayList.add(new ThemeDescription(undoView[a], 0, new Class[] { UndoView.class }, new String[] { "undoTextView" }, null, null, null, Theme.key_undo_cancelColor));
        arrayList.add(new ThemeDescription(undoView[a], 0, new Class[] { UndoView.class }, new String[] { "infoTextView" }, null, null, null, Theme.key_undo_infoColor));
        arrayList.add(new ThemeDescription(undoView[a], 0, new Class[] { UndoView.class }, new String[] { "subinfoTextView" }, null, null, null, Theme.key_undo_infoColor));
        arrayList.add(new ThemeDescription(undoView[a], 0, new Class[] { UndoView.class }, new String[] { "textPaint" }, null, null, null, Theme.key_undo_infoColor));
        arrayList.add(new ThemeDescription(undoView[a], 0, new Class[] { UndoView.class }, new String[] { "progressPaint" }, null, null, null, Theme.key_undo_infoColor));
        arrayList.add(new ThemeDescription(undoView[a], 0, new Class[] { UndoView.class }, new String[] { "leftImageView" }, "info1", Theme.key_undo_background));
        arrayList.add(new ThemeDescription(undoView[a], 0, new Class[] { UndoView.class }, new String[] { "leftImageView" }, "info2", Theme.key_undo_background));
        arrayList.add(new ThemeDescription(undoView[a], 0, new Class[] { UndoView.class }, new String[] { "leftImageView" }, "luc12", Theme.key_undo_infoColor));
        arrayList.add(new ThemeDescription(undoView[a], 0, new Class[] { UndoView.class }, new String[] { "leftImageView" }, "luc11", Theme.key_undo_infoColor));
        arrayList.add(new ThemeDescription(undoView[a], 0, new Class[] { UndoView.class }, new String[] { "leftImageView" }, "luc10", Theme.key_undo_infoColor));
        arrayList.add(new ThemeDescription(undoView[a], 0, new Class[] { UndoView.class }, new String[] { "leftImageView" }, "luc9", Theme.key_undo_infoColor));
        arrayList.add(new ThemeDescription(undoView[a], 0, new Class[] { UndoView.class }, new String[] { "leftImageView" }, "luc8", Theme.key_undo_infoColor));
        arrayList.add(new ThemeDescription(undoView[a], 0, new Class[] { UndoView.class }, new String[] { "leftImageView" }, "luc7", Theme.key_undo_infoColor));
        arrayList.add(new ThemeDescription(undoView[a], 0, new Class[] { UndoView.class }, new String[] { "leftImageView" }, "luc6", Theme.key_undo_infoColor));
        arrayList.add(new ThemeDescription(undoView[a], 0, new Class[] { UndoView.class }, new String[] { "leftImageView" }, "luc5", Theme.key_undo_infoColor));
        arrayList.add(new ThemeDescription(undoView[a], 0, new Class[] { UndoView.class }, new String[] { "leftImageView" }, "luc4", Theme.key_undo_infoColor));
        arrayList.add(new ThemeDescription(undoView[a], 0, new Class[] { UndoView.class }, new String[] { "leftImageView" }, "luc3", Theme.key_undo_infoColor));
        arrayList.add(new ThemeDescription(undoView[a], 0, new Class[] { UndoView.class }, new String[] { "leftImageView" }, "luc2", Theme.key_undo_infoColor));
        arrayList.add(new ThemeDescription(undoView[a], 0, new Class[] { UndoView.class }, new String[] { "leftImageView" }, "luc1", Theme.key_undo_infoColor));
        arrayList.add(new ThemeDescription(undoView[a], 0, new Class[] { UndoView.class }, new String[] { "leftImageView" }, "Oval", Theme.key_undo_infoColor));
    }
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_dialogBackground));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_dialogBackgroundGray));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_dialogTextBlack));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_dialogTextLink));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_dialogLinkSelection));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_dialogTextBlue));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_dialogTextBlue2));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_dialogTextBlue3));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_dialogTextBlue4));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_dialogTextRed));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_dialogTextRed2));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_dialogTextGray));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_dialogTextGray2));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_dialogTextGray3));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_dialogTextGray4));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_dialogIcon));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_dialogRedIcon));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_dialogTextHint));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_dialogInputField));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_dialogInputFieldActivated));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_dialogCheckboxSquareBackground));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_dialogCheckboxSquareCheck));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_dialogCheckboxSquareUnchecked));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_dialogCheckboxSquareDisabled));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_dialogRadioBackground));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_dialogRadioBackgroundChecked));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_dialogProgressCircle));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_dialogButton));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_dialogButtonSelector));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_dialogScrollGlow));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_dialogRoundCheckBox));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_dialogRoundCheckBoxCheck));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_dialogBadgeBackground));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_dialogBadgeText));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_dialogLineProgress));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_dialogLineProgressBackground));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_dialogGrayLine));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_dialog_inlineProgressBackground));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_dialog_inlineProgress));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_dialogSearchBackground));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_dialogSearchHint));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_dialogSearchIcon));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_dialogSearchText));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_dialogFloatingButton));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_dialogFloatingIcon));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_dialogShadowLine));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_sheet_scrollUp));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_sheet_other));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_player_actionBar));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_player_actionBarSelector));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_player_actionBarTitle));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_player_actionBarTop));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_player_actionBarSubtitle));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_player_actionBarItems));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_player_background));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_player_time));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_player_progressBackground));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_player_progressCachedBackground));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_player_progress));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_player_button));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_player_buttonActive));
    if (commentView != null) {
        arrayList.add(new ThemeDescription(commentView, 0, null, Theme.chat_composeBackgroundPaint, null, null, Theme.key_chat_messagePanelBackground));
        arrayList.add(new ThemeDescription(commentView, 0, null, null, new Drawable[] { Theme.chat_composeShadowDrawable }, null, Theme.key_chat_messagePanelShadow));
        arrayList.add(new ThemeDescription(commentView, ThemeDescription.FLAG_TEXTCOLOR, new Class[] { ChatActivityEnterView.class }, new String[] { "messageEditText" }, null, null, null, Theme.key_chat_messagePanelText));
        arrayList.add(new ThemeDescription(commentView, ThemeDescription.FLAG_CURSORCOLOR, new Class[] { ChatActivityEnterView.class }, new String[] { "messageEditText" }, null, null, null, Theme.key_chat_messagePanelCursor));
        arrayList.add(new ThemeDescription(commentView, ThemeDescription.FLAG_HINTTEXTCOLOR, new Class[] { ChatActivityEnterView.class }, new String[] { "messageEditText" }, null, null, null, Theme.key_chat_messagePanelHint));
    // arrayList.add(new ThemeDescription(commentView, ThemeDescription.FLAG_IMAGECOLOR, new Class[]{ChatActivityEnterView.class}, new String[]{"sendButton"}, null, null, null, Theme.key_chat_messagePanelSend));
    }
    arrayList.add(new ThemeDescription(null, 0, null, null, null, cellDelegate, Theme.key_actionBarTipBackground));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, cellDelegate, Theme.key_windowBackgroundWhiteBlackText));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, cellDelegate, Theme.key_player_time));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, cellDelegate, Theme.key_chat_messagePanelCursor));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, cellDelegate, Theme.key_avatar_actionBarIconBlue));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, cellDelegate, Theme.key_groupcreate_spanBackground));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_voipgroup_overlayGreen1));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_voipgroup_overlayGreen2));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_voipgroup_overlayBlue1));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_voipgroup_overlayBlue2));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_voipgroup_topPanelGreen1));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_voipgroup_topPanelGreen2));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_voipgroup_topPanelBlue1));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_voipgroup_topPanelBlue2));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_voipgroup_topPanelGray));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_voipgroup_overlayAlertGradientMuted));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_voipgroup_overlayAlertGradientMuted2));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_voipgroup_overlayAlertGradientUnmuted));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_voipgroup_overlayAlertGradientUnmuted2));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_voipgroup_mutedByAdminGradient));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_voipgroup_mutedByAdminGradient2));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_voipgroup_mutedByAdminGradient3));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_voipgroup_overlayAlertMutedByAdmin));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_voipgroup_overlayAlertMutedByAdmin2));
    if (filtersView != null) {
        arrayList.addAll(filtersView.getThemeDescriptions());
        filtersView.updateColors();
    }
    if (searchViewPager != null) {
        searchViewPager.getThemeDescriptors(arrayList);
    }
    return arrayList;
}
Also used : HintDialogCell(org.telegram.ui.Cells.HintDialogCell) FilterTabsView(org.telegram.ui.Components.FilterTabsView) ArrayList(java.util.ArrayList) RLottieDrawable(org.telegram.ui.Components.RLottieDrawable) RecyclerListView(org.telegram.ui.Components.RecyclerListView) DrawerProfileCell(org.telegram.ui.Cells.DrawerProfileCell) TextCell(org.telegram.ui.Cells.TextCell) DividerCell(org.telegram.ui.Cells.DividerCell) DialogCell(org.telegram.ui.Cells.DialogCell) HintDialogCell(org.telegram.ui.Cells.HintDialogCell) LoadingCell(org.telegram.ui.Cells.LoadingCell) UndoView(org.telegram.ui.Components.UndoView) DrawerActionCell(org.telegram.ui.Cells.DrawerActionCell) DialogsEmptyCell(org.telegram.ui.Cells.DialogsEmptyCell) UserCell(org.telegram.ui.Cells.UserCell) DrawerUserCell(org.telegram.ui.Cells.DrawerUserCell) EditTextBoldCursor(org.telegram.ui.Components.EditTextBoldCursor) ArchiveHintInnerCell(org.telegram.ui.Cells.ArchiveHintInnerCell) ShadowSectionCell(org.telegram.ui.Cells.ShadowSectionCell) DrawerAddCell(org.telegram.ui.Cells.DrawerAddCell) Drawable(android.graphics.drawable.Drawable) AvatarDrawable(org.telegram.ui.Components.AvatarDrawable) MediaActionDrawable(org.telegram.ui.Components.MediaActionDrawable) PullForegroundDrawable(org.telegram.ui.Components.PullForegroundDrawable) CombinedDrawable(org.telegram.ui.Components.CombinedDrawable) MenuDrawable(org.telegram.ui.ActionBar.MenuDrawable) BitmapDrawable(android.graphics.drawable.BitmapDrawable) BackDrawable(org.telegram.ui.ActionBar.BackDrawable) ProxyDrawable(org.telegram.ui.Components.ProxyDrawable) RLottieDrawable(org.telegram.ui.Components.RLottieDrawable) TextInfoPrivacyCell(org.telegram.ui.Cells.TextInfoPrivacyCell) TextPaint(android.text.TextPaint) Paint(android.graphics.Paint) ThemeDescription(org.telegram.ui.ActionBar.ThemeDescription) ImageView(android.widget.ImageView) FilterTabsView(org.telegram.ui.Components.FilterTabsView) UndoView(org.telegram.ui.Components.UndoView) SwipeGestureSettingsView(org.telegram.ui.Components.SwipeGestureSettingsView) FragmentContextView(org.telegram.ui.Components.FragmentContextView) ScrollView(android.widget.ScrollView) FiltersView(org.telegram.ui.Adapters.FiltersView) View(android.view.View) RecyclerView(androidx.recyclerview.widget.RecyclerView) RLottieImageView(org.telegram.ui.Components.RLottieImageView) TextView(android.widget.TextView) ChatActivityEnterView(org.telegram.ui.Components.ChatActivityEnterView) BackupImageView(org.telegram.ui.Components.BackupImageView) FlickerLoadingView(org.telegram.ui.Components.FlickerLoadingView) NumberTextView(org.telegram.ui.Components.NumberTextView) RecyclerListView(org.telegram.ui.Components.RecyclerListView) ViewPager(androidx.viewpager.widget.ViewPager) SearchViewPager(org.telegram.ui.Components.SearchViewPager) TextPaint(android.text.TextPaint) Paint(android.graphics.Paint) SuppressLint(android.annotation.SuppressLint) HashtagSearchCell(org.telegram.ui.Cells.HashtagSearchCell) ChatActivityEnterView(org.telegram.ui.Components.ChatActivityEnterView) ProfileSearchCell(org.telegram.ui.Cells.ProfileSearchCell) FragmentContextView(org.telegram.ui.Components.FragmentContextView) DrawerUserCell(org.telegram.ui.Cells.DrawerUserCell)

Example 2 with DrawerProfileCell

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

the class DrawerLayoutAdapter method onCreateViewHolder.

@Override
public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
    View view;
    switch(viewType) {
        case 0:
            view = profileCell = new DrawerProfileCell(mContext);
            break;
        case 2:
            view = new DividerCell(mContext);
            break;
        case 3:
            view = new DrawerActionCell(mContext);
            break;
        case 4:
            view = new DrawerUserCell(mContext);
            break;
        case 5:
            view = new DrawerAddCell(mContext);
            break;
        case 1:
        default:
            view = new EmptyCell(mContext, AndroidUtilities.dp(8));
            break;
    }
    view.setLayoutParams(new RecyclerView.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT));
    return new RecyclerListView.Holder(view);
}
Also used : DrawerActionCell(org.telegram.ui.Cells.DrawerActionCell) DrawerAddCell(org.telegram.ui.Cells.DrawerAddCell) EmptyCell(org.telegram.ui.Cells.EmptyCell) DrawerUserCell(org.telegram.ui.Cells.DrawerUserCell) RecyclerView(androidx.recyclerview.widget.RecyclerView) DrawerProfileCell(org.telegram.ui.Cells.DrawerProfileCell) View(android.view.View) RecyclerView(androidx.recyclerview.widget.RecyclerView) RecyclerListView(org.telegram.ui.Components.RecyclerListView) DividerCell(org.telegram.ui.Cells.DividerCell)

Example 3 with DrawerProfileCell

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

the class LaunchActivity method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    ApplicationLoader.postInitApplication();
    AndroidUtilities.checkDisplaySize(this, getResources().getConfiguration());
    currentAccount = UserConfig.selectedAccount;
    if (!UserConfig.getInstance(currentAccount).isClientActivated()) {
        Intent intent = getIntent();
        boolean isProxy = false;
        if (intent != null && intent.getAction() != null) {
            if (Intent.ACTION_SEND.equals(intent.getAction()) || Intent.ACTION_SEND_MULTIPLE.equals(intent.getAction())) {
                super.onCreate(savedInstanceState);
                finish();
                return;
            } else if (Intent.ACTION_VIEW.equals(intent.getAction())) {
                Uri uri = intent.getData();
                if (uri != null) {
                    String url = uri.toString().toLowerCase();
                    isProxy = url.startsWith("tg:proxy") || url.startsWith("tg://proxy") || url.startsWith("tg:socks") || url.startsWith("tg://socks");
                }
            }
        }
        SharedPreferences preferences = MessagesController.getGlobalMainSettings();
        long crashed_time = preferences.getLong("intro_crashed_time", 0);
        boolean fromIntro = intent != null && intent.getBooleanExtra("fromIntro", false);
        if (fromIntro) {
            preferences.edit().putLong("intro_crashed_time", 0).commit();
        }
        if (!isProxy && Math.abs(crashed_time - System.currentTimeMillis()) >= 60 * 2 * 1000 && intent != null && !fromIntro) {
            preferences = ApplicationLoader.applicationContext.getSharedPreferences("logininfo2", MODE_PRIVATE);
            Map<String, ?> state = preferences.getAll();
            if (state.isEmpty()) {
                Intent intent2 = new Intent(this, IntroActivity.class);
                intent2.setData(intent.getData());
                startActivity(intent2);
                super.onCreate(savedInstanceState);
                finish();
                return;
            }
        }
    }
    requestWindowFeature(Window.FEATURE_NO_TITLE);
    setTheme(R.style.Theme_TMessages);
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
        try {
            setTaskDescription(new ActivityManager.TaskDescription(null, null, Theme.getColor(Theme.key_actionBarDefault) | 0xff000000));
        } catch (Exception ignore) {
        }
        try {
            getWindow().setNavigationBarColor(0xff000000);
        } catch (Exception ignore) {
        }
    }
    getWindow().setBackgroundDrawableResource(R.drawable.transparent);
    if (SharedConfig.passcodeHash.length() > 0 && !SharedConfig.allowScreenCapture) {
        try {
            getWindow().setFlags(WindowManager.LayoutParams.FLAG_SECURE, WindowManager.LayoutParams.FLAG_SECURE);
        } catch (Exception e) {
            FileLog.e(e);
        }
    }
    super.onCreate(savedInstanceState);
    if (Build.VERSION.SDK_INT >= 24) {
        AndroidUtilities.isInMultiwindow = isInMultiWindowMode();
    }
    Theme.createCommonChatResources();
    Theme.createDialogsResources(this);
    if (SharedConfig.passcodeHash.length() != 0 && SharedConfig.appLocked) {
        SharedConfig.lastPauseTime = (int) (SystemClock.elapsedRealtime() / 1000);
    }
    AndroidUtilities.fillStatusBarHeight(this);
    actionBarLayout = new ActionBarLayout(this) {

        @Override
        public void setThemeAnimationValue(float value) {
            super.setThemeAnimationValue(value);
            if (ArticleViewer.hasInstance() && ArticleViewer.getInstance().isVisible()) {
                ArticleViewer.getInstance().updateThemeColors(value);
            }
            drawerLayoutContainer.setBehindKeyboardColor(Theme.getColor(Theme.key_windowBackgroundWhite));
            if (PhotoViewer.hasInstance()) {
                PhotoViewer.getInstance().updateColors();
            }
        }
    };
    frameLayout = new FrameLayout(this);
    setContentView(frameLayout, new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT));
    if (Build.VERSION.SDK_INT >= 21) {
        themeSwitchImageView = new ImageView(this);
        themeSwitchImageView.setVisibility(View.GONE);
    }
    drawerLayoutContainer = new DrawerLayoutContainer(this) {

        @Override
        protected void onLayout(boolean changed, int l, int t, int r, int b) {
            super.onLayout(changed, l, t, r, b);
            setDrawerPosition(getDrawerPosition());
        }
    };
    drawerLayoutContainer.setBehindKeyboardColor(Theme.getColor(Theme.key_windowBackgroundWhite));
    frameLayout.addView(drawerLayoutContainer, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.MATCH_PARENT));
    if (Build.VERSION.SDK_INT >= 21) {
        themeSwitchSunView = new View(this) {

            @Override
            protected void onDraw(Canvas canvas) {
                if (themeSwitchSunDrawable != null) {
                    themeSwitchSunDrawable.draw(canvas);
                    invalidate();
                }
            }
        };
        frameLayout.addView(themeSwitchSunView, LayoutHelper.createFrame(48, 48));
        themeSwitchSunView.setVisibility(View.GONE);
    }
    if (AndroidUtilities.isTablet()) {
        getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE);
        RelativeLayout launchLayout = new RelativeLayout(this) {

            private boolean inLayout;

            @Override
            public void requestLayout() {
                if (inLayout) {
                    return;
                }
                super.requestLayout();
            }

            @Override
            protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
                inLayout = true;
                int width = MeasureSpec.getSize(widthMeasureSpec);
                int height = MeasureSpec.getSize(heightMeasureSpec);
                setMeasuredDimension(width, height);
                if (!AndroidUtilities.isInMultiwindow && (!AndroidUtilities.isSmallTablet() || getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE)) {
                    tabletFullSize = false;
                    int leftWidth = width / 100 * 35;
                    if (leftWidth < AndroidUtilities.dp(320)) {
                        leftWidth = AndroidUtilities.dp(320);
                    }
                    actionBarLayout.measure(MeasureSpec.makeMeasureSpec(leftWidth, MeasureSpec.EXACTLY), MeasureSpec.makeMeasureSpec(height, MeasureSpec.EXACTLY));
                    shadowTabletSide.measure(MeasureSpec.makeMeasureSpec(AndroidUtilities.dp(1), MeasureSpec.EXACTLY), MeasureSpec.makeMeasureSpec(height, MeasureSpec.EXACTLY));
                    rightActionBarLayout.measure(MeasureSpec.makeMeasureSpec(width - leftWidth, MeasureSpec.EXACTLY), MeasureSpec.makeMeasureSpec(height, MeasureSpec.EXACTLY));
                } else {
                    tabletFullSize = true;
                    actionBarLayout.measure(MeasureSpec.makeMeasureSpec(width, MeasureSpec.EXACTLY), MeasureSpec.makeMeasureSpec(height, MeasureSpec.EXACTLY));
                }
                backgroundTablet.measure(MeasureSpec.makeMeasureSpec(width, MeasureSpec.EXACTLY), MeasureSpec.makeMeasureSpec(height, MeasureSpec.EXACTLY));
                shadowTablet.measure(MeasureSpec.makeMeasureSpec(width, MeasureSpec.EXACTLY), MeasureSpec.makeMeasureSpec(height, MeasureSpec.EXACTLY));
                layersActionBarLayout.measure(MeasureSpec.makeMeasureSpec(Math.min(AndroidUtilities.dp(530), width), MeasureSpec.EXACTLY), MeasureSpec.makeMeasureSpec(Math.min(AndroidUtilities.dp(528), height), MeasureSpec.EXACTLY));
                inLayout = false;
            }

            @Override
            protected void onLayout(boolean changed, int l, int t, int r, int b) {
                int width = r - l;
                int height = b - t;
                if (!AndroidUtilities.isInMultiwindow && (!AndroidUtilities.isSmallTablet() || getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE)) {
                    int leftWidth = width / 100 * 35;
                    if (leftWidth < AndroidUtilities.dp(320)) {
                        leftWidth = AndroidUtilities.dp(320);
                    }
                    shadowTabletSide.layout(leftWidth, 0, leftWidth + shadowTabletSide.getMeasuredWidth(), shadowTabletSide.getMeasuredHeight());
                    actionBarLayout.layout(0, 0, actionBarLayout.getMeasuredWidth(), actionBarLayout.getMeasuredHeight());
                    rightActionBarLayout.layout(leftWidth, 0, leftWidth + rightActionBarLayout.getMeasuredWidth(), rightActionBarLayout.getMeasuredHeight());
                } else {
                    actionBarLayout.layout(0, 0, actionBarLayout.getMeasuredWidth(), actionBarLayout.getMeasuredHeight());
                }
                int x = (width - layersActionBarLayout.getMeasuredWidth()) / 2;
                int y = (height - layersActionBarLayout.getMeasuredHeight()) / 2;
                layersActionBarLayout.layout(x, y, x + layersActionBarLayout.getMeasuredWidth(), y + layersActionBarLayout.getMeasuredHeight());
                backgroundTablet.layout(0, 0, backgroundTablet.getMeasuredWidth(), backgroundTablet.getMeasuredHeight());
                shadowTablet.layout(0, 0, shadowTablet.getMeasuredWidth(), shadowTablet.getMeasuredHeight());
            }
        };
        drawerLayoutContainer.addView(launchLayout, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.MATCH_PARENT));
        backgroundTablet = new SizeNotifierFrameLayout(this) {

            @Override
            protected boolean isActionBarVisible() {
                return false;
            }
        };
        backgroundTablet.setOccupyStatusBar(false);
        backgroundTablet.setBackgroundImage(Theme.getCachedWallpaper(), Theme.isWallpaperMotion());
        launchLayout.addView(backgroundTablet, LayoutHelper.createRelative(LayoutHelper.MATCH_PARENT, LayoutHelper.MATCH_PARENT));
        launchLayout.addView(actionBarLayout);
        rightActionBarLayout = new ActionBarLayout(this);
        rightActionBarLayout.init(rightFragmentsStack);
        rightActionBarLayout.setDelegate(this);
        launchLayout.addView(rightActionBarLayout);
        shadowTabletSide = new FrameLayout(this);
        shadowTabletSide.setBackgroundColor(0x40295274);
        launchLayout.addView(shadowTabletSide);
        shadowTablet = new FrameLayout(this);
        shadowTablet.setVisibility(layerFragmentsStack.isEmpty() ? View.GONE : View.VISIBLE);
        shadowTablet.setBackgroundColor(0x7f000000);
        launchLayout.addView(shadowTablet);
        shadowTablet.setOnTouchListener((v, event) -> {
            if (!actionBarLayout.fragmentsStack.isEmpty() && event.getAction() == MotionEvent.ACTION_UP) {
                float x = event.getX();
                float y = event.getY();
                int[] location = new int[2];
                layersActionBarLayout.getLocationOnScreen(location);
                int viewX = location[0];
                int viewY = location[1];
                if (layersActionBarLayout.checkTransitionAnimation() || x > viewX && x < viewX + layersActionBarLayout.getWidth() && y > viewY && y < viewY + layersActionBarLayout.getHeight()) {
                    return false;
                } else {
                    if (!layersActionBarLayout.fragmentsStack.isEmpty()) {
                        for (int a = 0; a < layersActionBarLayout.fragmentsStack.size() - 1; a++) {
                            layersActionBarLayout.removeFragmentFromStack(layersActionBarLayout.fragmentsStack.get(0));
                            a--;
                        }
                        layersActionBarLayout.closeLastFragment(true);
                    }
                    return true;
                }
            }
            return false;
        });
        shadowTablet.setOnClickListener(v -> {
        });
        layersActionBarLayout = new ActionBarLayout(this);
        layersActionBarLayout.setRemoveActionBarExtraHeight(true);
        layersActionBarLayout.setBackgroundView(shadowTablet);
        layersActionBarLayout.setUseAlphaAnimations(true);
        layersActionBarLayout.setBackgroundResource(R.drawable.boxshadow);
        layersActionBarLayout.init(layerFragmentsStack);
        layersActionBarLayout.setDelegate(this);
        layersActionBarLayout.setDrawerLayoutContainer(drawerLayoutContainer);
        layersActionBarLayout.setVisibility(layerFragmentsStack.isEmpty() ? View.GONE : View.VISIBLE);
        launchLayout.addView(layersActionBarLayout);
    } else {
        drawerLayoutContainer.addView(actionBarLayout, new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT));
    }
    sideMenuContainer = new FrameLayout(this);
    sideMenu = new RecyclerListView(this) {

        @Override
        public boolean drawChild(Canvas canvas, View child, long drawingTime) {
            int restore = -1;
            if (itemAnimator != null && itemAnimator.isRunning() && itemAnimator.isAnimatingChild(child)) {
                restore = canvas.save();
                canvas.clipRect(0, itemAnimator.getAnimationClipTop(), getMeasuredWidth(), getMeasuredHeight());
            }
            boolean result = super.drawChild(canvas, child, drawingTime);
            if (restore >= 0) {
                canvas.restoreToCount(restore);
                invalidate();
                invalidateViews();
            }
            return result;
        }
    };
    itemAnimator = new SideMenultItemAnimator(sideMenu);
    sideMenu.setItemAnimator(itemAnimator);
    sideMenu.setBackgroundColor(Theme.getColor(Theme.key_chats_menuBackground));
    sideMenu.setLayoutManager(new LinearLayoutManager(this, LinearLayoutManager.VERTICAL, false));
    sideMenu.setAllowItemsInteractionDuringAnimation(false);
    sideMenu.setAdapter(drawerLayoutAdapter = new DrawerLayoutAdapter(this, itemAnimator));
    sideMenuContainer.addView(sideMenu, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.MATCH_PARENT));
    drawerLayoutContainer.setDrawerLayout(sideMenuContainer);
    FrameLayout.LayoutParams layoutParams = (FrameLayout.LayoutParams) sideMenuContainer.getLayoutParams();
    Point screenSize = AndroidUtilities.getRealScreenSize();
    layoutParams.width = AndroidUtilities.isTablet() ? AndroidUtilities.dp(320) : Math.min(AndroidUtilities.dp(320), Math.min(screenSize.x, screenSize.y) - AndroidUtilities.dp(56));
    layoutParams.height = LayoutHelper.MATCH_PARENT;
    sideMenuContainer.setLayoutParams(layoutParams);
    sideMenu.setOnItemClickListener((view, position, x, y) -> {
        if (position == 0) {
            DrawerProfileCell profileCell = (DrawerProfileCell) view;
            if (profileCell.isInAvatar(x, y)) {
                openSettings(profileCell.hasAvatar());
            } else {
                drawerLayoutAdapter.setAccountsShown(!drawerLayoutAdapter.isAccountsShown(), true);
            }
        } else if (view instanceof DrawerUserCell) {
            switchToAccount(((DrawerUserCell) view).getAccountNumber(), true);
            drawerLayoutContainer.closeDrawer(false);
        } else if (view instanceof DrawerAddCell) {
            int freeAccount = -1;
            for (int a = 0; a < UserConfig.MAX_ACCOUNT_COUNT; a++) {
                if (!UserConfig.getInstance(a).isClientActivated()) {
                    freeAccount = a;
                    break;
                }
            }
            if (freeAccount >= 0) {
                presentFragment(new LoginActivity(freeAccount));
            }
            drawerLayoutContainer.closeDrawer(false);
        } else {
            int id = drawerLayoutAdapter.getId(position);
            if (id == 2) {
                Bundle args = new Bundle();
                presentFragment(new GroupCreateActivity(args));
                drawerLayoutContainer.closeDrawer(false);
            } else if (id == 3) {
                Bundle args = new Bundle();
                args.putBoolean("onlyUsers", true);
                args.putBoolean("destroyAfterSelect", true);
                args.putBoolean("createSecretChat", true);
                args.putBoolean("allowBots", false);
                args.putBoolean("allowSelf", false);
                presentFragment(new ContactsActivity(args));
                drawerLayoutContainer.closeDrawer(false);
            } else if (id == 4) {
                SharedPreferences preferences = MessagesController.getGlobalMainSettings();
                if (!BuildVars.DEBUG_VERSION && preferences.getBoolean("channel_intro", false)) {
                    Bundle args = new Bundle();
                    args.putInt("step", 0);
                    presentFragment(new ChannelCreateActivity(args));
                } else {
                    presentFragment(new ActionIntroActivity(ActionIntroActivity.ACTION_TYPE_CHANNEL_CREATE));
                    preferences.edit().putBoolean("channel_intro", true).commit();
                }
                drawerLayoutContainer.closeDrawer(false);
            } else if (id == 6) {
                presentFragment(new ContactsActivity(null));
                drawerLayoutContainer.closeDrawer(false);
            } else if (id == 7) {
                presentFragment(new InviteContactsActivity());
                drawerLayoutContainer.closeDrawer(false);
            } else if (id == 8) {
                openSettings(false);
            } else if (id == 9) {
                Browser.openUrl(LaunchActivity.this, LocaleController.getString("TelegramFaqUrl", R.string.TelegramFaqUrl));
                drawerLayoutContainer.closeDrawer(false);
            } else if (id == 10) {
                presentFragment(new CallLogActivity());
                drawerLayoutContainer.closeDrawer(false);
            } else if (id == 11) {
                Bundle args = new Bundle();
                args.putLong("user_id", UserConfig.getInstance(currentAccount).getClientUserId());
                presentFragment(new ChatActivity(args));
                drawerLayoutContainer.closeDrawer(false);
            } else if (id == 12) {
                if (Build.VERSION.SDK_INT >= 23) {
                    if (checkSelfPermission(Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {
                        presentFragment(new ActionIntroActivity(ActionIntroActivity.ACTION_TYPE_NEARBY_LOCATION_ACCESS));
                        drawerLayoutContainer.closeDrawer(false);
                        return;
                    }
                }
                boolean enabled = true;
                if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
                    LocationManager lm = (LocationManager) ApplicationLoader.applicationContext.getSystemService(Context.LOCATION_SERVICE);
                    enabled = lm.isLocationEnabled();
                } else if (Build.VERSION.SDK_INT >= 19) {
                    try {
                        int mode = Settings.Secure.getInt(ApplicationLoader.applicationContext.getContentResolver(), Settings.Secure.LOCATION_MODE, Settings.Secure.LOCATION_MODE_OFF);
                        enabled = (mode != Settings.Secure.LOCATION_MODE_OFF);
                    } catch (Throwable e) {
                        FileLog.e(e);
                    }
                }
                if (enabled) {
                    presentFragment(new PeopleNearbyActivity());
                } else {
                    presentFragment(new ActionIntroActivity(ActionIntroActivity.ACTION_TYPE_NEARBY_LOCATION_ENABLED));
                }
                drawerLayoutContainer.closeDrawer(false);
            } else if (id == 13) {
                Browser.openUrl(LaunchActivity.this, LocaleController.getString("TelegramFeaturesUrl", R.string.TelegramFeaturesUrl));
                drawerLayoutContainer.closeDrawer(false);
            }
        }
    });
    final ItemTouchHelper sideMenuTouchHelper = new ItemTouchHelper(new ItemTouchHelper.SimpleCallback(ItemTouchHelper.UP | ItemTouchHelper.DOWN, 0) {

        private RecyclerView.ViewHolder selectedViewHolder;

        @Override
        public boolean onMove(@NonNull RecyclerView recyclerView, @NonNull RecyclerView.ViewHolder viewHolder, @NonNull RecyclerView.ViewHolder target) {
            if (viewHolder.getItemViewType() != target.getItemViewType()) {
                return false;
            }
            drawerLayoutAdapter.swapElements(viewHolder.getAdapterPosition(), target.getAdapterPosition());
            return true;
        }

        @Override
        public void onSwiped(@NonNull RecyclerView.ViewHolder viewHolder, int direction) {
        }

        @Override
        public boolean isLongPressDragEnabled() {
            return false;
        }

        @Override
        public void onSelectedChanged(RecyclerView.ViewHolder viewHolder, int actionState) {
            clearSelectedViewHolder();
            if (actionState != ItemTouchHelper.ACTION_STATE_IDLE) {
                selectedViewHolder = viewHolder;
                final View view = viewHolder.itemView;
                sideMenu.cancelClickRunnables(false);
                view.setBackgroundColor(Theme.getColor(Theme.key_dialogBackground));
                if (Build.VERSION.SDK_INT >= 21) {
                    ObjectAnimator.ofFloat(view, "elevation", AndroidUtilities.dp(1)).setDuration(150).start();
                }
            }
        }

        @Override
        public void clearView(RecyclerView recyclerView, RecyclerView.ViewHolder viewHolder) {
            clearSelectedViewHolder();
        }

        private void clearSelectedViewHolder() {
            if (selectedViewHolder != null) {
                final View view = selectedViewHolder.itemView;
                selectedViewHolder = null;
                view.setTranslationX(0f);
                view.setTranslationY(0f);
                if (Build.VERSION.SDK_INT >= 21) {
                    final ObjectAnimator animator = ObjectAnimator.ofFloat(view, "elevation", 0f);
                    animator.addListener(new AnimatorListenerAdapter() {

                        @Override
                        public void onAnimationEnd(Animator animation) {
                            view.setBackground(null);
                        }
                    });
                    animator.setDuration(150).start();
                }
            }
        }

        @Override
        public void onChildDraw(@NonNull Canvas c, @NonNull RecyclerView recyclerView, @NonNull RecyclerView.ViewHolder viewHolder, float dX, float dY, int actionState, boolean isCurrentlyActive) {
            final View view = viewHolder.itemView;
            if (drawerLayoutAdapter.isAccountsShown()) {
                RecyclerView.ViewHolder topViewHolder = recyclerView.findViewHolderForAdapterPosition(drawerLayoutAdapter.getFirstAccountPosition() - 1);
                RecyclerView.ViewHolder bottomViewHolder = recyclerView.findViewHolderForAdapterPosition(drawerLayoutAdapter.getLastAccountPosition() + 1);
                if (topViewHolder != null && topViewHolder.itemView != null && topViewHolder.itemView.getBottom() == view.getTop() && dY < 0f) {
                    dY = 0f;
                } else if (bottomViewHolder != null && bottomViewHolder.itemView != null && bottomViewHolder.itemView.getTop() == view.getBottom() && dY > 0f) {
                    dY = 0f;
                }
            }
            view.setTranslationX(dX);
            view.setTranslationY(dY);
        }
    });
    sideMenuTouchHelper.attachToRecyclerView(sideMenu);
    sideMenu.setOnItemLongClickListener((view, position) -> {
        if (view instanceof DrawerUserCell) {
            final int accountNumber = ((DrawerUserCell) view).getAccountNumber();
            if (accountNumber == currentAccount || AndroidUtilities.isTablet()) {
                sideMenuTouchHelper.startDrag(sideMenu.getChildViewHolder(view));
            } else {
                final BaseFragment fragment = new DialogsActivity(null) {

                    @Override
                    protected void onTransitionAnimationEnd(boolean isOpen, boolean backward) {
                        super.onTransitionAnimationEnd(isOpen, backward);
                        if (!isOpen && backward) {
                            // closed
                            drawerLayoutContainer.setDrawCurrentPreviewFragmentAbove(false);
                        }
                    }

                    @Override
                    protected void onPreviewOpenAnimationEnd() {
                        super.onPreviewOpenAnimationEnd();
                        drawerLayoutContainer.setAllowOpenDrawer(false, false);
                        drawerLayoutContainer.setDrawCurrentPreviewFragmentAbove(false);
                        switchToAccount(accountNumber, true);
                    }
                };
                fragment.setCurrentAccount(accountNumber);
                actionBarLayout.presentFragmentAsPreview(fragment);
                drawerLayoutContainer.setDrawCurrentPreviewFragmentAbove(true);
                return true;
            }
        }
        return false;
    });
    drawerLayoutContainer.setParentActionBarLayout(actionBarLayout);
    actionBarLayout.setDrawerLayoutContainer(drawerLayoutContainer);
    actionBarLayout.init(mainFragmentsStack);
    actionBarLayout.setDelegate(this);
    Theme.loadWallpaper();
    checkCurrentAccount();
    updateCurrentConnectionState(currentAccount);
    NotificationCenter.getGlobalInstance().postNotificationName(NotificationCenter.closeOtherAppActivities, this);
    currentConnectionState = ConnectionsManager.getInstance(currentAccount).getConnectionState();
    NotificationCenter.getGlobalInstance().addObserver(this, NotificationCenter.needShowAlert);
    NotificationCenter.getGlobalInstance().addObserver(this, NotificationCenter.reloadInterface);
    NotificationCenter.getGlobalInstance().addObserver(this, NotificationCenter.suggestedLangpack);
    NotificationCenter.getGlobalInstance().addObserver(this, NotificationCenter.didSetNewTheme);
    NotificationCenter.getGlobalInstance().addObserver(this, NotificationCenter.needSetDayNightTheme);
    NotificationCenter.getGlobalInstance().addObserver(this, NotificationCenter.needCheckSystemBarColors);
    NotificationCenter.getGlobalInstance().addObserver(this, NotificationCenter.closeOtherAppActivities);
    NotificationCenter.getGlobalInstance().addObserver(this, NotificationCenter.didSetPasscode);
    NotificationCenter.getGlobalInstance().addObserver(this, NotificationCenter.didSetNewWallpapper);
    NotificationCenter.getGlobalInstance().addObserver(this, NotificationCenter.notificationsCountUpdated);
    NotificationCenter.getGlobalInstance().addObserver(this, NotificationCenter.screenStateChanged);
    NotificationCenter.getGlobalInstance().addObserver(this, NotificationCenter.showBulletin);
    NotificationCenter.getGlobalInstance().addObserver(this, NotificationCenter.appUpdateAvailable);
    if (actionBarLayout.fragmentsStack.isEmpty()) {
        if (!UserConfig.getInstance(currentAccount).isClientActivated()) {
            actionBarLayout.addFragmentToStack(new LoginActivity());
            drawerLayoutContainer.setAllowOpenDrawer(false, false);
        } else {
            DialogsActivity dialogsActivity = new DialogsActivity(null);
            dialogsActivity.setSideMenu(sideMenu);
            actionBarLayout.addFragmentToStack(dialogsActivity);
            drawerLayoutContainer.setAllowOpenDrawer(true, false);
        }
        try {
            if (savedInstanceState != null) {
                String fragmentName = savedInstanceState.getString("fragment");
                if (fragmentName != null) {
                    Bundle args = savedInstanceState.getBundle("args");
                    switch(fragmentName) {
                        case "chat":
                            if (args != null) {
                                ChatActivity chat = new ChatActivity(args);
                                if (actionBarLayout.addFragmentToStack(chat)) {
                                    chat.restoreSelfArgs(savedInstanceState);
                                }
                            }
                            break;
                        case "settings":
                            {
                                args.putLong("user_id", UserConfig.getInstance(currentAccount).clientUserId);
                                ProfileActivity settings = new ProfileActivity(args);
                                actionBarLayout.addFragmentToStack(settings);
                                settings.restoreSelfArgs(savedInstanceState);
                                break;
                            }
                        case "group":
                            if (args != null) {
                                GroupCreateFinalActivity group = new GroupCreateFinalActivity(args);
                                if (actionBarLayout.addFragmentToStack(group)) {
                                    group.restoreSelfArgs(savedInstanceState);
                                }
                            }
                            break;
                        case "channel":
                            if (args != null) {
                                ChannelCreateActivity channel = new ChannelCreateActivity(args);
                                if (actionBarLayout.addFragmentToStack(channel)) {
                                    channel.restoreSelfArgs(savedInstanceState);
                                }
                            }
                            break;
                        case "chat_profile":
                            if (args != null) {
                                ProfileActivity profile = new ProfileActivity(args);
                                if (actionBarLayout.addFragmentToStack(profile)) {
                                    profile.restoreSelfArgs(savedInstanceState);
                                }
                            }
                            break;
                        case "wallpapers":
                            {
                                WallpapersListActivity settings = new WallpapersListActivity(WallpapersListActivity.TYPE_ALL);
                                actionBarLayout.addFragmentToStack(settings);
                                settings.restoreSelfArgs(savedInstanceState);
                                break;
                            }
                    }
                }
            }
        } catch (Exception e) {
            FileLog.e(e);
        }
    } else {
        BaseFragment fragment = actionBarLayout.fragmentsStack.get(0);
        if (fragment instanceof DialogsActivity) {
            ((DialogsActivity) fragment).setSideMenu(sideMenu);
        }
        boolean allowOpen = true;
        if (AndroidUtilities.isTablet()) {
            allowOpen = actionBarLayout.fragmentsStack.size() <= 1 && layersActionBarLayout.fragmentsStack.isEmpty();
            if (layersActionBarLayout.fragmentsStack.size() == 1 && layersActionBarLayout.fragmentsStack.get(0) instanceof LoginActivity) {
                allowOpen = false;
            }
        }
        if (actionBarLayout.fragmentsStack.size() == 1 && actionBarLayout.fragmentsStack.get(0) instanceof LoginActivity) {
            allowOpen = false;
        }
        drawerLayoutContainer.setAllowOpenDrawer(allowOpen, false);
    }
    checkLayout();
    checkSystemBarColors();
    handleIntent(getIntent(), false, savedInstanceState != null, false);
    try {
        String os1 = Build.DISPLAY;
        String os2 = Build.USER;
        if (os1 != null) {
            os1 = os1.toLowerCase();
        } else {
            os1 = "";
        }
        if (os2 != null) {
            os2 = os1.toLowerCase();
        } else {
            os2 = "";
        }
        if (BuildVars.LOGS_ENABLED) {
            FileLog.d("OS name " + os1 + " " + os2);
        }
        if ((os1.contains("flyme") || os2.contains("flyme")) && Build.VERSION.SDK_INT <= 24) {
            AndroidUtilities.incorrectDisplaySizeFix = true;
            final View view = getWindow().getDecorView().getRootView();
            view.getViewTreeObserver().addOnGlobalLayoutListener(onGlobalLayoutListener = () -> {
                int height = view.getMeasuredHeight();
                FileLog.d("height = " + height + " displayHeight = " + AndroidUtilities.displaySize.y);
                if (Build.VERSION.SDK_INT >= 21) {
                    height -= AndroidUtilities.statusBarHeight;
                }
                if (height > AndroidUtilities.dp(100) && height < AndroidUtilities.displaySize.y && height + AndroidUtilities.dp(100) > AndroidUtilities.displaySize.y) {
                    AndroidUtilities.displaySize.y = height;
                    if (BuildVars.LOGS_ENABLED) {
                        FileLog.d("fix display size y to " + AndroidUtilities.displaySize.y);
                    }
                }
            });
        }
    } catch (Exception e) {
        FileLog.e(e);
    }
    MediaController.getInstance().setBaseActivity(this, true);
    AndroidUtilities.startAppCenter(this);
    updateAppUpdateViews(false);
}
Also used : LinearLayoutManager(androidx.recyclerview.widget.LinearLayoutManager) BaseFragment(org.telegram.ui.ActionBar.BaseFragment) SideMenultItemAnimator(org.telegram.ui.Components.SideMenultItemAnimator) ImageView(android.widget.ImageView) RLottieImageView(org.telegram.ui.Components.RLottieImageView) ObjectAnimator(android.animation.ObjectAnimator) Canvas(android.graphics.Canvas) RelativeLayout(android.widget.RelativeLayout) DrawerUserCell(org.telegram.ui.Cells.DrawerUserCell) DrawerLayoutContainer(org.telegram.ui.ActionBar.DrawerLayoutContainer) ActivityManager(android.app.ActivityManager) ActionBarLayout(org.telegram.ui.ActionBar.ActionBarLayout) RecyclerListView(org.telegram.ui.Components.RecyclerListView) DrawerProfileCell(org.telegram.ui.Cells.DrawerProfileCell) Uri(android.net.Uri) ItemTouchHelper(androidx.recyclerview.widget.ItemTouchHelper) AnimatorListenerAdapter(android.animation.AnimatorListenerAdapter) LocationManager(android.location.LocationManager) SharedPreferences(android.content.SharedPreferences) ViewGroup(android.view.ViewGroup) SizeNotifierFrameLayout(org.telegram.ui.Components.SizeNotifierFrameLayout) Bundle(android.os.Bundle) DrawerLayoutAdapter(org.telegram.ui.Adapters.DrawerLayoutAdapter) DrawerAddCell(org.telegram.ui.Cells.DrawerAddCell) Intent(android.content.Intent) Point(android.graphics.Point) ImageView(android.widget.ImageView) UndoView(org.telegram.ui.Components.UndoView) PipRoundVideoView(org.telegram.ui.Components.PipRoundVideoView) PasscodeView(org.telegram.ui.Components.PasscodeView) SimpleTextView(org.telegram.ui.ActionBar.SimpleTextView) ThemeEditorView(org.telegram.ui.Components.ThemeEditorView) View(android.view.View) RecyclerView(androidx.recyclerview.widget.RecyclerView) TermsOfServiceView(org.telegram.ui.Components.TermsOfServiceView) RLottieImageView(org.telegram.ui.Components.RLottieImageView) BlockingUpdateView(org.telegram.ui.Components.BlockingUpdateView) TextView(android.widget.TextView) RecyclerListView(org.telegram.ui.Components.RecyclerListView) ParseException(java.text.ParseException) Paint(android.graphics.Paint) Point(android.graphics.Point) SideMenultItemAnimator(org.telegram.ui.Components.SideMenultItemAnimator) Animator(android.animation.Animator) ObjectAnimator(android.animation.ObjectAnimator) FrameLayout(android.widget.FrameLayout) SizeNotifierFrameLayout(org.telegram.ui.Components.SizeNotifierFrameLayout) RecyclerView(androidx.recyclerview.widget.RecyclerView)

Aggregations

View (android.view.View)3 RecyclerView (androidx.recyclerview.widget.RecyclerView)3 DrawerAddCell (org.telegram.ui.Cells.DrawerAddCell)3 DrawerProfileCell (org.telegram.ui.Cells.DrawerProfileCell)3 DrawerUserCell (org.telegram.ui.Cells.DrawerUserCell)3 Paint (android.graphics.Paint)2 ImageView (android.widget.ImageView)2 TextView (android.widget.TextView)2 DividerCell (org.telegram.ui.Cells.DividerCell)2 DrawerActionCell (org.telegram.ui.Cells.DrawerActionCell)2 RecyclerListView (org.telegram.ui.Components.RecyclerListView)2 Animator (android.animation.Animator)1 AnimatorListenerAdapter (android.animation.AnimatorListenerAdapter)1 ObjectAnimator (android.animation.ObjectAnimator)1 SuppressLint (android.annotation.SuppressLint)1 ActivityManager (android.app.ActivityManager)1 Intent (android.content.Intent)1 SharedPreferences (android.content.SharedPreferences)1 Canvas (android.graphics.Canvas)1 Point (android.graphics.Point)1