Bug fix for missing keyboard.

This commit is contained in:
Dmitry Yunitsky 2014-07-23 10:36:20 +03:00 committed by Alex Zolotarev
parent 23abab90b7
commit ae4af4e9e7
2 changed files with 31 additions and 1 deletions

View file

@ -10,7 +10,8 @@
android:layout_height="wrap_content"
android:layout_gravity="center"/>
<WebView
<view
class="com.mapswithme.maps.settings.SettingsActivity$MyWebView"
android:id="@+id/webview_about"
android:layout_width="match_parent"
android:layout_height="@dimen/dialog_max_height"

View file

@ -18,6 +18,7 @@ import android.preference.Preference.OnPreferenceChangeListener;
import android.preference.Preference.OnPreferenceClickListener;
import android.preference.PreferenceActivity;
import android.preference.PreferenceScreen;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.MenuItem;
import android.view.View;
@ -311,4 +312,32 @@ public class SettingsActivity extends PreferenceActivity
private native boolean isDownloadingActive();
// needed for soft keyboard to appear in alertdialog.
// check https://code.google.com/p/android/issues/detail?id=7189 for details
public static class MyWebView extends WebView
{
public MyWebView(Context context)
{
super(context);
}
public MyWebView(Context context, AttributeSet attrs)
{
super(context, attrs);
}
public MyWebView(Context context, AttributeSet attrs, int defStyle)
{
super(context, attrs, defStyle);
}
@Override
public boolean onCheckIsTextEditor()
{
return true;
}
}
}