androidandroid-virtual-keyboard

Up the virtual keyboard


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);