• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps Code to hide the Chinese suggestions when the user enters text on the editText?

Is there such a code to hide the Chinese suggestions when the user enters text on the editText? I was able to find the code for hiding the virtual keyboard using:

Code:
InputMethodManager imm = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);
                imm.hideSoftInputFromWindow(name.getWindowToken(),0);

I was expecting that it will also hide the chinese characters that pop out when the user enters the text... but it didn't. It only hid the keyboard. T_T Anybody have any idea on this...?

~Cheers
~Happy new year everyone.
~Hyun Jung Soh
 
I have just tried this today but it does not seem to work... I am using Android 2.1 API level 7 and that is supposed to be supported by level 5 and above...

However, I was able to find a remedy by using:

Code:
android:inputType="textVisiblePassword"

I also made sure that the setInputType(0) was inside an onClickListener.. not on the onCreate() so that it will not over write the inputType that I have set for the app.

Code:
[COLOR=YellowGreen]//when the user clicks on the editText, the virtual keyboard won't appear. :)[/COLOR]
name.setOnClickListener(new View.OnClickListener() {
            
            @Override
            public void onClick(View v) {
                InputMethodManager imm = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);
                imm.hideSoftInputFromWindow(name.getWindowToken(),0);
                name.setInputType(0);
            }
        });
 
T_T My grades heavily depend on it. I mean my professor said he is annoyed when ever he sees the keyboard and the suggestions thingy, so I had to hide it during the presentation. I know it's A BIG SIN especially when it's going to be installed on a real device. But since it's just on the emulator, I guess it will be okay.
 
Yeah... But I find it a bit tedious because the emulator's settings seem to restart everytime my app gets re-installed (as I am currently in the process of testing it). So I tried write it on code instead.
 
Back
Top Bottom