android分页处理-3

xml:list_items.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent" android:layout_height="fill_parent"
android:orientation="vertical">
<TextView android:id="@+id/newstitle" android:layout_width="fill_parent"
android:layout_height="wrap_content" />
<TextView android:id="@+id/newscontent" android:layout_width="fill_parent"
android:layout_height="wrap_content" />
</LinearLayout>

loadmore.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent" android:layout_height="fill_parent">
<Button android:id="@+id/loadMoreButton" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:text="查看更多..." />
</LinearLayout>

main.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent" android:layout_height="fill_parent"
android:orientation="vertical">
<ListView android:id="@+id/lvNews" android:layout_width="fill_parent"
android:layout_height="wrap_content" />
</LinearLayout>

model:News

public class News
{
/*
     * 新闻标题
     */
    private String title;
   
    /*
     * 新闻内容
     */
    private String content;
}

你可能感兴趣的:(xml)