Android的如何在三星标签2禁用predictive文本编程 [英] Android How to disabled predictive text programatically in samsung tab 2

查看:201
本文介绍了Android的如何在三星标签2禁用predictive文本编程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的code是:

<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:paddingLeft="@dimen/activity_horizontal_margin"
        android:paddingRight="@dimen/activity_horizontal_margin"
        android:paddingTop="@dimen/activity_vertical_margin"
        android:paddingBottom="@dimen/activity_vertical_margin"
        tools:context=".MainActivity">

        <EditText
                android:layout_width="200dp"
                android:layout_height="wrap_content"
                android:id="@+id/editText"
                android:layout_alignParentTop="true"
                android:layout_alignParentLeft="true"
                android:layout_marginLeft="53dp"
                android:layout_marginTop="34dp"
                android:inputType="textNoSuggestions|text"/>
</RelativeLayout>

JAVA code我使用。

JAVA Code I Use.

editText = (EditText) findViewById(R.id.editText);
editText.setInputType(InputType.TYPE_MASK_CLASS|InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS);

我使用的android:inputType下= |中的EditTexttextNoSuggestions文其禁用predictive文本的所有设备,但在三星标签2 它不工作。
我也申请过的Andr​​oid code,但似乎它的开放让在为残疾此predictive文本框中输入任何其他建议三星表2。

I use android:inputType="textNoSuggestions|text" in EditText its disabled predictive text for all devices but in Samsung Tab 2 it's not working. I also apply through android code but seems its open give any other suggestions for disabled this predictive text box in Samsung Tab 2.

其他设备preVIEW它没有显示predictive文本框。

Other device preview it's not showing predictive text box.

三星标签2 preVIEW它显示predictive文本框。

Samsung Tab 2 preview it's showing predictive text box.

推荐答案

我也同样的问题是,一旦在时间,我找到解决办法改变的EditText输入类型为 textVisiblePassword 如下面的XML布局提

i have also same problem is once upon time and i am find solution change edittext input type as textVisiblePassword like mention below xml layout

<EditText
            android:id="@+id/password"
            android:layout_width="320dp"
            android:layout_height="50dp"
            android:textColor="@android:color/black"
            android:ems="10"
            android:inputType="textVisiblePassword"
            android:padding="10dp"
            android:layout_marginTop="1dp"
            android:textSize="22dp" />

这将适用于三星TAB2在以下code
 的android:inputType下=textVisiblePassword

这篇关于Android的如何在三星标签2禁用predictive文本编程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆