开发者

How to 'hide'/'not call' screen keyboard(soft input) on click event for EditText

开发者 https://www.devze.com 2023-03-29 02:46 出处:网络
I\'m doing my application with my tablet, is there anyway to consume the onClick event? it\'s like: cdProduto.setOnClickListener(new View.OnClickListener() {

I'm doing my application with my tablet, is there anyway to consume the onClick event?

it's like:

cdProduto.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            startActivity(new Intent(produtos.this, calc.class));
    开发者_Go百科    }
});


If you want to hide the OnScreen keyboard you can use: this.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN);

or in the Manifest:

<activity android:name=".YourActivity" android:configChanges="keyboardHidden"></activity>
0

精彩评论

暂无评论...
验证码 换一张
取 消