Fix showing keyboard in tablets

This commit is contained in:
serso 2016-02-22 15:45:22 +01:00
parent 9af30b08ce
commit 71c4f66300
4 changed files with 11 additions and 6 deletions

View File

@ -39,7 +39,7 @@
android:clearTaskOnLaunch="true" android:clearTaskOnLaunch="true"
android:label="@string/c_app_name" android:label="@string/c_app_name"
android:launchMode="singleTop" android:launchMode="singleTop"
android:windowSoftInputMode="adjustPan"> android:windowSoftInputMode="stateHidden|adjustPan">
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN" /> <action android:name="android.intent.action.MAIN" />

View File

@ -57,6 +57,12 @@ public class EditorFragment extends BaseFragment {
return view; return view;
} }
@Override
public void onResume() {
super.onResume();
editorView.requestFocus();
}
@Override @Override
public void onDestroyView() { public void onDestroyView() {
editor.clearView(editorView); editor.clearView(editorView);

View File

@ -21,11 +21,9 @@
~ Email: se.solovyev@gmail.com ~ Email: se.solovyev@gmail.com
~ Site: http://se.solovyev.org ~ Site: http://se.solovyev.org
--> -->
<org.solovyev.android.calculator.EditorView a:id="@+id/calculator_editor" <org.solovyev.android.calculator.EditorView
a:id="@+id/calculator_editor"
style="@style/CppText.Editor" style="@style/CppText.Editor"
xmlns:a="http://schemas.android.com/apk/res/android" xmlns:a="http://schemas.android.com/apk/res/android"
a:hint="@string/c_calc_editor_hint" a:hint="@string/c_calc_editor_hint"
a:padding="@dimen/cpp_editor_padding" a:padding="@dimen/cpp_editor_padding" />
a:scrollbars="vertical"
a:singleLine="false"
a:textIsSelectable="true" />

View File

@ -67,6 +67,7 @@
<item name="android:textSize">@dimen/cpp_min_editor_text_size</item> <item name="android:textSize">@dimen/cpp_min_editor_text_size</item>
<item name="android:textColor">?attr/cpp_text_color</item> <item name="android:textColor">?attr/cpp_text_color</item>
<item name="android:inputType">textMultiLine|textNoSuggestions</item> <item name="android:inputType">textMultiLine|textNoSuggestions</item>
<item name="android:scrollbars">vertical</item>
</style> </style>
<style name="CppText.Display" parent="CppText"> <style name="CppText.Display" parent="CppText">