ok im уже делает (я считаю) все, что мне нужно сделать, чтобы сделать мой макет приложения прокручивать/перемещаться вверх, когда отображается мягкая клавиатура, но она не работает, поэтому я угадываю должно быть что-то, что я делаю, останавливая его, я задаюсь вопросом, не фиксирует ли его фиксированные высоты im, которые дают мои зрители или что-то, о чем я не знаю, и читаю сообщения, которые описывают относительные макеты как «дробящие детские представления», когда клавиатура показана, а линейные макеты не дробят мнения ребенка, поэтому с этим в виду мои макетыandroid move layout up, когда на клавиатуре отображается мягкая клавиатура
MAIN_ACTIVITY
<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
android:id="@+id/viewpagerHolder">
<android.support.v4.view.ViewPager
android:id="@+id/viewpager2"
android:layout_width="match_parent"
android:layout_marginLeft="8dp"
android:layout_marginRight="8dp"
android:layout_marginTop="8dp"
android:layout_height="@dimen/card_pager_height" />
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/predictsHolder"
android:layout_below="@id/viewpager2">
<android.support.v4.view.ViewPager
android:id="@+id/viewpager_predicts"
android:layout_width="wrap_content"
android:layout_marginLeft="8dp"
android:layout_marginRight="8dp"
android:layout_marginTop="4dp"
android:layout_height="@dimen/predicts_pager_height" />
</RelativeLayout>
<android.support.design.widget.TabLayout
android:id="@+id/tabs"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/predictsHolder"
app:tabGravity="fill"
android:theme="@style/CustomTabLayoutStyle" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/tabs">
<android.support.v4.view.ViewPager
android:id="@+id/viewpager"
android:background="@color/windowBackground"
android:layout_width="match_parent"
android:layout_height="wrap_content"
/>
</LinearLayout>
</RelativeLayout>
<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.support.design.widget.AppBarLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="@dimen/card_pager_height">
<android.support.design.widget.FloatingActionButton
android:id="@+id/fab2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="12dp"
android:layout_marginEnd="12dp"
app:elevation="4dp"
android:src="@drawable/ic_playlist_play_white_24dp"
android:layout_gravity="right|top"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"/>
</RelativeLayout>
</android.support.design.widget.CoordinatorLayout>
Там в общей сложности 3 viewpagers каждый из них имеет различное расположение первого (самый верхний)
ПЕРВЫЙ ViewPager
<RelativeLayout 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:background="@drawable/border"
android:paddingLeft="2dp"
android:paddingRight="2dp"
tools:context=".SpeakGridDB">
<android.support.v7.widget.RecyclerView
android:id="@+id/card_speak_grid"
android:layout_width="match_parent"
android:layout_gravity="center"
android:layout_height="wrap_content"/>
</RelativeLayout>
ВТОРОГО ViewPager
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="5dp"
android:paddingLeft="2dp"
android:paddingRight="2dp"
android:background="@drawable/border">
<android.support.v7.widget.RecyclerView
android:id="@+id/predicts_card_speak_grid"
android:layout_width="match_parent"
android:layout_gravity="center"
android:layout_height="wrap_content"/>
</RelativeLayout>
ТРЕТИЙ ViewPager
я хотел бы этот макет еще будет присутствовать, когда клавиатура всплывает его в настоящее время в нижней части макета Айв положить его в линейной компоновке, а также пытался ставить его ViewPager в линейной компоновке
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:background="@color/windowBackground"
tools:context=".OneFragment">
<android.support.v4.widget.SwipeRefreshLayout
android:id="@+id/activity_main_swipe_refresh_layout"
android:layout_width="match_parent"
android:background="@color/windowBackground"
android:layout_height="wrap_content">
<android.support.v7.widget.RecyclerView
android:id="@+id/card_grid"
android:background="@color/windowBackground"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clipToPadding="false"/>
</android.support.v4.widget.SwipeRefreshLayout>
</LinearLayout>
Я Кроме того, используя
android:windowSoftInputMode="adjustResize"
в мой манифест и также пытались
android:windowSoftInputMode="adjustPan"
, но никакой радости, кажется, как tabLayout не сдвигается вверх немного, когда KEYB Орды показаны, но в целом два верхних мнения остаются на месте, а нижние один (один я хочу показан) спрятано с помощью клавиатуры любой помощи
UPDATE еще не дальше с этим я не могу сделать макет с фиксированными высотами и прокручивайте его вверх, пока не появится экранная клавиатура, поэтому нет проблемы, но я должен использовать вертикальный элемент компоновки элемента, и это не то, что я хочу сделать. ive также попробовал обернуть все это в виде прокрутки и использовать isScrollContainer правда, но до сих пор нет радости, у кого есть идеи?
является FAB, когда вверх появляется клавиатура? –
@ darshan miskin нет, это не так, но я не хочу, чтобы его поклонник был довольно высок в макете и не должен был быть затронут. –