Android examples for User Interface:View Alpha
set View Alpha Zero
//package com.java2s; import android.view.View; public class Main { public static void setAlphaZero(View view) { if (view != null) { view.setAlpha(0);//from w w w . j a v a 2 s . c o m } } public static void setAlpha(float percentageCanSee, View view) { if (percentageCanSee < 0) { percentageCanSee = 0; } if (percentageCanSee > 1) { percentageCanSee = 1; } view.setAlpha(percentageCanSee * 255); } }