android分页处理-3
xml:list_items.xml
<?xmlversion="1.0"encoding="utf-8"?>
<LinearLayoutxmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"android:layout_height="fill_parent"
android:orientation="vertical">
<TextViewandroid:id="@+id/newstitle"android:layout_width="fill_parent"
android:layout_height="wrap_content"/>
<TextViewandroid:id="@+id/newscontent"android:layout_width="fill_parent"
android:layout_height="wrap_content"/>
</LinearLayout>
loadmore.xml
<?xmlversion="1.0"encoding="utf-8"?>
<LinearLayoutxmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"android:layout_height="fill_parent">
<Buttonandroid:id="@+id/loadMoreButton"android:layout_width="fill_parent"
android:layout_height="wrap_content"android:text="查看更多..."/>
</LinearLayout>
main.xml
<?xmlversion="1.0"encoding="utf-8"?>
<LinearLayoutxmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"android:layout_height="fill_parent"
android:orientation="vertical">
<ListViewandroid:id="@+id/lvNews"android:layout_width="fill_parent"
android:layout_height="wrap_content"/>
</LinearLayout>
model:News
publicclassNews
{
/*
*新闻标题
*/
privateStringtitle;
/*
*新闻内容
*/
privateStringcontent;
}