Solutions

Android PreferenceScreen

If you encounter this problem: “CheckBoxPreference is not allowed here” or other preference tag and your xml file is all red is because you create the xml in res/layout and you must create it in res/xml. So you have to make a new directory in res called “xml” and this is where your preferences xml […]

,
Tutorials

Android How To Make Google Maps Application

NOTE: DEPRECATED. You should use Google Maps Android API V2 Sometimes in our applications we have to add new features like Maps. So in today’s tutorial I will show you how to create a map for your application and what you need in order to create it. Firts of all you have to run the

, , , , ,
Snippets, Tutorials

Android How To Make an AlertDialog

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 alertDelete.setPositiveButton(getString(R.string.yes),new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialogInterface, int i) { //YOUR ACTION } });

Solutions, Tutorials

How to import an Intellij project in android after you reinstalled your Intellij

If it happened to reinstall your Intelij and you don’t remember how to import your android projects maybe this post will help you, even a little at least. So, lets begin. Step 1: Press CTRL+SHIFT+ALT+S and the Project Structure window will open. On the left click on the project and then press the new button

,
Snippets

How to make a background button selector in XML?

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=”http://schemas.android.com/apk/res/android” shape=”rectangle”> <solid color=”#80000000″></solid> </shape> The color=”#80000000″ is transparent black. Step 2: Create an XML again, in the drawable folder an name it not_selected.xml. The code

, , , ,
Scroll to Top