set Child View Background Color - Android User Interface

Android examples for User Interface:View Child

Description

set Child View Background Color

Demo Code


//package com.java2s;

import android.view.View;

public class Main {
    public static void setBackgroundColor(View container, int id, int color) {
        if (container == null)
            return;

        container.findViewById(id).setBackgroundColor(color);
    }/*w  w  w .j a va2s . co  m*/
}

Related Tutorials