Java Code Examples for org.telegram.ui.ActionBar.Theme#hasWallpaperFromTheme()
The following examples show how to use
org.telegram.ui.ActionBar.Theme#hasWallpaperFromTheme() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: WallpapersActivity.java From TelePlus-Android with GNU General Public License v2.0 | 6 votes |
@Override public void onBindViewHolder(RecyclerView.ViewHolder viewHolder, int i) { WallpaperCell wallpaperCell = (WallpaperCell) viewHolder.itemView; if (i == 0) { wallpaperCell.setWallpaper(null, !Theme.hasWallpaperFromTheme() || overrideThemeWallpaper ? selectedBackground : -2, null, false); } else { if (Theme.hasWallpaperFromTheme()) { if (i == 1) { wallpaperCell.setWallpaper(null, overrideThemeWallpaper ? -1 : -2, themedWallpaper, true); return; } else { i -= 2; } } else { i--; } wallpaperCell.setWallpaper(wallPapers.get(i), !Theme.hasWallpaperFromTheme() || overrideThemeWallpaper ? selectedBackground : -2, null, false); } }
Example 2
Source File: WallpapersActivity.java From TelePlus-Android with GNU General Public License v2.0 | 6 votes |
@Override public void onBindViewHolder(RecyclerView.ViewHolder viewHolder, int i) { WallpaperCell wallpaperCell = (WallpaperCell) viewHolder.itemView; if (i == 0) { wallpaperCell.setWallpaper(null, !Theme.hasWallpaperFromTheme() || overrideThemeWallpaper ? selectedBackground : -2, null, false); } else { if (Theme.hasWallpaperFromTheme()) { if (i == 1) { wallpaperCell.setWallpaper(null, overrideThemeWallpaper ? -1 : -2, themedWallpaper, true); return; } else { i -= 2; } } else { i--; } wallpaperCell.setWallpaper(wallPapers.get(i), !Theme.hasWallpaperFromTheme() || overrideThemeWallpaper ? selectedBackground : -2, null, false); } }
Example 3
Source File: WallpapersListActivity.java From Telegram-FOSS with GNU General Public License v2.0 | 6 votes |
@Override public void onResume() { super.onResume(); SharedPreferences preferences = MessagesController.getGlobalMainSettings(); Theme.ThemeInfo themeInfo = Theme.getActiveTheme(); Theme.OverrideWallpaperInfo overrideWallpaper = themeInfo.overrideWallpaper; if (overrideWallpaper != null) { selectedBackgroundSlug = overrideWallpaper.slug; selectedColor = overrideWallpaper.color; selectedGradientColor = overrideWallpaper.gradientColor; selectedGradientRotation = overrideWallpaper.rotation; selectedIntensity = overrideWallpaper.intensity; selectedBackgroundMotion = overrideWallpaper.isMotion; selectedBackgroundBlurred = overrideWallpaper.isBlurred; } else { selectedBackgroundSlug = Theme.hasWallpaperFromTheme() ? Theme.THEME_BACKGROUND_SLUG : Theme.DEFAULT_BACKGROUND_SLUG; selectedColor = 0; selectedGradientColor = 0; selectedGradientRotation = 45; selectedIntensity = 1.0f; selectedBackgroundMotion = false; selectedBackgroundBlurred = false; } fillWallpapersWithCustom(); fixLayout(); }
Example 4
Source File: WallpapersListActivity.java From Telegram with GNU General Public License v2.0 | 6 votes |
@Override public void onResume() { super.onResume(); SharedPreferences preferences = MessagesController.getGlobalMainSettings(); Theme.ThemeInfo themeInfo = Theme.getActiveTheme(); Theme.OverrideWallpaperInfo overrideWallpaper = themeInfo.overrideWallpaper; if (overrideWallpaper != null) { selectedBackgroundSlug = overrideWallpaper.slug; selectedColor = overrideWallpaper.color; selectedGradientColor = overrideWallpaper.gradientColor; selectedGradientRotation = overrideWallpaper.rotation; selectedIntensity = overrideWallpaper.intensity; selectedBackgroundMotion = overrideWallpaper.isMotion; selectedBackgroundBlurred = overrideWallpaper.isBlurred; } else { selectedBackgroundSlug = Theme.hasWallpaperFromTheme() ? Theme.THEME_BACKGROUND_SLUG : Theme.DEFAULT_BACKGROUND_SLUG; selectedColor = 0; selectedGradientColor = 0; selectedGradientRotation = 45; selectedIntensity = 1.0f; selectedBackgroundMotion = false; selectedBackgroundBlurred = false; } fillWallpapersWithCustom(); fixLayout(); }
Example 5
Source File: WallpapersActivity.java From TelePlus-Android with GNU General Public License v2.0 | 5 votes |
@Override public int getItemCount() { int count = 1 + wallPapers.size(); if (Theme.hasWallpaperFromTheme()) { count++; } return count; }
Example 6
Source File: WallpapersActivity.java From TelePlus-Android with GNU General Public License v2.0 | 5 votes |
@Override public int getItemCount() { int count = 1 + wallPapers.size(); if (Theme.hasWallpaperFromTheme()) { count++; } return count; }