简体   繁体   中英

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. What else do I need to change? I have tried removing isScrollableView also.

<?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. I removed the View Pager and everything works fine

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM