set Refresh Layout Color - Android Graphics

Android examples for Graphics:Color

Description

set Refresh Layout Color

Demo Code


//package com.java2s;
import android.content.Context;
import android.content.res.Resources;

import android.support.v4.widget.SwipeRefreshLayout;

public class Main {
    public static void setRefreshLayoutColor(
            SwipeRefreshLayout refreshLayout, Context context) {
        Resources resources = context.getResources();
        refreshLayout.setColorSchemeColors(
                resources.getColor(android.R.color.holo_blue_bright),
                resources.getColor(android.R.color.holo_green_light),
                resources.getColor(android.R.color.holo_orange_light),
                resources.getColor(android.R.color.holo_red_light));
    }//from  w  w  w .  ja  v  a 2s .  com
}

Related Tutorials