2016-08-10 3 views
1

Я работаю над приложением, и я поставилLayout сокращается, когда клавиатура открывается андроид

enter code here 
<activity 
     android:name=".ui.base.BaseActivity" 
     android:windowSoftInputMode="adjustResize|stateHidden|adjustPan|stateAlwaysHidden" 
     android:theme="@style/MyTheme"/> 

и в этой деятельности я использую различные фрагменты и чем же все макеты сокращаются. Пожалуйста, помогите, если вы хотите какие-либо коды, пожалуйста, дайте мне знать. Спасибо Я делюсь с вами своим изображением на экране, пожалуйста, проверьте. enter image description here

Это расположение является домом деятельности

enter code here 
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
android:layout_width="match_parent" 
android:layout_height="match_parent" 
android:background="@android:color/white" 
android:orientation="vertical" 
android:isScrollContainer="false"> 

<include 
    android:id="@+id/actionbar" 
    layout="@layout/actionbar" 
    android:layout_width="match_parent" 
    android:layout_height="48dp" /> 

<FrameLayout 
    android:id="@+id/base_container" 
    android:layout_width="match_parent" 
    android:layout_height="0dp" 
    android:layout_above="@+id/tab_layout" 
    android:layout_alignParentTop="true" 
    android:layout_weight="1"> 

</FrameLayout> 

<View 
    android:layout_width="match_parent" 
    android:layout_height="0.5dp" 
    android:background="@color/light_grey"/> 

<LinearLayout 
    android:id="@+id/tab_layout" 
    android:layout_width="match_parent" 
    android:layout_height="50dp" 
    android:layout_alignParentBottom="true" 
    android:background="@color/white" 
    android:padding="@dimen/tab_horizontal_margin" 
    android:orientation="horizontal"> 

    <!--android:background="@color/tab_background_color"--> 


    <include 
     android:id="@+id/tab_1" 
     layout="@layout/activity_base_item" 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
     android:layout_weight="1" 
     android:layout_gravity="center_vertical"/> 

    <include 
     android:id="@+id/tab_2" 
     layout="@layout/activity_base_item" 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
     android:layout_weight="1" 
     android:layout_gravity="center_vertical"/> 

    <include 
     android:id="@+id/tab_3" 
     layout="@layout/activity_base_item" 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
     android:layout_weight="1" 
     android:layout_gravity="center_vertical"/> 

    <include 
     android:id="@+id/tab_4" 
     layout="@layout/activity_base_item" 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
     android:layout_weight="1" 
     android:layout_gravity="center_vertical"/> 

    <include 
     android:id="@+id/tab_5" 
     layout="@layout/activity_base_item" 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
     android:layout_weight="1" 
     android:layout_gravity="center_vertical"/> 

</LinearLayout> 
</LinearLayout> 
+0

добавить код макета –

+0

Я добавил свой код xml, пожалуйста, проверьте. –

+0

Сделайте свой корневой вид (линейный макет), чтобы прокрутить представление и добавить линейный макет к своему дочерью scrollview –

ответ

0

Добавьте к этому ваш манифест

<activity 
android:name="com.companyname.applicationname" 
android:windowSoftInputMode="stateVisible|adjustPan"> 

Если вы используете ScrollView добавить этот

<ScrollView 
android:layout_width="fill_parent" 
android:layout_height="fill_parent" 
android:isScrollContainer="false"> 

+0

нет не работает #Singh –

+0

Я не пользуюсь scrollview –

Смежные вопросы