Android How To Make an AlertDialog

folder_openSnippets, Tutorial
commentNo Comments
To make an AlertDialog you have to write this code: AlertDialog.Builder alertDelete = new AlertDialog.Builder(ListsActivity.this); //HERE YOU WILL WRITE THE MESSAGE YOU WANT alertDelete.setMessage(R.string.delete_confirm); //HERE IS THE POSITIVE BUTTON. YOU HAVE TO SET THE BUTTON NAME AND A CLICK LISTENER…
Read More

How to make a background button selector in XML?

turned_in_not, , , ,
comment2 Comments
Step 1: Create an XML in the drawable folder and name it selected_item.xml (or any another name you want but to be suggestive). The code in this xml will be: <shape android="" shape="rectangle"> <solid color="#80000000"></solid> </shape> The color=”#80000000″ is transparent black.…
Read More