您的位置:首页 > 移动开发 > Android开发

android.support.v4.widget.SwipeRefreshLayout布局Xml 文件

2015-10-19 10:51 323 查看
SwipeRefreshLayout 节点里面只能有一个 子控件。

而且 里面必须是能滑动的控件,可以进行刷新 ;

如 scrollView ListVew .

一般用listView 比较好一些 ;

scrollView 会使布局 ,重新计算,和原来的显示不一样。

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"

android:layout_width="fill_parent"

android:layout_height="fill_parent"

android:background="@drawable/fragment_bg"

android:orientation="vertical" >

<include

android:id="@+id/title_include_layout"

android:layout_width="fill_parent"

android:layout_height="wrap_content"

layout="@layout/toptitle_include_home" />

<android.support.v4.widget.SwipeRefreshLayout

android:id="@+id/swipe_container"

android:layout_width="match_parent"

android:layout_height="match_parent"

android:layout_weight="1" >

<ScrollView

android:layout_width="match_parent"

android:layout_height="match_parent" >

<LinearLayout

android:layout_width="match_parent"

android:layout_height="match_parent"

android:orientation="vertical" >

</LinearLayout>

</ScrollView>

</android.support.v4.widget.SwipeRefreshLayout>

</LinearLayout>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: