2017-12-19 3 views
-3

Mein Problem hier wie folgt ist -anpassen Eigenschaft Resize funktioniert nicht

Ich habe eine webview in meiner Tätigkeit und unterhalb dieser webview eine lineare Layout der Fußzeile Symbole anzeigt, die am Boden haften bleiben werden.

Jetzt, wenn die Soft-Tastatur erscheint, möchte ich die gesamte Aktivität anpassen Größe ändern, aber ich möchte nicht die Fußzeilen-Symbole nach oben kommen, ich will sie auf der Unterseite bleiben.

AdjustPan und adjustNothing funktionieren nicht für mich, da meine Webseite editTexts für Benutzername und Passwort enthält und diese beiden Eigenschaften machen sie hinter der weichen Tastatur bleiben.

Jede Hilfe wird geschätzt.

enter image description here

enter image description here

EDIT

ich die schwimmenden Tasten wollen, die Teil meines Linear-Layout sind, wenn Soft-Tastatur Pop-up nicht kommen. Mein Xml ist als unten -

<?xml version="1.0" encoding="utf-8"?> 

    <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:orientation="vertical" 
    android:id="@+id/rel_parent" 
    tools:context=".Login"> 
     <RelativeLayout 
      android:layout_width="match_parent" 
      android:layout_height="match_parent" 
      android:id="@+id/rel_web"> 
      <WebView 
        android:layout_width="match_parent" 
        android:layout_height="match_parent" 
        android:id="@+id/wv_main" 
        android:layout_weight="1" 
        android:isScrollContainer="false"> 
      </WebView> 
      <ProgressBar 
       android:id="@+id/progressBar1" 
       android:layout_width="45dp" 
       android:layout_height="45dp" 
       android:layout_centerVertical="true" 
       android:layout_centerInParent="true"/> 
      <RelativeLayout 
       android:layout_width="wrap_content" 
       android:layout_height="wrap_content" 
       android:id="@+id/offline_mode" 
       android:layout_centerInParent="true" 
       android:background="#ffffff" 
       android:visibility="gone"> 
       <ImageView 
        android:layout_width="90dp" 
        android:layout_height="90dp" 
        android:src="@drawable/offline" 
        android:id="@+id/im_offline" /> 
       <TextView 
        android:layout_width="wrap_content" 
        android:layout_height="wrap_content" 
        android:textColor="#000000" 
        android:textSize="18sp" 
        android:text="Offline" 
        android:layout_marginTop="10dp" 
        android:layout_centerHorizontal="true" 
        android:layout_below="@+id/im_offline"/> 
      </RelativeLayout> 
      <LinearLayout 
       android:id="@+id/ll_buttons" 
       android:layout_width="match_parent" 
       android:layout_height="wrap_content" 
       android:layout_alignParentBottom="true" 
       android:layout_marginBottom="47px" 
       android:gravity="center_horizontal" 
       android:visibility="visible" 
       android:weightSum="1"> 
       <LinearLayout 
        android:layout_width="0dp" 
        android:layout_height="40dp" 
        android:layout_weight="0.80" 
        android:weightSum="11.5"> 

        <ImageView 
         android:layout_width="0dp" 
         android:layout_height="wrap_content" 
         android:layout_weight="1.5" 
         android:clickable="true" 
         android:onClick="openHome" 
         android:src="@drawable/home_icon" 
         android:scaleType="centerInside"/> 

        <View 
         android:layout_width="0dp" 
         android:layout_height="30dp" 
         android:layout_weight="0.5" /> 

        <ImageView 
         android:layout_width="0dp" 
         android:layout_height="wrap_content" 
         android:layout_weight="1.5" 
         android:clickable="true" 
         android:onClick="openHeadphone" 
         android:src="@drawable/headphone_icon" /> 

        <View 
         android:layout_width="0dp" 
         android:layout_height="30dp" 
         android:layout_weight=".5" /> 

        <ImageView 
         android:layout_width="0dp" 
         android:layout_height="wrap_content" 
         android:layout_weight="1.5" 
         android:clickable="true" 
         android:onClick="openEmail" 
         android:src="@drawable/email_icon" /> 

        <View 
         android:layout_width="0dp" 
         android:layout_height="30dp" 
         android:layout_weight=".5" /> 

        <ImageView 
         android:layout_width="0dp" 
         android:layout_height="wrap_content" 
         android:layout_weight="1.5" 
         android:clickable="true" 
         android:onClick="openFb" 
         android:src="@drawable/fb_icon" /> 

        <View 
         android:layout_width="0dp" 
         android:layout_height="30dp" 
         android:layout_weight=".5" /> 

        <ImageView 
         android:layout_width="0dp" 
         android:layout_height="wrap_content" 
         android:layout_weight="1.5" 
         android:clickable="true" 
         android:onClick="openInsta" 
         android:src="@drawable/instagram_icon" /> 

        <View 
         android:layout_width="0dp" 
         android:layout_height="30dp" 
         android:layout_weight=".5" /> 

        <ImageView 
         android:layout_width="0dp" 
         android:layout_height="wrap_content" 
         android:layout_weight="1.5" 
         android:clickable="true" 
         android:onClick="openYoutube" 
         android:src="@drawable/youtube" /> 
       </LinearLayout> 
      </LinearLayout> 
     </RelativeLayout> 
</RelativeLayout> 
+0

poste deinen XML-Code. –

+0

Fügen Sie Ihren XML-Code –

+0

Sie müssen Layout-Datei mit der Frage –

Antwort

0

ich auf dem Weg zu überprüfen, und ich entfernen Sie einfach android:windowSoftInputMode="adjustResize" und fügte an Eltern Scrollview. Versuchen Sie folgenden Code:

-Code

<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:orientation="vertical" 
    android:id="@+id/rel_parent"> 
    <ScrollView 
     android:layout_width="match_parent" 
     android:layout_height="match_parent" 
     android:fillViewport="true"> 

     <RelativeLayout 
      android:id="@+id/rel_web" 
      android:layout_width="match_parent" 
      android:layout_height="match_parent"> 

      <WebView 
       android:id="@+id/wv_main" 
       android:layout_width="match_parent" 
       android:layout_height="match_parent" 
       android:isScrollContainer="false" /> 

      <ProgressBar 
       android:id="@+id/progressBar1" 
       android:visibility="gone" 
       android:layout_width="match_parent" 
       android:layout_height="wrap_content" 
       android:layout_centerInParent="true" 
       android:layout_centerVertical="true" /> 

      <RelativeLayout 
       android:id="@+id/offline_mode" 
       android:layout_width="wrap_content" 
       android:layout_height="match_parent" 
       android:layout_centerInParent="true" 
       android:background="#ffffff" 
       android:visibility="gone"> 

       <ImageView 
        android:id="@+id/im_offline" 
        android:layout_width="90dp" 
        android:layout_height="90dp" /> 

       <TextView 
        android:layout_width="wrap_content" 
        android:layout_height="wrap_content" 
        android:layout_below="@+id/im_offline" 
        android:layout_centerHorizontal="true" 
        android:layout_marginTop="10dp" 
        android:text="Offline" 
        android:textColor="#000000" 
        android:textSize="18sp" /> 



      </RelativeLayout> 

      <LinearLayout 
       android:id="@+id/ll_buttons" 
       android:layout_width="match_parent" 
       android:layout_height="wrap_content" 
       android:layout_alignParentBottom="true" 
       android:layout_marginBottom="10dp" 
       android:gravity="center_horizontal" 
       android:visibility="visible" 
       android:weightSum="1"> 

       <LinearLayout 
        android:layout_width="0dp" 
        android:layout_height="40dp" 
        android:layout_weight="0.80" 
        android:weightSum="11.5"> 

        <ImageView 
         android:layout_width="0dp" 
         android:layout_height="wrap_content" 
         android:layout_weight="1.5" 
         android:clickable="true" 
         android:onClick="openHome" 
         android:scaleType="centerInside" 
         android:src="@mipmap/ic_launcher" /> 

        <View 
         android:layout_width="0dp" 
         android:layout_height="30dp" 
         android:layout_weight="0.5" /> 

        <ImageView 
         android:layout_width="0dp" 
         android:layout_height="wrap_content" 
         android:layout_weight="1.5" 
         android:clickable="true" 
         android:onClick="openHeadphone" 
         android:src="@mipmap/ic_launcher" /> 

        <View 
         android:layout_width="0dp" 
         android:layout_height="30dp" 
         android:layout_weight=".5" /> 

        <ImageView 
         android:layout_width="0dp" 
         android:layout_height="wrap_content" 
         android:layout_weight="1.5" 
         android:clickable="true" 
         android:onClick="openEmail" 
         android:src="@mipmap/ic_launcher" /> 

        <View 
         android:layout_width="0dp" 
         android:layout_height="30dp" 
         android:layout_weight=".5" /> 

        <ImageView 
         android:layout_width="0dp" 
         android:layout_height="wrap_content" 
         android:layout_weight="1.5" 
         android:clickable="true" 
         android:onClick="openFb" 
         android:src="@mipmap/ic_launcher" /> 

        <View 
         android:layout_width="0dp" 
         android:layout_height="29dp" 
         android:layout_weight=".5" /> 

        <ImageView 
         android:layout_width="0dp" 
         android:layout_height="wrap_content" 
         android:layout_weight="1.5" 
         android:clickable="true" 
         android:onClick="openInsta" 
         android:src="@mipmap/ic_launcher" /> 

        <View 
         android:layout_width="0dp" 
         android:layout_height="30dp" 
         android:layout_weight=".5" /> 

        <ImageView 
         android:layout_width="0dp" 
         android:layout_height="wrap_content" 
         android:layout_weight="1.5" 
         android:clickable="true" 
         android:onClick="openYoutube" 
         android:src="@mipmap/ic_launcher" /> 
       </LinearLayout> 

      </LinearLayout> 

     </RelativeLayout> 



    </ScrollView> 

</RelativeLayout> 

Hier ist der Screenshot ich geprüft hatte.

Screen-shot one

enter image description here

Bildschirm erschossen zwei

enter image description here

Bildschirm drei erschossen, nachdem ich nach unten

geblättert haben

enter image description here

Verwandte Themen