You can read the First Article about Best Coding Practices in Android here. Re-Use Elements and Layouts Use for reusing layouts. You can read about this from here. Use Different resources for different density Screens. Properly organize your images in mdpi, hdpi,xhdpi etc folders for corresponding screens. This helps to prevent blurry images. Read more from here. Try… Read More »
Hello all I am back with fragments again. I know you have seen a lot of posts on fragments and fragment animation. This one will be another useful post for you. This post helps you to show a FlipCard animation using Fragments. Let us see how can we do this. At first I will show the activity that… Read More »
Hello all…… This post examples how to get an edittext value from a dialog fragment. You can use the same method to get a button click from a dialog or events like that. You can click on the download link to get the source code. At first we will create a layout for the Dialog Fragment. The layout… Read More »
Hello all I think you all know about the context menu in android. It appears as a popup when you long press something. Fragment also provides some methods for registering with the contextmenu and showing it. Let’s see how we can do it. You can click on the download links to download the source code. At first we… Read More »
Have you seen the Google Play application in your Android phone. Wondered about how they implemented swiping windows in it. Don’t Worry, Here is an example which implements it. Here we will create three pages which can be swiped to access it. These are the three layouts for the three sections. section1.xml section2.xml section3.xml Now the java for… Read More »
This simple example shows how to set different layouts for portrait and Landscape in Android. If you need a detailed explanation please check this url http://developer.android.com/guide/practices/screens_support.html Android Supports these different categories of screens. 1. xlarge screens are at least 960dp x 720dp 2. large screens are at least 640dp x 480dp 3. normal screens are at least 470dp… Read More »
In android with shapes we can create beautiful layouts. Lets look at an example. Create an xml named “gradient.xml” in your drawable folder and copy this code into it. Now the main layout file main.xml The main java file. Done. You can now run the application.
In android there are different layouts and we often confuse about which one to use. Even if we select one, it is little complicated. So this tutorials is to show you about the TableLayout Here i first created linear Layout in which a Table Layout is added Here you can see that the first row ie, the EditText… Read More »