android coordinatorLayout 快速滑动会滑出界面有谁遇到过么?

Mr_Deamer 2016-09-25 05:54:44
想做底部为viewpeger上滑tab悬停,选用的是android5.0design包下的coordinatorLayout,但是快速滑动,整个布局都会滑出屏幕,系统是4.2.2的,有人遇到过么,怎么解决的,求告知,下面是整个xml布局:


<?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"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/activity_main"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.example.mao.myapplication.MainActivity"
android:orientation="vertical">

<android.support.design.widget.AppBarLayout
android:layout_width="match_parent"
android:layout_height="200dp"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Hello World!"
app:layout_scrollFlags="exitUntilCollapsed|scroll"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="appbar之内,collap之外"
android:textColor="#0f0" />
</android.support.design.widget.AppBarLayout>
<android.support.v4.widget.NestedScrollView
android:id="@+id/n_scroll_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior">

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">

<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="哈"
android:textColor="#0f0"
android:textSize="200sp" />

<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="哈"
android:textColor="#0f0"
android:textSize="200sp" />

<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="哈"
android:textColor="#0f0"
android:textSize="200sp" />

<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="哈"
android:textColor="#0f0"
android:textSize="200sp" />
</LinearLayout>
</android.support.v4.widget.NestedScrollView>
</android.support.design.widget.CoordinatorLayout>
...全文
743 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复

80,350

社区成员

发帖
与我相关
我的任务
社区描述
移动平台 Android
androidandroid-studioandroidx 技术论坛(原bbs)
社区管理员
  • Android
  • yechaoa
  • 失落夏天
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧