I want to disable auto-correction and auto-complete (word suggestions from the keyboard) on my cellphone within an app I'm working on. It's a vocabulary trainer, so I want the User to type the input without using any tools. Is there a way to do this with Java? Some relevant code snippets:
The user-interaction:
public void onClick(View view) {
TextView textView = (TextView) getView().findViewById(R.id.textview);
final String answer = textView.getText().toString();
passData(answer);
}
And the xml:
<EditText
android:id="@+id/textview"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintBottom_toTopOf="@id/button_first"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:background="#CCCCCC"
android:ems="10"
android:inputType="textPersonName" >
<requestFocus />
</EditText>
P.S. I'm new to App Development, so you might see some flaws in my code above - in that case, please tell me!