CoordinatorLayout中的大坑
来源:互联网 发布:中科院软件所怎么样 编辑:程序博客网 时间:2024/06/02 00:55
首先来看看布局文件的代码:
<?xml version="1.0" encoding="utf-8"?><android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" android:id="@+id/activity_coor_app_bar" xmlns:app="http://schemas.android.com/apk/res-auto" tools:context=".Activity.AppBarLayoutActivity"> <android.support.design.widget.AppBarLayout android:layout_width="match_parent" android:layout_height="wrap_content"> <android.support.v7.widget.Toolbar android:id="@+id/toolbar" android:layout_width="match_parent" android:layout_height="?attr/actionBarSize" android:background="?attr/colorPrimary" app:popupTheme="@style/ThemeOverlay.AppCompat.Light" app:layout_scrollFlags="scroll|enterAlways"> </android.support.v7.widget.Toolbar> <android.support.design.widget.TabLayout android:id="@+id/tabs" android:layout_width="match_parent" android:layout_height="wrap_content" /> </android.support.design.widget.AppBarLayout> <android.support.v4.view.ViewPager android:id="@+id/viewpager" android:layout_width="match_parent" android:layout_height="match_parent" app:layout_behavior="@string/appbar_scrolling_view_behavior" />
</android.support.design.widget.CoordinatorLayout>
CoordinatorLayout不支持listview与scrollView。并且viewpage里如果滑动的布局是list view或者scrollview的话在滑动的时候是不是出现折叠效果的。如果是recycleview就才会出现折叠的效果。support 23.1+新增了
ViewCompat.setNestedScrollingEnabled(listView/gridview,true);
如可以给listview提供nestedscrolling支持,但是只在LOLIPOP+版本上生效。低版本只能用RecyclerView。
阅读全文
0 0
- CoordinatorLayout中的大坑
- UAC机制中的大坑
- Android开发中的大坑
- CoordinatorLayout使用中的坑
- jquery media 插件中的大坑
- silverlight开发游戏中的大坑
- 文件操作中的几个大坑
- PCA真实操作中的大坑
- unsigned short中的一个大坑
- 大坑!!!!!
- 大坑
- Android中的CoordinatorLayout初体验
- CoordinatorLayout
- CoordinatorLayout
- CoordinatorLayout
- CoordinatorLayout
- CoordinatorLayout
- CoordinatorLayout
- Kanade's sum(hdu 6058)
- 选择器
- Spring Aspect j
- 微信小程序实现组件顶端固定或底端固定效果(不随滚动而滚动)
- 《YOLO9000:Better,Faster,Stronger》笔记
- CoordinatorLayout中的大坑
- [Java] Java读取图片中的地理坐标(一)
- Unity5.x 全局光照系统问题下
- java中使用IO将文件切割后保存(FileInputStream、FileOutputStream)
- maven 环境变量配置
- Delphi实现在数据库中存取图像
- pl/sql developer快捷编码提示设置
- wampserver2.5绑定域名添加虚拟主机以及伪静态设置
- Spring自动代理