安卓_XListVicw加载更多和无限轮播点_2

来源:互联网 发布:淘宝上怎么买流量 编辑:程序博客网 时间:2024/04/30 14:22

1、vp_item.xml

///////////

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent">




    <android.support.v4.view.ViewPager
        android:id="@+id/vp"
        android:layout_width="match_parent"
        android:layout_height="200dp">


    </android.support.v4.view.ViewPager>


    <LinearLayout
        android:id="@+id/ll"


        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true"
        android:gravity="center"
        android:orientation="horizontal">


    </LinearLayout>


</RelativeLayout>


2、xlv_item.xml

///////////////////

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="horizontal">


    <ImageView
        android:id="@+id/xlv_iv"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content" />


    <TextView
        android:id="@+id/xlv_tv"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content" />


</LinearLayout>


3、/////////

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:background="#f0f0f0"
    android:orientation="vertical">


    <TextView
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:text="@string/hello" />


    <me.maxwin.view.XListView
        android:id="@+id/xListView"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:cacheColorHint="#00000000">


    </me.maxwin.view.XListView>


</LinearLayout>



4、activity_main.xml


<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent">


    <com.sujichun.user.XListView
        android:id="@+id/xlv"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
         />


</LinearLayout>


strings.xml***
、、、、

<?xml version="1.0" encoding="utf-8"?>
<resources>


    <string name="hello">Hello World, XListViewActivity!</string>
    <string name="app_name">XListView</string>
    <string name="xlistview_header_hint_normal">下拉刷新</string>
    <string name="xlistview_header_hint_ready">松开刷新数据</string>
    <string name="xlistview_header_hint_loading">正在加载...</string>
    <string name="xlistview_header_last_time">上次更新时间:</string>
    <string name="xlistview_footer_hint_normal">查看更多</string>
    <string name="xlistview_footer_hint_ready">松开载入更多</string>


</resources>

////////////////////
dot_focus.xml


<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
    android:shape="rectangle">


    <corners android:radius="8dp"></corners>
    <solid android:color="#f00"></solid>


</shape>

-------------

dot_normal.xml

<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
    android:shape="rectangle">


    <corners android:radius="8dp"></corners>
    <solid android:color="#00ff00"></solid>


</shape>


阅读全文
0 0
原创粉丝点击