开发者

Android: To ensure none of the Views are focused when an Activity opens?

开发者 https://www.devze.com 2023-01-18 14:22 出处:网络
I have 2 activities, A1 and A2. My application opens in Activity A1. None of the views in A1 are focused at startup, until I use the arr开发者_Go百科ow keys to navigate through the views.

I have 2 activities, A1 and A2.

My application opens in Activity A1. None of the views in A1 are focused at startup, until I use the arr开发者_Go百科ow keys to navigate through the views.

A button press in A1 launches activity A2.

When A2 opens, the first Button in A2 is focused by default. I do not want this happen. What I want is when A2 opens, none of the buttons are focused until arrow keys are used to naviagte through them(just like it is in A1).

Any idea how I can achieve this?


See the answer to this question for a solution: Stop EditText from gaining focus at Activity startup

0

精彩评论

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

关注公众号