Search in sources :

Example 1 with ChartHeaderView

use of org.telegram.ui.Charts.view_data.ChartHeaderView in project Telegram-FOSS by Telegram-FOSS-Team.

the class MessageStatisticActivity method recolorRecyclerItem.

private void recolorRecyclerItem(View child) {
    if (child instanceof ManageChatUserCell) {
        ((ManageChatUserCell) child).update(0);
    } else if (child instanceof StatisticActivity.BaseChartCell) {
        ((StatisticActivity.BaseChartCell) child).recolor();
        child.setBackgroundColor(Theme.getColor(Theme.key_windowBackgroundWhite));
    } else if (child instanceof ShadowSectionCell) {
        Drawable shadowDrawable = Theme.getThemedDrawable(ApplicationLoader.applicationContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow);
        Drawable background = new ColorDrawable(Theme.getColor(Theme.key_windowBackgroundGray));
        CombinedDrawable combinedDrawable = new CombinedDrawable(background, shadowDrawable, 0, 0);
        combinedDrawable.setFullsize(true);
        child.setBackground(combinedDrawable);
    } else if (child instanceof ChartHeaderView) {
        ((ChartHeaderView) child).recolor();
    } else if (child instanceof OverviewCell) {
        ((OverviewCell) child).updateColors();
        child.setBackgroundColor(Theme.getColor(Theme.key_windowBackgroundWhite));
    }
    if (child instanceof EmptyCell) {
        child.setBackgroundColor(Theme.getColor(Theme.key_windowBackgroundWhite));
    }
}
Also used : ManageChatUserCell(org.telegram.ui.Cells.ManageChatUserCell) ShadowSectionCell(org.telegram.ui.Cells.ShadowSectionCell) ColorDrawable(android.graphics.drawable.ColorDrawable) CombinedDrawable(org.telegram.ui.Components.CombinedDrawable) ColorDrawable(android.graphics.drawable.ColorDrawable) Drawable(android.graphics.drawable.Drawable) CombinedDrawable(org.telegram.ui.Components.CombinedDrawable) BackDrawable(org.telegram.ui.ActionBar.BackDrawable) EmptyCell(org.telegram.ui.Cells.EmptyCell) ChartHeaderView(org.telegram.ui.Charts.view_data.ChartHeaderView)

Aggregations

ColorDrawable (android.graphics.drawable.ColorDrawable)1 Drawable (android.graphics.drawable.Drawable)1 BackDrawable (org.telegram.ui.ActionBar.BackDrawable)1 EmptyCell (org.telegram.ui.Cells.EmptyCell)1 ManageChatUserCell (org.telegram.ui.Cells.ManageChatUserCell)1 ShadowSectionCell (org.telegram.ui.Cells.ShadowSectionCell)1 ChartHeaderView (org.telegram.ui.Charts.view_data.ChartHeaderView)1 CombinedDrawable (org.telegram.ui.Components.CombinedDrawable)1