2011-12-27 67 views
1

Android Developers ...Android:軟鍵盤覆蓋編輯文本(調整resize或adjustpan不工作)

我是新的開發android應用程序。因此,我真的要求緩慢或詳細的解釋有關這個問題:

  1. 作爲標題,軟鍵盤總是掩蓋了編輯文本。不調整或調整工作。

  2. 我已經在搜索這個問題,有人說應用程序不是全屏。我已經做出了我自己的簡單主題,它只包含: false 仍然/它不工作。因此,如何正確禁用全屏?

  3. 有人說使用scrollview。它是唯一的答案嗎?因爲我寧願使用相對或線性佈局。

  4. 有沒有簡單的答案,使軟鍵盤表現良好?

非常感謝你的幫助:d

PS:

  1. 安卓的minSdkVersion = 「7」
  2. 我靶向2.1
  3. 沒有這樣的我的清單中隱含的主題表明主題是全屏模式。
  4. 令人尷尬的是:我的登錄活動,edittext向上滑動,爲軟鍵盤騰出空間。但是無論何時再次調用此活動,向上滑動edittext都不起作用。

這是我的活動XML:

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

<LinearLayout 
    xmlns:android="http://schemas.android.com/apk/res/android" 
    android:layout_width="fill_parent" 
    android:layout_height="fill_parent" 
    android:background="@color/bgcolor" 
    android:orientation="vertical" >  

    <TextView 
     android:id="@+id/textTitle" 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
     android:paddingTop="20dp" 
     android:clickable="false" 
     android:layout_gravity="center_horizontal" 
     android:text="Transfer Tanpa Berita" /> 
    <TextView 
     android:id="@+id/text" 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
     android:paddingTop="30dp" 
     android:text="No Rekening Tujuan: " /> 
    <EditText 
     android:id="@+id/transferNoRek" 
     android:layout_width="fill_parent" 
     android:layout_height="wrap_content" 
     android:layout_gravity="center_horizontal" 
     android:inputType="number" 
     android:maxLength="20"> 
    </EditText> 
    <TextView 
     android:id="@+id/text" 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
     android:paddingTop="30dp" 
     android:text="Jumlah: " /> 
    <EditText 
     android:id="@+id/transferJumlah" 
     android:layout_width="fill_parent" 
     android:layout_height="wrap_content" 
     android:layout_gravity="center_horizontal" 
     android:inputType="number" 
     android:maxLength="20"> 
    </EditText> 
    <TextView 
     android:id="@+id/text" 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
     android:paddingTop="30dp" 
     android:text="No HP Tujuan: " /> 
    <EditText 
     android:id="@+id/transferNoHP" 
     android:layout_width="fill_parent" 
     android:layout_height="wrap_content" 
     android:layout_gravity="center_horizontal" 
     android:inputType="number" 
     android:maxLength="15"> 
    </EditText> 


    <Button 
     android:id="@+id/transferButton" 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
     android:layout_gravity="center_horizontal" 
     android:text="Kirim" 
     android:onClick="validatePin"> 
    </Button> 

</LinearLayout> 

回答

1

我終於找到了答案,以我自己的問題。

我設置了android:windowSoftInputMode int標籤活動不是實際的活動。在我看來,它的原因是Tab活動是其他活動的調用者。

謝謝。

+1

你能告訴我哪個android:windowSoftInputMode你設置爲解決問題嗎? – 2013-05-01 07:26:12