Sunday, November 27, 2016


List View Sample in Android

 1. extend your Activity class from (ListActivit)
2.Under values folder,create an XML file and name it as list_data.xml
list_data.xml
<?xml version="1.0" encoding="utf-8"?>
<resources>
    <string-array name="adobe_products">
        <item>Adobe After Effects</item>
        <item>Adobe Bridge</item>
        <item>Adobe Dreamweaver</item>
        <item>Adobe Edge</item>
        <item>Adobe Fireworks</item>
        <item>Adobe Flash</item>
        <item>Adobe Photoshop</item>
        <item>Adobe Premiere</item>
        <item>Adobe Reader</item>
        <item>Adobe Illustrator</item>
    </string-array>
</resources>
3.Create an XML file under res/layout folder and name it as list_item.xml

<?xml version="1.0" encoding="utf-8"?>
<!--  Single List Item Design -->
    android:id="@+id/label"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:padding="10dip"
        android:textSize="16dip"
        android:textStyle="bold" >
</TextView>
4. In your Activity class file paste these code : 

AndroidListViewActivity.java
package com.androidhive.androidlistview;
import android.app.ListActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.ArrayAdapter;
import android.widget.ListView;
import android.widget.TextView;
public class AndroidListViewActivity extends ListActivity {
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
         
        // storing string resources into Array
        String[] adobe_products = getResources().getStringArray(R.array.adobe_products);
         
        // Binding resources Array to ListAdapter
        this.setListAdapter(new ArrayAdapter<String>(this, R.layout.list_item, R.id.label, adobe_products));
         
    }
}
5. Don't forget to add List View Tag element in your Activity layout.

Tuesday, November 8, 2016

Today, Tuesday, Nov 8, 2016, i have launched my first App release on google play, titled with :"Popular Movies"

You can easily fetch the best movies, rated via audience rating according to most popularity or top rated movies.

Review my first launch"Popular Movies"here  on google play

Wish you have the best of luck. let's have fun

Thanks