Archive for April, 2015

Android Custom ListView with Images and Text

Hi Friends, This tutorial presents an android listview with image example. Here you will learn to create your own custom adapter with the help of ArrayAdapter. Step 1: create a activity_main.xml inside layout folder activity_main.xml <?xml version=”1.0″ encoding=”utf-8″> <RelativeLayout xmlns:android=”https://schemas.android.com/apk/res/android” xmlns:tools=”https://schemas.android.com/tools” android:layout_width=”match_parent” android:layout_height=”match_parent” android:paddingBottom=”@dimen/activity_vertical_margin” android:paddingLeft=”@dimen/activity_horizontal_margin” android:paddingRight=”@dimen/activity_horizontal_margin” android:paddingTop=”@dimen/activity_vertical_margin” tools:context=”.MainActivity”> <ListView android:id=”@+id/listView” android:layout_width=”match_parent” android:layout_height=”wrap_content” android:layout_alignParentLeft=”true” android:layout_alignParentTop=”true”> </ListView> </RelativeLayout>

Different types of Animation in Android

Step 1: At first you have to create a folder named “anim” inside the “res” folder and copy these XML files inside it. HyperSpace In.xml <?xml version=”1.0″ encoding=”utf-8″?> <alpha xmlns:android=”https://schemas</span>.android.com/apk/res/android” android:duration=”300″ android:fromAlpha=”0.0″ android:startOffset=”1200″ android:toAlpha=”1.0″ /> HyperSpace Out .xml <?xml version=”1.0″ encoding=”utf-8″?> <set xmlns:android=”https://schemas.android.com/apk/res/android” android:shareInterpolator=”false” > <scale android:duration=”700″ android:fillAfter=”false” android:fillEnabled=”true” android:fromXScale=”1.0″ android:fromYScale=”1.0″ android:interpolator=”@android:anim/accelerate_decelerate_interpolator” android:pivotX=”50%” android:pivotY=”50%” android:toXScale=”1.4″