. ( Xamarin #, Java ) :
private void InitFocus()
{
Java.Lang.Runnable rable = new Java.Lang.Runnable(()=>
{
EditText maleCount = FindViewById<EditText>(Resource.Id.txtMaleCount);
maleCount.RequestFocus();
maleCount.SelectAll();
});
new Handler().Post(rable);
}
2 : One - , , . , , txtMaleCount EditText, , ( , , ),
Obviously, the unintuitive part was the need for Postit. Doing this directly (in the user interface thread) did not seem to have any effect.
source
share