拨动我有对话框其中有一个EditText上得到由软输入keyboard.I've尝试了所有的职位重叠的,我可以喜欢Android- AlertDialog不动键盘上方,当它在FullscreenActivity
dialog.getWindow().setSoftInputMode(ADJUST_RESIZE)
,并设置对话的主题,但他们都没有工作。我认为我的全屏活动已经改变的东西,但我不知道它是什么
View layout= LayoutInflater.from(context).inflate(R.layout.add_bookmark_dialog_layout,null);
final EditText note=(EditText)layout.findViewById(R.id.bookmark_note);
TextView page= (TextView)layout.findViewById(R.id.bookmark_page);
TextView file=(TextView)layout.findViewById(R.id.bookmark_file);
page.setText(String.valueOf(currentPage));
file.setText(fileName);
AlertDialog.Builder builder=new AlertDialog.Builder(context).setView(layout).setTitle("Add New Bookmark").setPositiveButton("OK", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
Bookmark newBookmark= db.addBookmark(currentPage,note.getText().toString(),fileName);
adapter.add(newBookmark);
}
}).setNegativeButton("Cancel",null);
AlertDialog dialog=builder.create();
//Not working : dialog.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE);
dialog.show();
这里我AndroidManifest.xml中
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
//where dialog pop up
android:name=".ReadingActivity"
android:configChanges="orientation|keyboardHidden|screenSize"
android:label="@string/title_activity_reading"
android:parentActivityName=".MainActivity"
android:theme="@style/FullscreenTheme">