DragListView
hereという外部ライブラリを使用しています。このDragListView
はFrameLayout
に続き、内部にはRecyclerView
が含まれています。構造は次のようになります。Android - AdjustResizeはFrameLayoutを拡張する外部ライブラリでは機能しません
アイテムには、EditText
が含まれています。 EditText
が画面上部にあります(ソフトキーボードが表示されている場合は表示されません)。しかし、ソフトキーボードでカバーされているものは、myEditText.requestFocus();
と呼ばれ、その後EditText
というキーボードをカバーすると、一度にフォーカスを失います。
ここに私の活動のレイアウトがあります。
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
tools:context="com.example.ui.activities.ChecklistsActivity">
<include layout="@layout/custom_action_bar"
android:id="@+id/action_bar"/>
<com.woxthebox.draglistview.DragListView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="top"
android:id="@+id/recycler_view_checklists"
/>
</LinearLayout>
android:layout_gravity="top"
DragListViewがRecyclerView
内部にネストされた子である私の古い構造を持つかつて私のための作品(私はRecyclerView
のトップ重力を設定し)、それはこの場合にはもう働いていません。
AdjustPan
を使用することはできません。これは、私のアクションバーを押し離すためです(ただし、悲しいことです)。私のアプリはフルスクリーンではありません(まだステータスバーを見ることができます、私はそれがフルスクリーンではないと思います、私が間違っていたら私を修正してください)。私はいくつかのことを試みたが、何も働かなかった。
私はmyEditText.setFocusable(true);
とmyEditText.setFocusableInTouchMode(true);
をmyEditText.requestFocus();
の直前に呼び出しました。
DragListView
またはLinearLayout
にはandroid:descendantFocusability="afterDescendants"
を入力しました。
私は
InputMethodManager imm = (InputMethodManager) context.getSystemService(Context.INPUT_METHOD_SERVICE);
imm.toggleSoftInput(InputMethodManager.SHOW_FORCED,0);
か念のためにgetCurrentFocus();
InputMethodManager imm = (InputMethodManager) activity.getSystemService(Context.INPUT_METHOD_SERVICE);
imm.showSoftInput(view, InputMethodManager.SHOW_IMPLICIT);
そして、もう一つのための活動を受けKeyboardUtilsと同じようにポップアップキーボードを呼び出すのさまざまな方法を試してみました。 edtSubItemName.setImeActionLabel("Done", KeyEvent.KEYCODE_ENTER);
の「カスタム」キーボードに関連するものがあるかどうかわかりません。これは、「完了」アクションキーを含むEditText
の複数行が必要なためです。 EditText
項目のXMLはここにある:それは見えるように押すボタンがありますので
<EditText
android:id="@+id/edit_text_sub_checklist_item"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/height_checklist_setting"
android:layout_marginRight="@dimen/height_checklist_setting"
android:inputType="text"
android:imeOptions="actionDone"
android:maxLength="256"
android:textSize="@dimen/text_size_default"
android:visibility="invisible" />
android:visibility="invisible"
です。
私は数日間それを怒っています。私は何かが欠けていた?詳細はお気軽にお問い合わせください。
貴重な時間をいただきありがとうございます。