Created
May 10, 2014 17:01
-
-
Save noisywiz/b4e0dd656b487b16bf67 to your computer and use it in GitHub Desktop.
Two lines adapter in LinearLayout listView
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* --list_item layout-- | |
<?xml version="1.0" encoding="utf-8"?> | |
<LinearLayout | |
xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:tools="http://schemas.android.com/tools" | |
android:layout_width="fill_parent" | |
android:layout_height="fill_parent" | |
android:orientation="vertical"> | |
<TextView android:id="@+id/text1" | |
android:textSize="6pt" | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
android:layout_marginTop="3pt" /> | |
<TextView android:id="@+id/text2" | |
android:textSize="4pt" | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
android:layout_marginBottom="3pt" /> | |
</LinearLayout> | |
*/ | |
wingListView = (ListView) findViewById(R.id.wingListView); // in main_activity ;) | |
wingListAdapter = new SimpleAdapter(this, Hamsters, | |
R.layout.list_item, new String[] {"title", "date"}, | |
new int[] { R.id.text1, R.id.text2 }); | |
wingListView.setAdapter(wingListAdapter); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment