本文整理汇总了C#中Spinner.RequestFocus方法的典型用法代码示例。如果您正苦于以下问题:C# Spinner.RequestFocus方法的具体用法?C# Spinner.RequestFocus怎么用?C# Spinner.RequestFocus使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Spinner
的用法示例。
在下文中一共展示了Spinner.RequestFocus方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnCreate
protected override void OnCreate(Bundle bundle)
{
base.OnCreate(bundle);
// Create your application here
SetTheme(Android.Resource.Style.ThemeLight);
SetContentView(Resource.Layout.CrearDenuncia);
//Alert message
AlertDialog.Builder builder = new AlertDialog.Builder(this);
alert = builder.Create();
if (Shared.address != null)
{
spnTipoNombre = FindViewById<Spinner>(Resource.Id.spnTipoNombre);
spnTipoNombre.RequestFocus();
tipos = new string[]{
"Corte de servicio",
"Fuga de Agua",
"Daño a Infraestructura",
"Otros"
};
ids = new int[] { 1, 2, 3, 4 };
ArrayAdapter<string> spinnerArrayAdapter = new ArrayAdapter<string>(this, Android.Resource.Layout.SimpleSpinnerItem, tipos);
spinnerArrayAdapter.SetDropDownViewResource(Android.Resource.Layout.SimpleSpinnerDropDownItem);
spnTipoNombre.Adapter = spinnerArrayAdapter;
spnTipoNombre.ItemSelected += spnTipoNombre_ItemSelected;
txtDescripcion = FindViewById<EditText>(Resource.Id.txtInsertDescripcion);
txtvInsertPais = FindViewById<TextView>(Resource.Id.txtvInsertPais);
txtvInsertAutor = FindViewById<TextView>(Resource.Id.txtvInsertAutor);
txtvinsertCiudad = FindViewById<TextView>(Resource.Id.txtvInsertCiudad);
txtvInsertCalle = FindViewById<TextView>(Resource.Id.txtvInsertCalle);
btnInsertDenuncia = FindViewById<Button>(Resource.Id.btnInsertDenuncia);
imgFoto = FindViewById<ImageView>(Resource.Id.imgInsertFoto);
txtvInsertPais.Text = Shared.address.CountryName;
txtvinsertCiudad.Text = Shared.address.Locality;
txtvInsertCalle.Text = Shared.address.FeatureName;
txtvInsertAutor.Text = "Luis Jovel";
btnInsertDenuncia.Click += btnInsertDenuncia_Click;
imgFoto.Click += imgFoto_Click;
}
}