Up the virtual keyboard
-
25-06-2021 - |
Question
I ran into a situation where a virtual keyboard displayed
1) When setting the listener:
rssURLTV = (TextView) findViewById(R.id.rssURL);
rssURLTV.setOnClickListener(new View.OnClickListener() {
// @Override
public void onClick(View v) {
feedUrl = (String) rssURLTV.getText().toString();
Intent intent = new Intent("urss.database_table");
startActivity(intent);
}
});
2) and activity started ....
for these situations, I do not want display a virtual keyboard
Solution
try this for hiding virtual keyboard in Current Activity:
getWindow().setSoftInputMode(
WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN);
OTHER TIPS
You can try putting
<activity android:name=".Main"
android:label="@string/app_name"
android:windowSoftInputMode="stateHidden"
>
in the android manifest
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow