Java Code Examples for org.telegram.ui.Components.CombinedDrawable#setFullsize()

The following examples show how to use org.telegram.ui.Components.CombinedDrawable#setFullsize() . 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: StatisticActivity.java    From Telegram-FOSS with GNU General Public License v2.0 6 votes vote down vote up
private void recolorRecyclerItem(View child) {
    if (child instanceof ChartCell) {
        ((ChartCell) child).recolor();
    }

    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);
    }

    if (child instanceof OverviewCell) {
        ((OverviewCell) child).updateColors();
    }
}
 
Example 2
Source File: StatisticActivity.java    From Telegram with GNU General Public License v2.0 6 votes vote down vote up
private void recolorRecyclerItem(View child) {
    if (child instanceof ChartCell) {
        ((ChartCell) child).recolor();
    }

    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);
    }

    if (child instanceof OverviewCell) {
        ((OverviewCell) child).updateColors();
    }
}
 
Example 3
Source File: ShadowSectionCell.java    From Telegram-FOSS with GNU General Public License v2.0 5 votes vote down vote up
public ShadowSectionCell(Context context, int s, int backgroundColor) {
    super(context);
    Drawable shadowDrawable = Theme.getThemedDrawable(context, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow);
    Drawable background = new ColorDrawable(backgroundColor);
    CombinedDrawable combinedDrawable = new CombinedDrawable(background, shadowDrawable, 0, 0);
    combinedDrawable.setFullsize(true);
    setBackgroundDrawable(combinedDrawable);
    size = s;
}
 
Example 4
Source File: ShadowSectionCell.java    From Telegram with GNU General Public License v2.0 5 votes vote down vote up
public ShadowSectionCell(Context context, int s, int backgroundColor) {
    super(context);
    Drawable shadowDrawable = Theme.getThemedDrawable(context, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow);
    Drawable background = new ColorDrawable(backgroundColor);
    CombinedDrawable combinedDrawable = new CombinedDrawable(background, shadowDrawable, 0, 0);
    combinedDrawable.setFullsize(true);
    setBackgroundDrawable(combinedDrawable);
    size = s;
}