I am using Android Studio 2.1.1.
I open a local html file with an input of type text in my webview. I found that the backspace key of the dynamic keyboard does not delete any of the Thai vowels which are either over or under a consonant letter. However, on the EditText view, the backspace key does not have any issue with the Thai vowels. It deletes all characters, both the Thai consonants and vowels.
MainActivity.java
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
final EditText simpleEditText = (EditText) findViewById(R.id.simpleEditText);
WebView wv = (WebView)findViewById(R.id.webview);
wv.loadUrl("file:///android_asset/test_input.html");
}
}
activity_main.xml
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context="com.thongjoon.edittext.MainActivity">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@id/simpleText"
android:text="Hello World!"/>
<EditText
android:id="@+id/simpleEditText"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="@id/simpleText"
android:hint="Enter Your Name Here" />
<WebView android:id="@+id/webview"
android:layout_below="@id/simpleEditText"
android:layout_width="fill_parent"
android:layout_height="50dp"/>
</RelativeLayout>
test_input.html
<!doctype html>
<html lang="th">
<head>
<meta charset="utf-8">
<title>Document</title>
</head>
<body>
ทดสอบ<input type="text" name="yourname" value="Your Name"><br>
</body>
</html>
I am new to Android. I really don't know how to go about this problem. Please advise.