本文整理汇总了C#中LinearLayout.Invalidate方法的典型用法代码示例。如果您正苦于以下问题:C# LinearLayout.Invalidate方法的具体用法?C# LinearLayout.Invalidate怎么用?C# LinearLayout.Invalidate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LinearLayout
的用法示例。
在下文中一共展示了LinearLayout.Invalidate方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnCreate
protected override void OnCreate(Bundle bundle)
{
base.OnCreate(bundle);
SetContentView(Resource.Layout.Main);
mLinearLayout = FindViewById < LinearLayout >(Resource.Id.main_layout);
mTextView = FindViewById<TextView>(Resource.Id.textview);
mTitle = FindViewById<TextView>(Resource.Id.title);
mSpinner = FindViewById<Spinner>(Resource.Id.spinner);
mSpinner.Adapter = ArrayAdapter.CreateFromResource(this, Resource.Array.leonidstest, Android.Resource.Layout.SimpleSpinnerDropDownItem);
mSpinner.ItemSelected += delegate (object s, AdapterView.ItemSelectedEventArgs e)
{
if (e.Position == 0)
return;
if (mParticleSystem1 != null)
{
mParticleSystem1.StopEmitting();
mParticleSystem1.Cancel();
mParticleSystem1.Dispose();
mParticleSystem1 = null;
}
if (mParticleSystem2 != null)
{
mParticleSystem2.StopEmitting();
mParticleSystem2.Cancel();
mParticleSystem2.Dispose();
mParticleSystem2 = null;
}
mLinearLayout.Invalidate();
mTitle.Text = mSpinner.SelectedItem.ToString();
mShouldFollowTouch = false;
switch (e.Position)
{
case 1:
OneShotSimple();
break;
case 2:
OneShotAdvanced();
break;
case 3:
EmiterSimple();
break;
case 4:
EmitBackgroundSimple();
break;
case 5:
EmiterIntermediate();
break;
case 6:
EmitTimeLimited();
break;
case 7:
EmitWithGravity();
break;
case 8:
mShouldFollowTouch = true;
break;
case 9:
AnimatedParticles();
break;
case 10:
Fireworks();
break;
case 11:
Confetti();
break;
case 12:
Dust();
break;
case 13:
Stars();
break;
default:
break;
}
mSpinner.SetSelection(0);
};
}