diff --git a/res/layout/keyboard_layout_picker.xml b/res/layout/keyboard_layout_picker.xml
index 6b163da250c..b25c228bf34 100644
--- a/res/layout/keyboard_layout_picker.xml
+++ b/res/layout/keyboard_layout_picker.xml
@@ -20,6 +20,13 @@
android:id="@+id/keyboard_layout_picker_container"
android:orientation="vertical">
+
+
{
+ if (newKeyboardLayoutPickerController != null) {
+ newKeyboardLayoutPickerController.registerKeyboardSelectedCallback(
+ mKeyboardLayoutSelectedCallback);
+ }
+ };
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
-
+ mInputManager = requireContext().getSystemService(InputManager.class);
ViewGroup fragmentView = (ViewGroup) inflater.inflate(
R.layout.keyboard_layout_picker, container, false);
+ mKeyboardLayoutPreview = fragmentView.findViewById(R.id.keyboard_layout_preview);
getActivity().getSupportFragmentManager()
.beginTransaction()
.replace(R.id.keyboard_layout_title, new NewKeyboardLayoutPickerTitle())
.commit();
NewKeyboardLayoutPickerContent fragment = new NewKeyboardLayoutPickerContent();
+ fragment.setControllerUpdateCallback(mControllerUpdateCallback);
fragment.setArguments(getArguments());
getActivity().getSupportFragmentManager()
.beginTransaction()
.replace(R.id.keyboard_layouts, fragment)
.commit();
-
return fragmentView;
}
}