我已經看到無數線程關於如何禁用滾動活動文本字段的標準Android行爲或在屏幕鍵盤彈出時調整當前活動的大小,但我的問題恰恰相反。在我的應用程序中不會滾動也不會調整大小。ENABLE在彈出的鍵盤上調整大小或滾動活動
我需要做些什麼來實現正確的行爲?
<?xml version="1.0" encoding="utf-8"?>
<!-- The main content view -->
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/RootView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?colorPrimary">
<com.sothree.slidinguppanel.SlidingUpPanelLayout xmlns:sothree="http://schemas.android.com/apk/res-auto"
android:id="@+id/slidingPanel"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="bottom"
sothree:umanoFadeColor="@android:color/transparent"
sothree:umanoOverlay="true"
sothree:umanoPanelHeight="200dp"
sothree:umanoShadowHeight="0dp">
<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent">
<RelativeLayout
android:id="@+id/fragmentContainer"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/scrollView1"
android:layout_width="@dimen/lewa_lista_size"
android:layout_height="match_parent"
android:layout_gravity="start"
android:background="?xenoPanelBackgroundColor"/>
</android.support.v4.widget.DrawerLayout>
<RelativeLayout
android:id="@+id/playlist"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center">
<LinearLayout
android:id="@+id/chwytak"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/tlo_kropek"
android:orientation="vertical">
<ImageView
android:id="@+id/kropki"
android:layout_width="match_parent"
android:layout_height="@dimen/uchwyt_szuflady_height"
android:layout_centerHorizontal="true"
android:gravity="center_horizontal"
android:src="@mipmap/kropki" />
<RelativeLayout
android:id="@+id/wypelniaczGorny"
android:layout_width="match_parent"
android:layout_height="0dp"/>
</LinearLayout>
<android.support.v7.widget.Toolbar
android:id="@+id/playlistAB"
style="?xenoActionBarTheme"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/chwytak"
android:elevation="4dp"
android:minHeight="?attr/actionBarSize">
<Spinner
android:id="@+id/spinner_toolbar"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</android.support.v7.widget.Toolbar>
<RelativeLayout
android:id="@+id/wypelniacz"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_alignParentBottom="true"
android:background="?xenoPanelBackgroundColor"/>
<android.support.v4.view.ViewPager
android:id="@+id/pager"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_above="@id/wypelniacz"
android:layout_below="@id/playlistAB"
android:background="?xenoPanelBackgroundColor"/>
</RelativeLayout>
</com.sothree.slidinguppanel.SlidingUpPanelLayout>
</FrameLayout>
是您的活動全屏得到合適的屬性? –
嗯 - 是的。還有其他類型的活動嗎? – ssuukk
將您的活動和佈局代碼粘貼到此處。如果您的活動是全屏顯示,那麼您的佈局不會在鍵盤彈出窗口中調整大小。 –