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>
而且 里面必须是能滑动的控件,可以进行刷新 ;
如 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>
相关文章推荐
- android:windowSoftInputMode属性详解
- android四大组件
- Android采取async框架文件上传
- 【转】利用HTML5开发Android
- android studio logcat 被拖出monitor如何还原
- 学Android---Intent
- Android异步消息处理机制完全解析
- traceview进行Android性能测试
- Android 使用自定义字体
- Android中的Audio播放:控制Audio输出通道切换
- android中 EditTex t的 inputType 属性
- Android: EditText设置属性和设置输入规则
- 【Android Studio】解决adb not responding if youd like to retry...错误
- android adb 不同的方式使用特定的解释
- android 系统内置应用升级
- Android应用层对proc节点的读写
- Android应用发布平台
- Android应用发布平台
- android:windowSoftInputMode属性详解
- AndroidDevTools简介