use of org.telegram.ui.ActionBar.ThemeDescription in project Telegram-FOSS by Telegram-FOSS-Team.
the class ColorPicker method provideThemeDescriptions.
public void provideThemeDescriptions(List<ThemeDescription> arrayList) {
for (int a = 0; a < colorEditText.length; a++) {
arrayList.add(new ThemeDescription(colorEditText[a], ThemeDescription.FLAG_TEXTCOLOR, null, null, null, null, Theme.key_windowBackgroundWhiteBlackText));
arrayList.add(new ThemeDescription(colorEditText[a], ThemeDescription.FLAG_CURSORCOLOR, null, null, null, null, Theme.key_windowBackgroundWhiteBlackText));
arrayList.add(new ThemeDescription(colorEditText[a], ThemeDescription.FLAG_HINTTEXTCOLOR, null, null, null, null, Theme.key_windowBackgroundWhiteHintText));
arrayList.add(new ThemeDescription(colorEditText[a], ThemeDescription.FLAG_HINTTEXTCOLOR | ThemeDescription.FLAG_PROGRESSBAR, null, null, null, null, Theme.key_windowBackgroundWhiteBlueHeader));
arrayList.add(new ThemeDescription(colorEditText[a], ThemeDescription.FLAG_BACKGROUNDFILTER, null, null, null, null, Theme.key_windowBackgroundWhiteInputField));
arrayList.add(new ThemeDescription(colorEditText[a], ThemeDescription.FLAG_BACKGROUNDFILTER | ThemeDescription.FLAG_DRAWABLESELECTEDSTATE, null, null, null, null, Theme.key_windowBackgroundWhiteInputFieldActivated));
}
arrayList.add(new ThemeDescription(clearButton, ThemeDescription.FLAG_IMAGECOLOR, null, null, null, null, Theme.key_windowBackgroundWhiteBlackText));
arrayList.add(new ThemeDescription(clearButton, ThemeDescription.FLAG_BACKGROUNDFILTER, null, null, null, null, Theme.key_dialogButtonSelector));
if (menuItem != null) {
ThemeDescription.ThemeDescriptionDelegate delegate = () -> {
menuItem.setIconColor(Theme.getColor(Theme.key_windowBackgroundWhiteBlackText));
Theme.setDrawableColor(menuItem.getBackground(), Theme.getColor(Theme.key_dialogButtonSelector));
menuItem.setPopupItemsColor(Theme.getColor(Theme.key_actionBarDefaultSubmenuItem), false);
menuItem.setPopupItemsColor(Theme.getColor(Theme.key_actionBarDefaultSubmenuItemIcon), true);
menuItem.redrawPopup(Theme.getColor(Theme.key_actionBarDefaultSubmenuBackground));
};
arrayList.add(new ThemeDescription(menuItem, 0, null, null, null, delegate, Theme.key_windowBackgroundWhiteBlackText));
arrayList.add(new ThemeDescription(menuItem, 0, null, null, null, delegate, Theme.key_dialogButtonSelector));
arrayList.add(new ThemeDescription(menuItem, 0, null, null, null, delegate, Theme.key_actionBarDefaultSubmenuItem));
arrayList.add(new ThemeDescription(menuItem, 0, null, null, null, delegate, Theme.key_actionBarDefaultSubmenuItemIcon));
arrayList.add(new ThemeDescription(menuItem, 0, null, null, null, delegate, Theme.key_actionBarDefaultSubmenuBackground));
}
}
use of org.telegram.ui.ActionBar.ThemeDescription in project Telegram-FOSS by Telegram-FOSS-Team.
the class ChatThemeBottomSheet method getThemeDescriptions.
@Override
public ArrayList<ThemeDescription> getThemeDescriptions() {
ThemeDescription.ThemeDescriptionDelegate descriptionDelegate = new ThemeDescription.ThemeDescriptionDelegate() {
private boolean isAnimationStarted = false;
@Override
public void onAnimationProgress(float progress) {
if (progress == 0f && !isAnimationStarted) {
onAnimationStart();
isAnimationStarted = true;
}
setDarkButtonColor(getThemedColor(Theme.key_featuredStickers_addButton));
setOverlayNavBarColor(getThemedColor(Theme.key_dialogBackground));
if (isLightDarkChangeAnimation) {
setItemsAnimationProgress(progress);
}
if (progress == 1f && isAnimationStarted) {
isLightDarkChangeAnimation = false;
onAnimationEnd();
isAnimationStarted = false;
}
}
@Override
public void didSetColor() {
}
};
ArrayList<ThemeDescription> themeDescriptions = new ArrayList<>();
themeDescriptions.add(new ThemeDescription(null, ThemeDescription.FLAG_BACKGROUNDFILTER, null, null, new Drawable[] { shadowDrawable }, descriptionDelegate, Theme.key_dialogBackground));
themeDescriptions.add(new ThemeDescription(titleView, ThemeDescription.FLAG_TEXTCOLOR, null, null, null, null, Theme.key_dialogTextBlack));
themeDescriptions.add(new ThemeDescription(recyclerView, ThemeDescription.FLAG_CELLBACKGROUNDCOLOR, new Class[] { ThemeSmallPreviewView.class }, null, null, null, Theme.key_dialogBackgroundGray));
themeDescriptions.add(new ThemeDescription(applyButton, ThemeDescription.FLAG_BACKGROUNDFILTER, null, null, null, null, Theme.key_featuredStickers_addButton));
themeDescriptions.add(new ThemeDescription(applyButton, ThemeDescription.FLAG_BACKGROUNDFILTER | ThemeDescription.FLAG_DRAWABLESELECTEDSTATE, null, null, null, null, Theme.key_featuredStickers_addButtonPressed));
for (ThemeDescription description : themeDescriptions) {
description.resourcesProvider = themeDelegate;
}
return themeDescriptions;
}
use of org.telegram.ui.ActionBar.ThemeDescription in project Telegram-FOSS by Telegram-FOSS-Team.
the class TrendingStickersAlert method getThemeDescriptions.
@Override
public ArrayList<ThemeDescription> getThemeDescriptions() {
final ArrayList<ThemeDescription> descriptions = new ArrayList<>();
layout.getThemeDescriptions(descriptions, layout::updateColors);
descriptions.add(new ThemeDescription(alertContainerView, 0, null, null, new Drawable[] { shadowDrawable }, null, Theme.key_dialogBackground));
descriptions.add(new ThemeDescription(alertContainerView, 0, null, null, null, null, Theme.key_sheet_scrollUp));
return descriptions;
}
use of org.telegram.ui.ActionBar.ThemeDescription in project Telegram-FOSS by Telegram-FOSS-Team.
the class TrendingStickersLayout method getThemeDescriptions.
public void getThemeDescriptions(List<ThemeDescription> descriptions, ThemeDescription.ThemeDescriptionDelegate delegate) {
searchView.getThemeDescriptions(descriptions);
adapter.getThemeDescriptions(descriptions, listView, delegate);
searchAdapter.getThemeDescriptions(descriptions, listView, delegate);
descriptions.add(new ThemeDescription(shadowView, ThemeDescription.FLAG_BACKGROUND, null, null, null, null, Theme.key_dialogShadowLine));
descriptions.add(new ThemeDescription(searchLayout, ThemeDescription.FLAG_BACKGROUND, null, null, null, null, Theme.key_dialogBackground));
}
use of org.telegram.ui.ActionBar.ThemeDescription in project Telegram-FOSS by Telegram-FOSS-Team.
the class FeaturedStickerSetCell2 method createThemeDescriptions.
public static void createThemeDescriptions(List<ThemeDescription> descriptions, RecyclerListView listView, ThemeDescription.ThemeDescriptionDelegate delegate) {
descriptions.add(new ThemeDescription(listView, ThemeDescription.FLAG_TEXTCOLOR, new Class[] { FeaturedStickerSetCell.class }, new String[] { "textView" }, null, null, null, Theme.key_windowBackgroundWhiteBlackText));
descriptions.add(new ThemeDescription(listView, ThemeDescription.FLAG_TEXTCOLOR, new Class[] { FeaturedStickerSetCell.class }, new String[] { "valueTextView" }, null, null, null, Theme.key_windowBackgroundWhiteGrayText2));
descriptions.add(new ThemeDescription(listView, ThemeDescription.FLAG_TEXTCOLOR, new Class[] { FeaturedStickerSetCell.class }, new String[] { "addButton" }, null, null, null, Theme.key_featuredStickers_buttonText));
descriptions.add(new ThemeDescription(listView, ThemeDescription.FLAG_TEXTCOLOR, new Class[] { FeaturedStickerSetCell.class }, new String[] { "delButton" }, null, null, null, Theme.key_featuredStickers_removeButtonText));
descriptions.add(new ThemeDescription(listView, 0, new Class[] { FeaturedStickerSetCell.class }, Theme.dividerPaint, null, null, Theme.key_divider));
descriptions.add(new ThemeDescription(null, 0, null, null, null, delegate, Theme.key_featuredStickers_buttonProgress));
descriptions.add(new ThemeDescription(null, 0, null, null, null, delegate, Theme.key_featuredStickers_addButtonPressed));
}
Aggregations