[Panlingual] Do not show dialog in recycle. Set LocaleEditor as the

parent fragment and control the dialog.

Keep the dialog and the locale list after rotation

Bug: 279527362
Change-Id: I349fd9d0fea5b43a8bbb2a23fa60fc4c5436c5cf
Test: make RunSettingsRoboTests -j128 ROBOTEST_FILTER=LocaleListEditorTest
Test: atest LocaleDialogFragmentTest
This commit is contained in:
Zoey Chen
2023-05-02 08:47:51 +00:00
parent d2e8495f4c
commit fb6b6b0bcc
6 changed files with 266 additions and 168 deletions

View File

@@ -34,15 +34,4 @@ class LocaleRecyclerView extends RecyclerView {
public LocaleRecyclerView(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
}
@Override
public boolean onTouchEvent(MotionEvent e) {
if (e.getAction() == MotionEvent.ACTION_UP || e.getAction() == MotionEvent.ACTION_CANCEL) {
LocaleDragAndDropAdapter adapter = (LocaleDragAndDropAdapter) this.getAdapter();
if (adapter != null) {
adapter.doTheUpdateWithMovingLocaleItem();
}
}
return super.onTouchEvent(e);
}
}