[英]ScrollView not Scrolling when keyboard shown
This is resizing when the keyboard is showing instead of scrolling. 当显示键盘而不是滚动键盘时,此命令将调整大小。 Why is that? 这是为什么? I have adjustResize
set in the Manifest but it still isnt scrolling. 我在adjustResize
设置了adjustResize
,但是它仍然没有滚动。 What else do I need to change? 我还需要更改什么? I have tried removing isScrollableView
also. 我也尝试过删除isScrollableView
。
<?xml version="1.0" encoding="utf-8"?>
<ScrollView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/night"
android:fillViewport="true">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:gravity="center_horizontal"
android:isScrollContainer="true">
<ImageView
android:id="@+id/iv_login_logo"
android:layout_width="@dimen/login_logo_width"
android:layout_height="@dimen/login_logo_height"
android:src="@drawable/travelbank_logo_white"
android:layout_marginTop="@dimen/login_logo_margin"
android:layout_marginBottom="@dimen/login_logo_margin"/>
<!--Tab Layout-->
<android.support.design.widget.TabLayout
android:id="@+id/tl_login_tabs"
android:layout_width="match_parent"
android:layout_height="@dimen/tab_layout_height"
app:tabGravity="fill"
tabMode="fixed"
app:tabTextAppearance="@style/NavigationTabTextAppeareance"
app:tabIndicatorHeight="0dp"
app:tabPadding="0dp"/>
<!--Login Page-->
<android.support.v4.view.ViewPager
android:id="@+id/vp_login_view_pager"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"/>
</LinearLayout>
</ScrollView>
Turns out you cant have a View Pager inside a Scroll View. 原来,您不能在滚动视图中使用View Pager。 I removed the View Pager and everything works fine 我删除了View Pager,一切正常
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.