Android: How to make Layout clickable when EditText is a child
问题 I have a Relative Layout with an EditText and an ImageView inside it. Under certain circumstances, I would like to make the whole layout clickable and not any of its children. I added an OnClickListener on the layout. And I tried the following with the children: 1. setEnabled(false) 2. setClickable(false) This works for the ImageView but even after the above changes, when I click on the area near the EditText, the keyboard comes up and I can see the cursor in the edit text. Instead of that, I