Created
September 17, 2013 01:13
-
-
Save mako34/6588900 to your computer and use it in GitHub Desktop.
ListView, creacion custom cell, en fragment
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
1. creo list view en xml | |
2. lo llamo en el fragment mi list view [inflaiter] | |
3. adapter custom xml | |
4. dapter custom CategoryAdapter.java | |
5. cell Category.java | |
public class CategoryAdapter { | |
public String title; | |
public CategoryAdapter(){ | |
super(); | |
} | |
public CategoryAdapter(String title) { | |
super(); | |
this.title = title; | |
} | |
} | |
6. cell xml, category_item_row.xml | |
<?xml version="1.0" encoding="utf-8"?> | |
<LinearLayout | |
xmlns:android="http://schemas.android.com/apk/res/android" | |
android:id="@+id/hamburger_item_row" | |
android:orientation="horizontal" | |
android:layout_width="fill_parent" | |
android:layout_height="fill_parent" | |
android:padding="10dp"> | |
<TextView android:id="@+id/txtTitle" | |
android:layout_width="fill_parent" | |
android:layout_height="fill_parent" | |
android:textStyle="bold" | |
android:textSize="22sp" | |
android:textColor="#000000" | |
android:layout_marginTop="5dp" | |
android:layout_marginBottom="5dp" /> | |
</LinearLayout> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment