【发布时间】:2015-07-24 12:39:39
【问题描述】:
我想在我的布局中复制这种效果。但是在我的布局中,当键盘出现时,我的弹出窗口没有调整。 该设备调整了我下面的主要活动,而不是弹出窗口。
这是我的弹出 layout.xml :
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/sfondo_semi_trasparente_scuro">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:background="@color/white"
android:orientation="vertical">
<EditText
android:id="@+id/textNomeGiocatoreNewTeam"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="textPersonName"
android:hint="Nome giocatore"/>
<EditText
android:id="@+id/textNumeroMagliaGiocatoreNewTeam"
android:inputType="number"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Numero Maglia"/>
<Button
android:id="@+id/buttonConfirmAddNewPlayer"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Aggiungi giocatore"
android:layout_gravity="center"/>
</LinearLayout>
有人可以帮我吗?
【问题讨论】:
-
尝试使用:popupWindow.setFocusable(true);
-
我使用它.. 如果我不使用它,当我点击 EditText 时键盘不会显示..
标签: android popup soft-keyboard adjustment