Building Interactive Fragments with Listview in Android Tablet API 3.2


Android API 3.2 has launched with interactive support for Scrollable ListView , Tab View, FrameLayout which is very interactive in Landscape mode of Android API 3.0 Tablet View.

To start with Application in Android 3.2 , let’s remind the core structure of HoneyComb UI in Android 3.0 API.

First of all , Start in Eclipse -> Project Name-> Target API-> 3.2 -> Provide Package Name-> Target SDK Selection : 13 (for 3.2 API).

Lets code for main.xml:

<

LinearLayoutxmlns:android=http://schemas.android.com/apk/res/android&#8221;


android:orientation=“horizontal”


android:layout_width=“match_parent”android:layout_height=“match_parent”>


<fragmentclass=“com.example.android.apis.app.FragmentLayout$TitlesFragment”


android:id=“@+id/titles”android:layout_weight=“1”


android:layout_width=“0px”android:layout_height=“match_parent”/>


<FrameLayoutandroid:id=“@+id/details”android:layout_weight=“1”


android:layout_width=“0px”android:layout_height=“match_parent”


android:background=“?android:attr/detailsElementBackground”/>


</

LinearLayout>

Next , let’s write for FrameLayout which is default view for Android Tablet  view.

Lets write for Fragment2 Strings: 

public

staticfinal String[] TITLES =

{

“Paediatrics”,

“Gynaecology & Obstretrics”,

“Psychiatry”,

“General Medicine”,

“Echocardiography”,

“Eye(Opthamology)”,

“Dermatology”,

“General Surgery”,

“Laproscopic Surgery”,

“Dentistry”,

“Reconstructive(Plastic)”,

“ENT”,

“Gynaecological Laproscopical Surgery”,

“Homeopathy”,

“Gastroenterology”,

“Haemotology”,

“Audiometry & tympanometry”,

“Neuro Surgery”,

“Oral & Mazillofacial Surgery”,

“Cardiology”,

“Urology”,

“Neprology”,

“Orthopaedics”,

“Oncology”,

“Endocrino & Diabetology”,

“Acupuncture”

}

That’s all.

This slideshow requires JavaScript.


Advertisements

About Anindita
Anindita Basak is working as Big Data Cloud Consultant in Microsoft. Worked in multiple MNCs as Developer & Senior Developer on Microsoft Azure, Data Platform, IoT & BI , Data Visualization, Data warehousing & ETL & of course in Hadoop platform.She played both as FTE & v- employee in Azure platform teams of Microsoft.Passionate about .NET , Java, Python & Data Science. She is also an active Big Data & Cloud Trainer & would love share her experience in IT Training Industry. She is an author, forum contributor, blogger & technical reviewer of various books on Big Data Hadoop, HDInsight, IoT & Data Science, SQL Server PDW & PowerBI.

One Response to Building Interactive Fragments with Listview in Android Tablet API 3.2

  1. Pingback: AAC Trackback Submitter

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: