2016-10-11 6 views
2

내 응용 프로그램에 autocompletetextview이라는 대화 상자 조각이 있지만 소프트 키보드의 위쪽에 정렬되지 않고 드롭 다운 목록이 배치되어 일부에 대한 액세스 권한을 부여하지 않습니다. 항목.대화 상자 부분에있는 소프트 키보드 뒤의 자동 완성 텍스트보기 드롭 다운

<?xml version="1.0" encoding="utf-8"?> 
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
    android:layout_width="match_parent" 
    android:layout_height="wrap_content" 
    android:gravity="center" 
    android:padding="10dp" 
    android:orientation="horizontal" 
    android:windowSoftInputMode="adjustPan|adjustResize"> 

    <android.widget.AutoCompleteTextView 
     android:layout_width="0dp" 
     android:layout_height="wrap_content" 
     android:id="@+id/customDialogAtocompleteTextview" 
     android:layout_weight=".7" 
     android:layout_gravity="top" /> 

    <LinearLayout 
     android:orientation="vertical" 
     android:layout_width="0dp" 
     android:layout_height="wrap_content" 
     android:layout_weight=".3"> 
     <Button 
      android:id="@+id/customDialogBtOk" 
      android:layout_width="match_parent" 
      android:layout_height="wrap_content" 
      android:text="Aceptar"/> 
     <Button 
      android:id="@+id/customDialogBtSearch" 
      android:layout_width="match_parent" 
      android:layout_height="wrap_content" 
      android:text="Buscar"/> 
     <Button 
      android:id="@+id/customDialogBtMore" 
      android:layout_width="match_parent" 
      android:layout_height="wrap_content" 
      android:text="Mas"/> 
    </LinearLayout> 

</LinearLayout> 

그래서 나는 그것이 키보드로 정렬하는 방법을 만들 수 있습니다 : 여기

레이아웃입니까?

답변

6

이론 android:windowSoftInputMode="adjustPan|adjustResize"이 작업을 수행 말아야 있다고하지만 당신은 프로그래밍 방식으로 동일한 작업을 수행 할 수 있도록 몇 가지 이유는,하지를 수행 마법 Aaaaaand

getDialog().getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE); 

를 발생