Android – Keep ListView’s item highlighted once one has been clicked

Put a position variable for selected item. Change the position in onItemClicked() method. Check the selected position in List Adapter inside getView() and set the background for the selected item. public class TestAdapter extends BaseAdapter { private Context context; private ArrayList<TestList> testList; private int selectedIndex; private int selectedColor = Color.parseColor(“#1b1b1b”); public TestAdapter(Context ctx, ArrayList<TestList> testList) … Read more

How to stop highlighting of a div element when double-clicking

The CSS below stops users from being able to select text. Live example: http://jsfiddle.net/hGTwu/20/ /* If you want to implement it in very old browser-versions */ -webkit-user-select: none; /* Chrome/Safari */ -moz-user-select: none; /* Firefox */ -ms-user-select: none; /* IE10+ */ /* The rule below is not implemented in browsers yet */ -o-user-select: none; /* … Read more