There checkbox android listview and edittext, edittext not eject input box
There checkbox android listview and edittext, when the checkbox is checked edittext want is available, when unchecked unavailable. The results can not be ejected input box. Tip the following :05-30 09:16:21.820: W / TextView (15726): TextView does not support text selection Action mode cancelled ..I hope heroes help look!
public class Adpter extends BaseAdapter { private List
<-! Main posts under Banner (D4) -><-! Posts under the main text (D5) -> Reply: Dinga own Reply: checkbox will be blocked listview item's click and focusable attribute can only respond when the user clicks the checkbox, and the corresponding listview item click event can not be obtained, it is recommended not to use the checkbox Reply: Habit, error logs to see, question to send a detailed log. Reply: Thank you for your suggestion, I first posted, O (∩ _ ∩) O ~ the future will be improved! In fact, in this place, checkbox listener: holder.radio0.setOnCheckedChangeListener (new OnCheckedChangeListener () {
@ Override public void onCheckedChanged (CompoundButton buttonView, boolean isChecked) { / / TODO Auto-generated method stub . data.get (position) put ("eat", isChecked); if (! isChecked) { holder.radioGroup.setEnabled (false); holder.radioGroup.setFocusable (false); holder.radioGroup.clearCheck (); for (RadioButton radionew: radio) { radionew.setEnabled (false); radionew.setFocusable (false); } holder.many.setFocusable (false); holder.many.setEnabled (false); holder.many.setText ("0");
}); editText has made a response, and when the checkbox is selected when, edittext listeners can also react to events: holder.many.setOnClickListener (new View.OnClickListener () {
@ Override public void onClick (View v) { / / TODO Auto-generated method stub Log.i ("data", "i am clicked"); Log.i ("data", "holder.many.isFocusable =" + holder.many.isFocusable ()); Log.i ("data", "holder.many.isEnabled =" + holder.many.isEnabled ());
} }); You can also print out the information isFocusable isEnabled are true, is not eject input box. Reply: Pro, you can not eject the input box What does it mean? Reply: Is click EditText text input keyboard does not pop up get out Reply: In Log.i ("data", "i am clicked"); preceded v.requestFocus ();
Reply:
Tried useless Reply:
Tried useless Reply:
Tried useless Reply: 1 Check your manifest see if it is set up does not pop up input method attributes. 2. You can try this when user click edit text.
Hello O (∩ _ ∩) O Thank you for answering! This phenomenon is very strange, 1, is to click Edittext will prompt TextView does not support text selection. Action mode cancelled. 2, is isFocusable isEnabled are true, not bombs keyboard. But recall getview keyboard can pop up 3, I holder.many.setFocusable (false); holder.many.setEnabled (false); To holder.many.setVisibility (View.INVISIBLE); holder.many.setFocusable (true); holder.many.setEnabled (true); To holder.many.setVisibility (View.VISIBLE); This will pop up keyboard input, is not it, and properties set on it? Reply: setFocusable can get the focus is set, setEnabled is set is available, and can pop up keyboard input are directly related. Reply:
Pop is not the focus of the problem. Similarly, if there is less focus button is button will get priority in the listview, then editText not get the focus, not bombs edit box, you do not have to do so in the listview button up? I used the listView in CheckBox, there editText, the solution is very simple, a code, you can set editText gets focus, listview corresponding item click event is also a way to get, because a little problem called the others do not use. . It hurts too much egg bar. Reply:
Pop is not the focus of the problem. Similarly, if there is less focus button is button will get priority in the listview, then editText not get the focus, not bombs edit box, you do not have to do so in the listview button up? I used the listView in CheckBox, there editText, the solution is very simple, a code, you can set editText gets focus, listview corresponding item click event is also a way to get, because a little problem called the others do not use. . It hurts too much egg bar. Reply:
Pop is not the focus of the problem. Similarly, if there is less focus button is button will get priority in the listview, then editText not get the focus, not bombs edit box, you do not have to do so in the listview button up? I used the listView in CheckBox, there editText, the solution is very simple, a code, you can set editText gets focus, listview corresponding item click event is also a way to get, because a little problem called the others do not use. . It hurts too much egg bar. Reply: This data is dynamic listview do? Then also get content edittext entered?
No comments:
Post a Comment