org.telegram.ui.Cells.EmptyCell Java Examples
The following examples show how to use
org.telegram.ui.Cells.EmptyCell.
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: TrendingStickersLayout.java From Telegram with GNU General Public License v2.0 | 6 votes |
@Override public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) { switch (holder.getItemViewType()) { case 0: TLRPC.Document sticker = (TLRPC.Document) cache.get(position); ((StickerEmojiCell) holder.itemView).setSticker(sticker, positionsToSets.get(position), false); break; case 1: ((EmptyCell) holder.itemView).setHeight(AndroidUtilities.dp(82)); break; case 2: case 5: bindStickerSetCell(holder.itemView, position, false); break; case 4: ((GraySectionCell) holder.itemView).setText(LocaleController.getString("OtherStickers", R.string.OtherStickers)); break; } }
Example #2
Source File: TrendingStickersLayout.java From Telegram-FOSS with GNU General Public License v2.0 | 6 votes |
@Override public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) { switch (holder.getItemViewType()) { case 0: TLRPC.Document sticker = (TLRPC.Document) cache.get(position); ((StickerEmojiCell) holder.itemView).setSticker(sticker, positionsToSets.get(position), false); break; case 1: ((EmptyCell) holder.itemView).setHeight(AndroidUtilities.dp(82)); break; case 2: case 5: bindStickerSetCell(holder.itemView, position, false); break; case 4: ((GraySectionCell) holder.itemView).setText(LocaleController.getString("OtherStickers", R.string.OtherStickers)); break; } }
Example #3
Source File: StickerMasksView.java From TelePlus-Android with GNU General Public License v2.0 | 6 votes |
@Override public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) { switch (holder.getItemViewType()) { case 0: TLRPC.Document sticker = cache.get(position); ((StickerEmojiCell) holder.itemView).setSticker(sticker, false); break; case 1: if (position == totalItems) { int row = (position - 1) / stickersPerRow; TLRPC.TL_messages_stickerSet pack = rowStartPack.get(row); if (pack == null) { ((EmptyCell) holder.itemView).setHeight(1); } else { int height = stickersGridView.getMeasuredHeight() - (int) Math.ceil(pack.documents.size() / (float) stickersPerRow) * AndroidUtilities.dp(82); ((EmptyCell) holder.itemView).setHeight(height > 0 ? height : 1); } } else { ((EmptyCell) holder.itemView).setHeight(AndroidUtilities.dp(82)); } break; } }
Example #4
Source File: StickerMasksView.java From TelePlus-Android with GNU General Public License v2.0 | 6 votes |
@Override public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) { switch (holder.getItemViewType()) { case 0: TLRPC.Document sticker = cache.get(position); ((StickerEmojiCell) holder.itemView).setSticker(sticker, false); break; case 1: if (position == totalItems) { int row = (position - 1) / stickersPerRow; TLRPC.TL_messages_stickerSet pack = rowStartPack.get(row); if (pack == null) { ((EmptyCell) holder.itemView).setHeight(1); } else { int height = stickersGridView.getMeasuredHeight() - (int) Math.ceil(pack.documents.size() / (float) stickersPerRow) * AndroidUtilities.dp(82); ((EmptyCell) holder.itemView).setHeight(height > 0 ? height : 1); } } else { ((EmptyCell) holder.itemView).setHeight(AndroidUtilities.dp(82)); } break; } }
Example #5
Source File: PhonebookShareActivity.java From TelePlus-Android with GNU General Public License v2.0 | 5 votes |
@Override public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) { switch (holder.getItemViewType()) { case 0: { if (position == overscrollRow) { ((EmptyCell) holder.itemView).setHeight(AndroidUtilities.dp(88)); } else { ((EmptyCell) holder.itemView).setHeight(AndroidUtilities.dp(16)); } break; } case 1: { TextCheckBoxCell cell = (TextCheckBoxCell) holder.itemView; AndroidUtilities.VcardItem item; int icon; if (position >= phoneStartRow && position < phoneEndRow) { item = phones.get(position - phoneStartRow); if (position == phoneStartRow) { icon = R.drawable.profile_phone; } else { icon = 0; } } else { item = other.get(position - vcardStartRow); if (position == vcardStartRow) { icon = R.drawable.profile_info; } else { icon = 0; } } cell.setVCardItem(item, icon); break; } } }
Example #6
Source File: StickersAlert.java From Telegram with GNU General Public License v2.0 | 5 votes |
@Override public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) { if (stickerSetCovereds != null) { switch (holder.getItemViewType()) { case 0: TLRPC.Document sticker = (TLRPC.Document) cache.get(position); ((StickerEmojiCell) holder.itemView).setSticker(sticker, positionsToSets.get(position), false); break; case 1: ((EmptyCell) holder.itemView).setHeight(AndroidUtilities.dp(82)); break; case 2: TLRPC.StickerSetCovered stickerSetCovered = stickerSetCovereds.get((Integer) cache.get(position)); FeaturedStickerSetInfoCell cell = (FeaturedStickerSetInfoCell) holder.itemView; cell.setStickerSet(stickerSetCovered, false); /*boolean installing = installingStickerSets.containsKey(stickerSetCovered.set.id); boolean removing = removingStickerSets.containsKey(stickerSetCovered.set.id); if (installing || removing) { if (installing && cell.isInstalled()) { installingStickerSets.remove(stickerSetCovered.set.id); installing = false; } else if (removing && !cell.isInstalled()) { removingStickerSets.remove(stickerSetCovered.set.id); removing = false; } } cell.setDrawProgress(installing || removing);*/ break; } } else { ((StickerEmojiCell) holder.itemView).setSticker(stickerSet.documents.get(position), stickerSet, showEmoji); } }
Example #7
Source File: StickersAlert.java From Telegram-FOSS with GNU General Public License v2.0 | 5 votes |
@Override public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) { if (stickerSetCovereds != null) { switch (holder.getItemViewType()) { case 0: TLRPC.Document sticker = (TLRPC.Document) cache.get(position); ((StickerEmojiCell) holder.itemView).setSticker(sticker, positionsToSets.get(position), false); break; case 1: ((EmptyCell) holder.itemView).setHeight(AndroidUtilities.dp(82)); break; case 2: TLRPC.StickerSetCovered stickerSetCovered = stickerSetCovereds.get((Integer) cache.get(position)); FeaturedStickerSetInfoCell cell = (FeaturedStickerSetInfoCell) holder.itemView; cell.setStickerSet(stickerSetCovered, false); /*boolean installing = installingStickerSets.containsKey(stickerSetCovered.set.id); boolean removing = removingStickerSets.containsKey(stickerSetCovered.set.id); if (installing || removing) { if (installing && cell.isInstalled()) { installingStickerSets.remove(stickerSetCovered.set.id); installing = false; } else if (removing && !cell.isInstalled()) { removingStickerSets.remove(stickerSetCovered.set.id); removing = false; } } cell.setDrawProgress(installing || removing);*/ break; } } else { ((StickerEmojiCell) holder.itemView).setSticker(stickerSet.documents.get(position), stickerSet, showEmoji); } }
Example #8
Source File: StickersAlert.java From TelePlus-Android with GNU General Public License v2.0 | 5 votes |
@Override public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) { if (stickerSetCovereds != null) { switch (holder.getItemViewType()) { case 0: TLRPC.Document sticker = (TLRPC.Document) cache.get(position); ((StickerEmojiCell) holder.itemView).setSticker(sticker, false); break; case 1: ((EmptyCell) holder.itemView).setHeight(AndroidUtilities.dp(82)); break; case 2: TLRPC.StickerSetCovered stickerSetCovered = stickerSetCovereds.get((Integer) cache.get(position)); FeaturedStickerSetInfoCell cell = (FeaturedStickerSetInfoCell) holder.itemView; cell.setStickerSet(stickerSetCovered, false); /*boolean installing = installingStickerSets.containsKey(stickerSetCovered.set.id); boolean removing = removingStickerSets.containsKey(stickerSetCovered.set.id); if (installing || removing) { if (installing && cell.isInstalled()) { installingStickerSets.remove(stickerSetCovered.set.id); installing = false; } else if (removing && !cell.isInstalled()) { removingStickerSets.remove(stickerSetCovered.set.id); removing = false; } } cell.setDrawProgress(installing || removing);*/ break; } } else { ((StickerEmojiCell) holder.itemView).setSticker(stickerSet.documents.get(position), showEmoji); } }
Example #9
Source File: EmojiView.java From TelePlus-Android with GNU General Public License v2.0 | 5 votes |
@Override public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) { switch (holder.getItemViewType()) { case 0: TLRPC.Document sticker = (TLRPC.Document) cache.get(position); ((StickerEmojiCell) holder.itemView).setSticker(sticker, false); break; case 1: ((EmptyCell) holder.itemView).setHeight(AndroidUtilities.dp(82)); break; case 2: ArrayList<Long> unreadStickers = DataQuery.getInstance(currentAccount).getUnreadStickerSets(); TLRPC.StickerSetCovered stickerSetCovered = sets.get((Integer) cache.get(position)); boolean unread = unreadStickers != null && unreadStickers.contains(stickerSetCovered.set.id); FeaturedStickerSetInfoCell cell = (FeaturedStickerSetInfoCell) holder.itemView; cell.setStickerSet(stickerSetCovered, unread); if (unread) { DataQuery.getInstance(currentAccount).markFaturedStickersByIdAsRead(stickerSetCovered.set.id); } boolean installing = installingStickerSets.indexOfKey(stickerSetCovered.set.id) >= 0; boolean removing = removingStickerSets.indexOfKey(stickerSetCovered.set.id) >= 0; if (installing || removing) { if (installing && cell.isInstalled()) { installingStickerSets.remove(stickerSetCovered.set.id); installing = false; } else if (removing && !cell.isInstalled()) { removingStickerSets.remove(stickerSetCovered.set.id); removing = false; } } cell.setDrawProgress(installing || removing); break; } }
Example #10
Source File: FeaturedSettingsActivity.java From TelePlus-Android with GNU General Public License v2.0 | 5 votes |
@Override public ThemeDescription[] getThemeDescriptions() { return new ThemeDescription[] { new ThemeDescription(actionBar, ThemeDescription.FLAG_BACKGROUND, null, null, null, null, Theme.key_actionBarDefault), new ThemeDescription(actionBar, ThemeDescription.FLAG_AB_ITEMSCOLOR, null, null, null, null, Theme.key_actionBarDefaultIcon), new ThemeDescription(actionBar, ThemeDescription.FLAG_AB_TITLECOLOR, null, null, null, null, Theme.key_actionBarDefaultTitle), new ThemeDescription(actionBar, ThemeDescription.FLAG_AB_SELECTORCOLOR, null, null, null, null, Theme.key_actionBarDefaultSelector), new ThemeDescription(listView, ThemeDescription.FLAG_CELLBACKGROUNDCOLOR, new Class[]{EmptyCell.class, TextSettingsCell.class, TextCheckCell.class, HeaderCell.class, TextInfoCell.class, TextDetailSettingsCell.class}, null, null, null, Theme.key_windowBackgroundWhite), new ThemeDescription(listView, ThemeDescription.FLAG_LISTGLOWCOLOR, null, null, null, null, Theme.key_avatar_backgroundActionBarBlue), new ThemeDescription(listView, ThemeDescription.FLAG_SELECTOR, null, null, null, null, Theme.key_listSelector), new ThemeDescription(listView, 0, new Class[]{View.class}, Theme.dividerPaint, null, null, Theme.key_divider), new ThemeDescription(listView, ThemeDescription.FLAG_BACKGROUNDFILTER, new Class[]{ShadowSectionCell.class}, null, null, null, Theme.key_windowBackgroundGrayShadow), new ThemeDescription(listView, 0, new Class[]{TextSettingsCell.class}, new String[]{"textView"}, null, null, null, Theme.key_windowBackgroundWhiteBlackText), new ThemeDescription(listView, 0, new Class[]{TextSettingsCell.class}, new String[]{"valueTextView"}, null, null, null, Theme.key_windowBackgroundWhiteValueText), new ThemeDescription(listView, 0, new Class[]{TextCheckCell.class}, new String[]{"textView"}, null, null, null, Theme.key_windowBackgroundWhiteBlackText), new ThemeDescription(listView, 0, new Class[]{TextCheckCell.class}, new String[]{"valueTextView"}, null, null, null, Theme.key_windowBackgroundWhiteGrayText2), new ThemeDescription(listView, 0, new Class[]{TextCheckCell.class}, new String[]{"checkBox"}, null, null, null, Theme.key_switchThumb), new ThemeDescription(listView, 0, new Class[]{TextCheckCell.class}, new String[]{"checkBox"}, null, null, null, Theme.key_switchTrack), new ThemeDescription(listView, 0, new Class[]{TextCheckCell.class}, new String[]{"checkBox"}, null, null, null, Theme.key_switchThumbChecked), new ThemeDescription(listView, 0, new Class[]{TextCheckCell.class}, new String[]{"checkBox"}, null, null, null, Theme.key_switchTrackChecked), new ThemeDescription(listView, 0, new Class[]{HeaderCell.class}, new String[]{"textView"}, null, null, null, Theme.key_windowBackgroundWhiteBlueHeader), new ThemeDescription(listView, 0, new Class[]{TextDetailSettingsCell.class}, new String[]{"textView"}, null, null, null, Theme.key_windowBackgroundWhiteBlackText), new ThemeDescription(listView, 0, new Class[]{TextDetailSettingsCell.class}, new String[]{"valueTextView"}, null, null, null, Theme.key_windowBackgroundWhiteGrayText2), new ThemeDescription(listView, 0, new Class[]{TextInfoCell.class}, new String[]{"textView"}, null, null, null, Theme.key_windowBackgroundWhiteGrayText5), }; }
Example #11
Source File: TabsSettingsActivity.java From TelePlus-Android with GNU General Public License v2.0 | 5 votes |
@Override public ThemeDescription[] getThemeDescriptions() { return new ThemeDescription[] { new ThemeDescription(actionBar, ThemeDescription.FLAG_BACKGROUND, null, null, null, null, Theme.key_actionBarDefault), new ThemeDescription(actionBar, ThemeDescription.FLAG_AB_ITEMSCOLOR, null, null, null, null, Theme.key_actionBarDefaultIcon), new ThemeDescription(actionBar, ThemeDescription.FLAG_AB_TITLECOLOR, null, null, null, null, Theme.key_actionBarDefaultTitle), new ThemeDescription(actionBar, ThemeDescription.FLAG_AB_SELECTORCOLOR, null, null, null, null, Theme.key_actionBarDefaultSelector), new ThemeDescription(listView, ThemeDescription.FLAG_CELLBACKGROUNDCOLOR, new Class[]{EmptyCell.class, TextSettingsCell.class, TextCheckCell.class, HeaderCell.class, TextInfoCell.class, TextDetailSettingsCell.class}, null, null, null, Theme.key_windowBackgroundWhite), new ThemeDescription(listView, ThemeDescription.FLAG_LISTGLOWCOLOR, null, null, null, null, Theme.key_avatar_backgroundActionBarBlue), new ThemeDescription(listView, ThemeDescription.FLAG_SELECTOR, null, null, null, null, Theme.key_listSelector), new ThemeDescription(listView, 0, new Class[]{View.class}, Theme.dividerPaint, null, null, Theme.key_divider), new ThemeDescription(listView, ThemeDescription.FLAG_BACKGROUNDFILTER, new Class[]{ShadowSectionCell.class}, null, null, null, Theme.key_windowBackgroundGrayShadow), new ThemeDescription(listView, 0, new Class[]{TextSettingsCell.class}, new String[]{"textView"}, null, null, null, Theme.key_windowBackgroundWhiteBlackText), new ThemeDescription(listView, 0, new Class[]{TextSettingsCell.class}, new String[]{"valueTextView"}, null, null, null, Theme.key_windowBackgroundWhiteValueText), new ThemeDescription(listView, 0, new Class[]{TextCheckCell.class}, new String[]{"textView"}, null, null, null, Theme.key_windowBackgroundWhiteBlackText), new ThemeDescription(listView, 0, new Class[]{TextCheckCell.class}, new String[]{"valueTextView"}, null, null, null, Theme.key_windowBackgroundWhiteGrayText2), new ThemeDescription(listView, 0, new Class[]{TextCheckCell.class}, new String[]{"checkBox"}, null, null, null, Theme.key_switchThumb), new ThemeDescription(listView, 0, new Class[]{TextCheckCell.class}, new String[]{"checkBox"}, null, null, null, Theme.key_switchTrack), new ThemeDescription(listView, 0, new Class[]{TextCheckCell.class}, new String[]{"checkBox"}, null, null, null, Theme.key_switchThumbChecked), new ThemeDescription(listView, 0, new Class[]{TextCheckCell.class}, new String[]{"checkBox"}, null, null, null, Theme.key_switchTrackChecked), new ThemeDescription(listView, 0, new Class[]{HeaderCell.class}, new String[]{"textView"}, null, null, null, Theme.key_windowBackgroundWhiteBlueHeader), new ThemeDescription(listView, 0, new Class[]{TextDetailSettingsCell.class}, new String[]{"textView"}, null, null, null, Theme.key_windowBackgroundWhiteBlackText), new ThemeDescription(listView, 0, new Class[]{TextDetailSettingsCell.class}, new String[]{"valueTextView"}, null, null, null, Theme.key_windowBackgroundWhiteGrayText2), new ThemeDescription(listView, 0, new Class[]{TextInfoCell.class}, new String[]{"textView"}, null, null, null, Theme.key_windowBackgroundWhiteGrayText5), }; }
Example #12
Source File: PhonebookShareActivity.java From TelePlus-Android with GNU General Public License v2.0 | 5 votes |
@Override public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) { switch (holder.getItemViewType()) { case 0: { if (position == overscrollRow) { ((EmptyCell) holder.itemView).setHeight(AndroidUtilities.dp(88)); } else { ((EmptyCell) holder.itemView).setHeight(AndroidUtilities.dp(16)); } break; } case 1: { TextCheckBoxCell cell = (TextCheckBoxCell) holder.itemView; AndroidUtilities.VcardItem item; int icon; if (position >= phoneStartRow && position < phoneEndRow) { item = phones.get(position - phoneStartRow); if (position == phoneStartRow) { icon = R.drawable.profile_phone; } else { icon = 0; } } else { item = other.get(position - vcardStartRow); if (position == vcardStartRow) { icon = R.drawable.profile_info; } else { icon = 0; } } cell.setVCardItem(item, icon); break; } } }
Example #13
Source File: StickersAlert.java From TelePlus-Android with GNU General Public License v2.0 | 5 votes |
@Override public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) { if (stickerSetCovereds != null) { switch (holder.getItemViewType()) { case 0: TLRPC.Document sticker = (TLRPC.Document) cache.get(position); ((StickerEmojiCell) holder.itemView).setSticker(sticker, false); break; case 1: ((EmptyCell) holder.itemView).setHeight(AndroidUtilities.dp(82)); break; case 2: TLRPC.StickerSetCovered stickerSetCovered = stickerSetCovereds.get((Integer) cache.get(position)); FeaturedStickerSetInfoCell cell = (FeaturedStickerSetInfoCell) holder.itemView; cell.setStickerSet(stickerSetCovered, false); /*boolean installing = installingStickerSets.containsKey(stickerSetCovered.set.id); boolean removing = removingStickerSets.containsKey(stickerSetCovered.set.id); if (installing || removing) { if (installing && cell.isInstalled()) { installingStickerSets.remove(stickerSetCovered.set.id); installing = false; } else if (removing && !cell.isInstalled()) { removingStickerSets.remove(stickerSetCovered.set.id); removing = false; } } cell.setDrawProgress(installing || removing);*/ break; } } else { ((StickerEmojiCell) holder.itemView).setSticker(stickerSet.documents.get(position), showEmoji); } }
Example #14
Source File: EmojiView.java From TelePlus-Android with GNU General Public License v2.0 | 5 votes |
@Override public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) { switch (holder.getItemViewType()) { case 0: TLRPC.Document sticker = (TLRPC.Document) cache.get(position); ((StickerEmojiCell) holder.itemView).setSticker(sticker, false); break; case 1: ((EmptyCell) holder.itemView).setHeight(AndroidUtilities.dp(82)); break; case 2: ArrayList<Long> unreadStickers = DataQuery.getInstance(currentAccount).getUnreadStickerSets(); TLRPC.StickerSetCovered stickerSetCovered = sets.get((Integer) cache.get(position)); boolean unread = unreadStickers != null && unreadStickers.contains(stickerSetCovered.set.id); FeaturedStickerSetInfoCell cell = (FeaturedStickerSetInfoCell) holder.itemView; cell.setStickerSet(stickerSetCovered, unread); if (unread) { DataQuery.getInstance(currentAccount).markFaturedStickersByIdAsRead(stickerSetCovered.set.id); } boolean installing = installingStickerSets.indexOfKey(stickerSetCovered.set.id) >= 0; boolean removing = removingStickerSets.indexOfKey(stickerSetCovered.set.id) >= 0; if (installing || removing) { if (installing && cell.isInstalled()) { installingStickerSets.remove(stickerSetCovered.set.id); installing = false; } else if (removing && !cell.isInstalled()) { removingStickerSets.remove(stickerSetCovered.set.id); removing = false; } } cell.setDrawProgress(installing || removing); break; } }
Example #15
Source File: FeaturedSettingsActivity.java From TelePlus-Android with GNU General Public License v2.0 | 5 votes |
@Override public ThemeDescription[] getThemeDescriptions() { return new ThemeDescription[] { new ThemeDescription(actionBar, ThemeDescription.FLAG_BACKGROUND, null, null, null, null, Theme.key_actionBarDefault), new ThemeDescription(actionBar, ThemeDescription.FLAG_AB_ITEMSCOLOR, null, null, null, null, Theme.key_actionBarDefaultIcon), new ThemeDescription(actionBar, ThemeDescription.FLAG_AB_TITLECOLOR, null, null, null, null, Theme.key_actionBarDefaultTitle), new ThemeDescription(actionBar, ThemeDescription.FLAG_AB_SELECTORCOLOR, null, null, null, null, Theme.key_actionBarDefaultSelector), new ThemeDescription(listView, ThemeDescription.FLAG_CELLBACKGROUNDCOLOR, new Class[]{EmptyCell.class, TextSettingsCell.class, TextCheckCell.class, HeaderCell.class, TextInfoCell.class, TextDetailSettingsCell.class}, null, null, null, Theme.key_windowBackgroundWhite), new ThemeDescription(listView, ThemeDescription.FLAG_LISTGLOWCOLOR, null, null, null, null, Theme.key_avatar_backgroundActionBarBlue), new ThemeDescription(listView, ThemeDescription.FLAG_SELECTOR, null, null, null, null, Theme.key_listSelector), new ThemeDescription(listView, 0, new Class[]{View.class}, Theme.dividerPaint, null, null, Theme.key_divider), new ThemeDescription(listView, ThemeDescription.FLAG_BACKGROUNDFILTER, new Class[]{ShadowSectionCell.class}, null, null, null, Theme.key_windowBackgroundGrayShadow), new ThemeDescription(listView, 0, new Class[]{TextSettingsCell.class}, new String[]{"textView"}, null, null, null, Theme.key_windowBackgroundWhiteBlackText), new ThemeDescription(listView, 0, new Class[]{TextSettingsCell.class}, new String[]{"valueTextView"}, null, null, null, Theme.key_windowBackgroundWhiteValueText), new ThemeDescription(listView, 0, new Class[]{TextCheckCell.class}, new String[]{"textView"}, null, null, null, Theme.key_windowBackgroundWhiteBlackText), new ThemeDescription(listView, 0, new Class[]{TextCheckCell.class}, new String[]{"valueTextView"}, null, null, null, Theme.key_windowBackgroundWhiteGrayText2), new ThemeDescription(listView, 0, new Class[]{TextCheckCell.class}, new String[]{"checkBox"}, null, null, null, Theme.key_switchThumb), new ThemeDescription(listView, 0, new Class[]{TextCheckCell.class}, new String[]{"checkBox"}, null, null, null, Theme.key_switchTrack), new ThemeDescription(listView, 0, new Class[]{TextCheckCell.class}, new String[]{"checkBox"}, null, null, null, Theme.key_switchThumbChecked), new ThemeDescription(listView, 0, new Class[]{TextCheckCell.class}, new String[]{"checkBox"}, null, null, null, Theme.key_switchTrackChecked), new ThemeDescription(listView, 0, new Class[]{HeaderCell.class}, new String[]{"textView"}, null, null, null, Theme.key_windowBackgroundWhiteBlueHeader), new ThemeDescription(listView, 0, new Class[]{TextDetailSettingsCell.class}, new String[]{"textView"}, null, null, null, Theme.key_windowBackgroundWhiteBlackText), new ThemeDescription(listView, 0, new Class[]{TextDetailSettingsCell.class}, new String[]{"valueTextView"}, null, null, null, Theme.key_windowBackgroundWhiteGrayText2), new ThemeDescription(listView, 0, new Class[]{TextInfoCell.class}, new String[]{"textView"}, null, null, null, Theme.key_windowBackgroundWhiteGrayText5), }; }
Example #16
Source File: TabsSettingsActivity.java From TelePlus-Android with GNU General Public License v2.0 | 5 votes |
@Override public ThemeDescription[] getThemeDescriptions() { return new ThemeDescription[] { new ThemeDescription(actionBar, ThemeDescription.FLAG_BACKGROUND, null, null, null, null, Theme.key_actionBarDefault), new ThemeDescription(actionBar, ThemeDescription.FLAG_AB_ITEMSCOLOR, null, null, null, null, Theme.key_actionBarDefaultIcon), new ThemeDescription(actionBar, ThemeDescription.FLAG_AB_TITLECOLOR, null, null, null, null, Theme.key_actionBarDefaultTitle), new ThemeDescription(actionBar, ThemeDescription.FLAG_AB_SELECTORCOLOR, null, null, null, null, Theme.key_actionBarDefaultSelector), new ThemeDescription(listView, ThemeDescription.FLAG_CELLBACKGROUNDCOLOR, new Class[]{EmptyCell.class, TextSettingsCell.class, TextCheckCell.class, HeaderCell.class, TextInfoCell.class, TextDetailSettingsCell.class}, null, null, null, Theme.key_windowBackgroundWhite), new ThemeDescription(listView, ThemeDescription.FLAG_LISTGLOWCOLOR, null, null, null, null, Theme.key_avatar_backgroundActionBarBlue), new ThemeDescription(listView, ThemeDescription.FLAG_SELECTOR, null, null, null, null, Theme.key_listSelector), new ThemeDescription(listView, 0, new Class[]{View.class}, Theme.dividerPaint, null, null, Theme.key_divider), new ThemeDescription(listView, ThemeDescription.FLAG_BACKGROUNDFILTER, new Class[]{ShadowSectionCell.class}, null, null, null, Theme.key_windowBackgroundGrayShadow), new ThemeDescription(listView, 0, new Class[]{TextSettingsCell.class}, new String[]{"textView"}, null, null, null, Theme.key_windowBackgroundWhiteBlackText), new ThemeDescription(listView, 0, new Class[]{TextSettingsCell.class}, new String[]{"valueTextView"}, null, null, null, Theme.key_windowBackgroundWhiteValueText), new ThemeDescription(listView, 0, new Class[]{TextCheckCell.class}, new String[]{"textView"}, null, null, null, Theme.key_windowBackgroundWhiteBlackText), new ThemeDescription(listView, 0, new Class[]{TextCheckCell.class}, new String[]{"valueTextView"}, null, null, null, Theme.key_windowBackgroundWhiteGrayText2), new ThemeDescription(listView, 0, new Class[]{TextCheckCell.class}, new String[]{"checkBox"}, null, null, null, Theme.key_switchThumb), new ThemeDescription(listView, 0, new Class[]{TextCheckCell.class}, new String[]{"checkBox"}, null, null, null, Theme.key_switchTrack), new ThemeDescription(listView, 0, new Class[]{TextCheckCell.class}, new String[]{"checkBox"}, null, null, null, Theme.key_switchThumbChecked), new ThemeDescription(listView, 0, new Class[]{TextCheckCell.class}, new String[]{"checkBox"}, null, null, null, Theme.key_switchTrackChecked), new ThemeDescription(listView, 0, new Class[]{HeaderCell.class}, new String[]{"textView"}, null, null, null, Theme.key_windowBackgroundWhiteBlueHeader), new ThemeDescription(listView, 0, new Class[]{TextDetailSettingsCell.class}, new String[]{"textView"}, null, null, null, Theme.key_windowBackgroundWhiteBlackText), new ThemeDescription(listView, 0, new Class[]{TextDetailSettingsCell.class}, new String[]{"valueTextView"}, null, null, null, Theme.key_windowBackgroundWhiteGrayText2), new ThemeDescription(listView, 0, new Class[]{TextInfoCell.class}, new String[]{"textView"}, null, null, null, Theme.key_windowBackgroundWhiteGrayText5), }; }
Example #17
Source File: SettingsActivity.java From TelePlus-Android with GNU General Public License v2.0 | 4 votes |
@Override public ThemeDescription[] getThemeDescriptions() { return new ThemeDescription[]{ new ThemeDescription(listView, ThemeDescription.FLAG_CELLBACKGROUNDCOLOR, new Class[]{EmptyCell.class, TextSettingsCell.class, TextCheckCell.class, HeaderCell.class, TextInfoCell.class, TextDetailSettingsCell.class}, null, null, null, Theme.key_windowBackgroundWhite), new ThemeDescription(fragmentView, ThemeDescription.FLAG_BACKGROUND, null, null, null, null, Theme.key_windowBackgroundGray), new ThemeDescription(actionBar, ThemeDescription.FLAG_BACKGROUND, null, null, null, null, Theme.key_avatar_backgroundActionBarBlue), new ThemeDescription(listView, ThemeDescription.FLAG_LISTGLOWCOLOR, null, null, null, null, Theme.key_avatar_backgroundActionBarBlue), new ThemeDescription(extraHeightView, ThemeDescription.FLAG_BACKGROUND, null, null, null, null, Theme.key_avatar_backgroundActionBarBlue), new ThemeDescription(actionBar, ThemeDescription.FLAG_AB_ITEMSCOLOR, null, null, null, null, Theme.key_avatar_actionBarIconBlue), new ThemeDescription(actionBar, ThemeDescription.FLAG_AB_TITLECOLOR, null, null, null, null, Theme.key_actionBarDefaultTitle), new ThemeDescription(actionBar, ThemeDescription.FLAG_AB_SELECTORCOLOR, null, null, null, null, Theme.key_avatar_actionBarSelectorBlue), new ThemeDescription(nameTextView, ThemeDescription.FLAG_TEXTCOLOR, null, null, null, null, Theme.key_profile_title), new ThemeDescription(onlineTextView, ThemeDescription.FLAG_TEXTCOLOR, null, null, null, null, Theme.key_avatar_subtitleInProfileBlue), new ThemeDescription(actionBar, ThemeDescription.FLAG_AB_SUBMENUBACKGROUND, null, null, null, null, Theme.key_actionBarDefaultSubmenuBackground), new ThemeDescription(actionBar, ThemeDescription.FLAG_AB_SUBMENUITEM, null, null, null, null, Theme.key_actionBarDefaultSubmenuItem), new ThemeDescription(listView, ThemeDescription.FLAG_SELECTOR, null, null, null, null, Theme.key_listSelector), new ThemeDescription(listView, 0, new Class[]{View.class}, Theme.dividerPaint, null, null, Theme.key_divider), new ThemeDescription(listView, ThemeDescription.FLAG_BACKGROUNDFILTER, new Class[]{ShadowSectionCell.class}, null, null, null, Theme.key_windowBackgroundGrayShadow), new ThemeDescription(listView, 0, new Class[]{TextSettingsCell.class}, new String[]{"textView"}, null, null, null, Theme.key_windowBackgroundWhiteBlackText), new ThemeDescription(listView, 0, new Class[]{TextSettingsCell.class}, new String[]{"valueTextView"}, null, null, null, Theme.key_windowBackgroundWhiteValueText), new ThemeDescription(listView, 0, new Class[]{TextCheckCell.class}, new String[]{"textView"}, null, null, null, Theme.key_windowBackgroundWhiteBlackText), new ThemeDescription(listView, 0, new Class[]{TextCheckCell.class}, new String[]{"valueTextView"}, null, null, null, Theme.key_windowBackgroundWhiteGrayText2), new ThemeDescription(listView, 0, new Class[]{TextCheckCell.class}, new String[]{"checkBox"}, null, null, null, Theme.key_switchThumb), new ThemeDescription(listView, 0, new Class[]{TextCheckCell.class}, new String[]{"checkBox"}, null, null, null, Theme.key_switchTrack), new ThemeDescription(listView, 0, new Class[]{TextCheckCell.class}, new String[]{"checkBox"}, null, null, null, Theme.key_switchThumbChecked), new ThemeDescription(listView, 0, new Class[]{TextCheckCell.class}, new String[]{"checkBox"}, null, null, null, Theme.key_switchTrackChecked), new ThemeDescription(listView, 0, new Class[]{HeaderCell.class}, new String[]{"textView"}, null, null, null, Theme.key_windowBackgroundWhiteBlueHeader), new ThemeDescription(listView, 0, new Class[]{TextDetailSettingsCell.class}, new String[]{"textView"}, null, null, null, Theme.key_windowBackgroundWhiteBlackText), new ThemeDescription(listView, 0, new Class[]{TextDetailSettingsCell.class}, new String[]{"valueTextView"}, null, null, null, Theme.key_windowBackgroundWhiteGrayText2), new ThemeDescription(listView, 0, new Class[]{TextInfoCell.class}, new String[]{"textView"}, null, null, null, Theme.key_windowBackgroundWhiteGrayText5), new ThemeDescription(avatarImage, 0, null, null, new Drawable[]{Theme.avatar_photoDrawable, Theme.avatar_broadcastDrawable, Theme.avatar_savedDrawable}, null, Theme.key_avatar_text), new ThemeDescription(avatarImage, 0, null, null, new Drawable[]{avatarDrawable}, null, Theme.key_avatar_backgroundInProfileBlue), new ThemeDescription(writeButton, ThemeDescription.FLAG_IMAGECOLOR, null, null, null, null, Theme.key_profile_actionIcon), new ThemeDescription(writeButton, ThemeDescription.FLAG_BACKGROUNDFILTER, null, null, null, null, Theme.key_profile_actionBackground), new ThemeDescription(writeButton, ThemeDescription.FLAG_BACKGROUNDFILTER | ThemeDescription.FLAG_DRAWABLESELECTEDSTATE, null, null, null, null, Theme.key_profile_actionPressedBackground), }; }
Example #18
Source File: TabsSettingsActivity.java From TelePlus-Android with GNU General Public License v2.0 | 4 votes |
@Override public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) { switch (holder.getItemViewType()) { case 0: ((EmptyCell) holder.itemView).setHeight(AndroidUtilities.dp(16)); break; case 2: { TextCheckCell textCell = (TextCheckCell) holder.itemView; if (position == actionBarCastShadows) { textCell.setTextAndCheck(LocaleController.getString("ActionBarCastShadows", R.string.ActionBarCastShadows), FeaturedSettings.tabSettings.actionBarCastShadows, true); } else if (position == tabsSettingsHideTabsRow) { textCell.setTextAndCheck(LocaleController.getString("HideTabs", R.string.HideTabs), FeaturedSettings.tabSettings.hideTabs, true); } else if (position == tabsSettingsTabsToBottomRow) textCell.setTextAndCheck(LocaleController.getString("TabsToBottom", R.string.TabsToBottom), FeaturedSettings.tabSettings.tabsToBottom, true); else if (position == tabsSettingsHideAllRow) textCell.setTextAndCheck(LocaleController.getString("TabsHideAll", R.string.TabsHideAll), FeaturedSettings.tabSettings.hideALl, true); else if (position == tabsSettingsHideUsersRow) textCell.setTextAndCheck(LocaleController.getString("TabsHideUsers", R.string.TabsHideUsers), FeaturedSettings.tabSettings.hideUsers, true); else if (position == tabsSettingsHideGroupsRow) textCell.setTextAndCheck(LocaleController.getString("TabsHideGroups", R.string.TabsHideGroups), FeaturedSettings.tabSettings.hideGroups, true); else if (position == tabsSettingsHideSuperGroupsRow) textCell.setTextAndCheck(LocaleController.getString("TabsHideSuperGroups", R.string.TabsHideSuperGroups), FeaturedSettings.tabSettings.hideSuperGroups, true); else if (position == tabsSettingsHideChannelsRow) textCell.setTextAndCheck(LocaleController.getString("TabsHideChannels", R.string.TabsHideChannels), FeaturedSettings.tabSettings.hideChannels, true); else if (position == tabsSettingsHideBotsRow) textCell.setTextAndCheck(LocaleController.getString("TabsHideBots", R.string.TabsHideBots), FeaturedSettings.tabSettings.hideBots, true); else if (position == tabsSettingsHideFavoritesRow) textCell.setTextAndCheck(LocaleController.getString("TabsHideFavorites", R.string.TabsHideFavorites), FeaturedSettings.tabSettings.hideFavorites, true); else if (position == tabsSettingsHideAdminsRow) textCell.setTextAndCheck(LocaleController.getString("TabsHideAdmins", R.string.TabsHideAdmins), FeaturedSettings.tabSettings.hideAdmins, true); else if (position == tabsSettingsHideUnreadsRow) textCell.setTextAndCheck(LocaleController.getString("TabsHideUnread", R.string.TabsHideUnread), FeaturedSettings.tabSettings.hideUnreads, false); } break; } }
Example #19
Source File: LocationActivityAdapter.java From TelePlus-Android with GNU General Public License v2.0 | 4 votes |
@Override public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) { switch (holder.getItemViewType()) { case 0: ((EmptyCell) holder.itemView).setHeight(overScrollHeight); break; case 1: sendLocationCell = (SendLocationCell) holder.itemView; updateCell(); break; case 2: if (currentMessageObject != null) { ((GraySectionCell) holder.itemView).setText(LocaleController.getString("LiveLocations", R.string.LiveLocations)); } else if (pulledUp) { ((GraySectionCell) holder.itemView).setText(LocaleController.getString("NearbyPlaces", R.string.NearbyPlaces)); } else { ((GraySectionCell) holder.itemView).setText(LocaleController.getString("ShowNearbyPlaces", R.string.ShowNearbyPlaces)); } break; case 3: if (liveLocationType == 0) { ((LocationCell) holder.itemView).setLocation(places.get(position - 3), iconUrls.get(position - 3), true); } else { ((LocationCell) holder.itemView).setLocation(places.get(position - 4), iconUrls.get(position - 4), true); } break; case 4: ((LocationLoadingCell) holder.itemView).setLoading(searching); break; case 6: ((SendLocationCell) holder.itemView).setHasLocation(gpsLocation != null); break; case 7: if (currentMessageObject != null && position == 1) { ((SharingLiveLocationCell) holder.itemView).setDialog(currentMessageObject, gpsLocation); } else { ((SharingLiveLocationCell) holder.itemView).setDialog(currentLiveLocations.get(position - (currentMessageObject != null ? 4 : 2)), gpsLocation); } break; } }
Example #20
Source File: TabsSettingsActivity.java From TelePlus-Android with GNU General Public License v2.0 | 4 votes |
@Override public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) { switch (holder.getItemViewType()) { case 0: ((EmptyCell) holder.itemView).setHeight(AndroidUtilities.dp(16)); break; case 2: { TextCheckCell textCell = (TextCheckCell) holder.itemView; if (position == actionBarCastShadows) { textCell.setTextAndCheck(LocaleController.getString("ActionBarCastShadows", R.string.ActionBarCastShadows), FeaturedSettings.tabSettings.actionBarCastShadows, true); } else if (position == tabsSettingsHideTabsRow) { textCell.setTextAndCheck(LocaleController.getString("HideTabs", R.string.HideTabs), FeaturedSettings.tabSettings.hideTabs, true); } else if (position == tabsSettingsTabsToBottomRow) textCell.setTextAndCheck(LocaleController.getString("TabsToBottom", R.string.TabsToBottom), FeaturedSettings.tabSettings.tabsToBottom, true); else if (position == tabsSettingsHideAllRow) textCell.setTextAndCheck(LocaleController.getString("TabsHideAll", R.string.TabsHideAll), FeaturedSettings.tabSettings.hideALl, true); else if (position == tabsSettingsHideUsersRow) textCell.setTextAndCheck(LocaleController.getString("TabsHideUsers", R.string.TabsHideUsers), FeaturedSettings.tabSettings.hideUsers, true); else if (position == tabsSettingsHideGroupsRow) textCell.setTextAndCheck(LocaleController.getString("TabsHideGroups", R.string.TabsHideGroups), FeaturedSettings.tabSettings.hideGroups, true); else if (position == tabsSettingsHideSuperGroupsRow) textCell.setTextAndCheck(LocaleController.getString("TabsHideSuperGroups", R.string.TabsHideSuperGroups), FeaturedSettings.tabSettings.hideSuperGroups, true); else if (position == tabsSettingsHideChannelsRow) textCell.setTextAndCheck(LocaleController.getString("TabsHideChannels", R.string.TabsHideChannels), FeaturedSettings.tabSettings.hideChannels, true); else if (position == tabsSettingsHideBotsRow) textCell.setTextAndCheck(LocaleController.getString("TabsHideBots", R.string.TabsHideBots), FeaturedSettings.tabSettings.hideBots, true); else if (position == tabsSettingsHideFavoritesRow) textCell.setTextAndCheck(LocaleController.getString("TabsHideFavorites", R.string.TabsHideFavorites), FeaturedSettings.tabSettings.hideFavorites, true); else if (position == tabsSettingsHideAdminsRow) textCell.setTextAndCheck(LocaleController.getString("TabsHideAdmins", R.string.TabsHideAdmins), FeaturedSettings.tabSettings.hideAdmins, true); else if (position == tabsSettingsHideUnreadsRow) textCell.setTextAndCheck(LocaleController.getString("TabsHideUnread", R.string.TabsHideUnread), FeaturedSettings.tabSettings.hideUnreads, false); } break; } }
Example #21
Source File: SettingsActivity.java From TelePlus-Android with GNU General Public License v2.0 | 4 votes |
@Override public ThemeDescription[] getThemeDescriptions() { return new ThemeDescription[]{ new ThemeDescription(listView, ThemeDescription.FLAG_CELLBACKGROUNDCOLOR, new Class[]{EmptyCell.class, TextSettingsCell.class, TextCheckCell.class, HeaderCell.class, TextInfoCell.class, TextDetailSettingsCell.class}, null, null, null, Theme.key_windowBackgroundWhite), new ThemeDescription(fragmentView, ThemeDescription.FLAG_BACKGROUND, null, null, null, null, Theme.key_windowBackgroundGray), new ThemeDescription(actionBar, ThemeDescription.FLAG_BACKGROUND, null, null, null, null, Theme.key_avatar_backgroundActionBarBlue), new ThemeDescription(listView, ThemeDescription.FLAG_LISTGLOWCOLOR, null, null, null, null, Theme.key_avatar_backgroundActionBarBlue), new ThemeDescription(extraHeightView, ThemeDescription.FLAG_BACKGROUND, null, null, null, null, Theme.key_avatar_backgroundActionBarBlue), new ThemeDescription(actionBar, ThemeDescription.FLAG_AB_ITEMSCOLOR, null, null, null, null, Theme.key_avatar_actionBarIconBlue), new ThemeDescription(actionBar, ThemeDescription.FLAG_AB_TITLECOLOR, null, null, null, null, Theme.key_actionBarDefaultTitle), new ThemeDescription(actionBar, ThemeDescription.FLAG_AB_SELECTORCOLOR, null, null, null, null, Theme.key_avatar_actionBarSelectorBlue), new ThemeDescription(nameTextView, ThemeDescription.FLAG_TEXTCOLOR, null, null, null, null, Theme.key_profile_title), new ThemeDescription(onlineTextView, ThemeDescription.FLAG_TEXTCOLOR, null, null, null, null, Theme.key_avatar_subtitleInProfileBlue), new ThemeDescription(actionBar, ThemeDescription.FLAG_AB_SUBMENUBACKGROUND, null, null, null, null, Theme.key_actionBarDefaultSubmenuBackground), new ThemeDescription(actionBar, ThemeDescription.FLAG_AB_SUBMENUITEM, null, null, null, null, Theme.key_actionBarDefaultSubmenuItem), new ThemeDescription(listView, ThemeDescription.FLAG_SELECTOR, null, null, null, null, Theme.key_listSelector), new ThemeDescription(listView, 0, new Class[]{View.class}, Theme.dividerPaint, null, null, Theme.key_divider), new ThemeDescription(listView, ThemeDescription.FLAG_BACKGROUNDFILTER, new Class[]{ShadowSectionCell.class}, null, null, null, Theme.key_windowBackgroundGrayShadow), new ThemeDescription(listView, 0, new Class[]{TextSettingsCell.class}, new String[]{"textView"}, null, null, null, Theme.key_windowBackgroundWhiteBlackText), new ThemeDescription(listView, 0, new Class[]{TextSettingsCell.class}, new String[]{"valueTextView"}, null, null, null, Theme.key_windowBackgroundWhiteValueText), new ThemeDescription(listView, 0, new Class[]{TextCheckCell.class}, new String[]{"textView"}, null, null, null, Theme.key_windowBackgroundWhiteBlackText), new ThemeDescription(listView, 0, new Class[]{TextCheckCell.class}, new String[]{"valueTextView"}, null, null, null, Theme.key_windowBackgroundWhiteGrayText2), new ThemeDescription(listView, 0, new Class[]{TextCheckCell.class}, new String[]{"checkBox"}, null, null, null, Theme.key_switchThumb), new ThemeDescription(listView, 0, new Class[]{TextCheckCell.class}, new String[]{"checkBox"}, null, null, null, Theme.key_switchTrack), new ThemeDescription(listView, 0, new Class[]{TextCheckCell.class}, new String[]{"checkBox"}, null, null, null, Theme.key_switchThumbChecked), new ThemeDescription(listView, 0, new Class[]{TextCheckCell.class}, new String[]{"checkBox"}, null, null, null, Theme.key_switchTrackChecked), new ThemeDescription(listView, 0, new Class[]{HeaderCell.class}, new String[]{"textView"}, null, null, null, Theme.key_windowBackgroundWhiteBlueHeader), new ThemeDescription(listView, 0, new Class[]{TextDetailSettingsCell.class}, new String[]{"textView"}, null, null, null, Theme.key_windowBackgroundWhiteBlackText), new ThemeDescription(listView, 0, new Class[]{TextDetailSettingsCell.class}, new String[]{"valueTextView"}, null, null, null, Theme.key_windowBackgroundWhiteGrayText2), new ThemeDescription(listView, 0, new Class[]{TextInfoCell.class}, new String[]{"textView"}, null, null, null, Theme.key_windowBackgroundWhiteGrayText5), new ThemeDescription(avatarImage, 0, null, null, new Drawable[]{Theme.avatar_photoDrawable, Theme.avatar_broadcastDrawable, Theme.avatar_savedDrawable}, null, Theme.key_avatar_text), new ThemeDescription(avatarImage, 0, null, null, new Drawable[]{avatarDrawable}, null, Theme.key_avatar_backgroundInProfileBlue), new ThemeDescription(writeButton, ThemeDescription.FLAG_IMAGECOLOR, null, null, null, null, Theme.key_profile_actionIcon), new ThemeDescription(writeButton, ThemeDescription.FLAG_BACKGROUNDFILTER, null, null, null, null, Theme.key_profile_actionBackground), new ThemeDescription(writeButton, ThemeDescription.FLAG_BACKGROUNDFILTER | ThemeDescription.FLAG_DRAWABLESELECTEDSTATE, null, null, null, null, Theme.key_profile_actionPressedBackground), }; }
Example #22
Source File: LocationActivityAdapter.java From TelePlus-Android with GNU General Public License v2.0 | 4 votes |
@Override public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) { switch (holder.getItemViewType()) { case 0: ((EmptyCell) holder.itemView).setHeight(overScrollHeight); break; case 1: sendLocationCell = (SendLocationCell) holder.itemView; updateCell(); break; case 2: if (currentMessageObject != null) { ((GraySectionCell) holder.itemView).setText(LocaleController.getString("LiveLocations", R.string.LiveLocations)); } else if (pulledUp) { ((GraySectionCell) holder.itemView).setText(LocaleController.getString("NearbyPlaces", R.string.NearbyPlaces)); } else { ((GraySectionCell) holder.itemView).setText(LocaleController.getString("ShowNearbyPlaces", R.string.ShowNearbyPlaces)); } break; case 3: if (liveLocationType == 0) { ((LocationCell) holder.itemView).setLocation(places.get(position - 3), iconUrls.get(position - 3), true); } else { ((LocationCell) holder.itemView).setLocation(places.get(position - 4), iconUrls.get(position - 4), true); } break; case 4: ((LocationLoadingCell) holder.itemView).setLoading(searching); break; case 6: ((SendLocationCell) holder.itemView).setHasLocation(gpsLocation != null); break; case 7: if (currentMessageObject != null && position == 1) { ((SharingLiveLocationCell) holder.itemView).setDialog(currentMessageObject, gpsLocation); } else { ((SharingLiveLocationCell) holder.itemView).setDialog(currentLiveLocations.get(position - (currentMessageObject != null ? 4 : 2)), gpsLocation); } break; } }