Java tutorial
//package com.java2s; import android.graphics.Color; import android.graphics.PorterDuff; import android.widget.Button; public class Main { public static void disableButton(Button button) { button.getBackground().setColorFilter(Color.GRAY, PorterDuff.Mode.MULTIPLY); button.setEnabled(false); } }