Android examples for android.view:View
clean Item Selection
import android.content.Context; import android.graphics.drawable.Drawable; import android.graphics.drawable.GradientDrawable; import android.os.Build; import android.support.v4.widget.SlidingPaneLayout; import android.view.View; import android.widget.ListView; public class Main{ public static void cleanItemSelection(View item) { int sdk = android.os.Build.VERSION.SDK_INT; if (item != null) { item.setSelected(false);//from w ww . j a va2 s . co m if (sdk >= Build.VERSION_CODES.HONEYCOMB) { deactivate(item); } item.setFocusable(false); } } private static void deactivate(View item) { item.setActivated(false); } }