2016-08-13 44 views
-1

我试过android:windowSoftInputMode =“adjustResize”,但它不工作。输入密码后,用户必须点击结束,但我需要能够看到我的登录按钮 - 但如何? :)当点击edittext布局上去

我的问题是这样的: enter image description here

我加入到Android的表现:windowSoftInputMode = “adjustResize” 但没有任何变化。

我的XML代码:

<?xml version="1.0" encoding="utf-8"?> 
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android" 
    android:layout_width="fill_parent" 
    android:layout_height="fill_parent" 
    android:fitsSystemWindows="true" 
      android:descendantFocusability="beforeDescendants" 
      android:focusableInTouchMode="true"> 

    <LinearLayout 
     android:orientation="vertical" 
     android:layout_width="match_parent" 
     android:layout_height="wrap_content" 
     android:paddingTop="56dp" 
     android:paddingLeft="24dp" 
     android:paddingRight="24dp" 
     android:id="@+id/touchInterceptor"> 

     <ImageView 
      android:layout_width="133dp" 
      android:layout_height="137dp" 
      android:id="@+id/imageView" 
      android:layout_gravity="center_horizontal" 
      android:background="@drawable/elma_logo4" 
      android:layout_weight="2.00" /> 
     <!-- Email Label --> 
     <android.support.design.widget.TextInputLayout 
      android:layout_width="match_parent" 
      android:layout_height="wrap_content" 
      android:layout_marginTop="8dp" 
      android:layout_marginBottom="8dp"> 
      <EditText android:id="@+id/input_email" 
       android:layout_width="match_parent" 
       android:layout_height="wrap_content" 
       android:inputType="textEmailAddress" 
       android:hint="Email" 
         android:focusable="false"/> 
     </android.support.design.widget.TextInputLayout> 

     <!-- Password Label --> 
     <android.support.design.widget.TextInputLayout 
      android:layout_width="match_parent" 
      android:layout_height="wrap_content" 
      android:layout_marginTop="8dp" 
      android:layout_marginBottom="8dp"> 
      <EditText android:id="@+id/input_password" 
       android:layout_width="match_parent" 
       android:layout_height="wrap_content" 
       android:inputType="textPassword" 
       android:hint="@string/ifre" 
         android:focusable="false"/> 
     </android.support.design.widget.TextInputLayout> 


     <CheckBox 
      android:layout_width="wrap_content" 
      android:layout_height="wrap_content" 
      android:text="Şifremi Hatırla" 
      android:id="@+id/cb_Hatirla" 
      android:layout_weight="2.00"/> 

     <android.support.v7.widget.AppCompatButton 
      android:id="@+id/btn_login" 
      android:layout_width="fill_parent" 
      android:layout_height="wrap_content" 
      android:layout_marginTop="24dp" 
      android:layout_marginBottom="24dp" 
      android:padding="0dp" 
      android:text="Giriş"/> 

     <ProgressBar 
      style="?android:attr/progressBarStyleSmall" 
      android:layout_width="wrap_content" 
      android:layout_height="wrap_content" 
      android:id="@+id/progressBar" 
      android:layout_gravity="center_horizontal" /> 


     <TextView android:id="@+id/link_forgotpass" 
        android:layout_width="fill_parent" 
        android:layout_height="wrap_content" 
        android:layout_marginBottom="24dp" 
        android:text="Şifremi Unuttum?" 
        android:gravity="center" 
        android:textSize="16dip"/> 

     <TextView android:id="@+id/link_signup" 
      android:layout_width="fill_parent" 
      android:layout_height="wrap_content" 
      android:layout_marginBottom="24dp" 
      android:text="Hesabınız yok mu ? Hemen Oluşturun!" 
      android:gravity="center" 
      android:textSize="16dip"/> 



    </LinearLayout> 
</ScrollView> 
+0

你的问题是完全无法理解.. –

+0

我的意思是,当我点击密码的EditText我希望看到我的登录按钮 –

+0

我想你需要在用户输入密码后管理'actionDone'。它会自动隐藏键盘,你可以看到你的登录按钮。 – pRaNaY

回答

3

android:imeOptions="actionNext"input_email的EditText。这可以帮助您在键盘上显示next按钮以导航input_password

并把android:imeOptions="actionDone"改为input_password EditText,它可以帮助你在键盘上显示Done按钮。 当点击Done按钮,你可以看到你btn_login

这是在EditText中导航用户的正确方法。

查看Specifying the Input Method Type的EditText。

我希望它能帮助你。

0

用它在你的manifies文件 机器人:windowSoftInputMode =“stateHidden | adjustResize | stateAlwaysHidden” >