Snippets

Small pieces of code that can be copy/paste-ed on your project

  1. Home
  2. chevron_right
  3. Snippets
  4. (Page 5)

Android Vibrate on Click

If you want to make the phone to vibrate when you click on a button from your application: 1. You have to declare in your AndroidManifest.xml the permission: <uses-permission android:name="android.permission.VIBRATE"/>…
Read More

Android How To Make an AlertDialog

Snippets, Tutorial
No 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…
Read More
Menu