本文整理汇总了C#中LinearLayout.GetChildAt方法的典型用法代码示例。如果您正苦于以下问题:C# LinearLayout.GetChildAt方法的具体用法?C# LinearLayout.GetChildAt怎么用?C# LinearLayout.GetChildAt使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LinearLayout
的用法示例。
在下文中一共展示了LinearLayout.GetChildAt方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: PageSelected
/// <summary>
/// page selected
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void PageSelected(object sender, PageSelectedEventArgs e)
{
ll = FindViewById<LinearLayout>(Resource.Id.ll);
for (int i = 0; i < views.Count; i++)
{
dots[i] = (ImageView)ll.GetChildAt(i);
dots[i].Enabled = false;
}
dots[e.Position].Enabled = true;
}
示例2: OnCreate
protected override void OnCreate(Bundle savedInstanceState)
{
base.OnCreate(savedInstanceState);
SetContentView(Resource.Layout.activity_guide);
viewPager = FindViewById<ViewPager>(Resource.Id.viewpager);
//the layout
LayoutInflater mLi = LayoutInflater.From(this);
view1 = mLi.Inflate(Resource.Layout.guide_first, null);
view2 = mLi.Inflate(Resource.Layout.guide_second, null);
view3 = mLi.Inflate(Resource.Layout.guide_third, null);
views = new List<View>();
views.Add(view1);
views.Add(view2);
views.Add(view3);
//the adapter
viewPager.Adapter = new ViewPagerAdapter(views);
//page selected
viewPager.PageSelected += PageSelected;
ll = FindViewById<LinearLayout>(Resource.Id.ll);
//the dot infomation
dots = new ImageView[3];
for (int i = 0; i < views.Count; i++)
{
dots[i] = (ImageView)ll.GetChildAt(i);
dots[i].Enabled = false;
}
dots[0].Enabled = true;
//the button
btnStart = view3.FindViewById<Button>(Resource.Id.startBtn);
btnStart.Click += Start;
}
示例3: CardContains
private bool CardContains(string s, LinearLayout content)
{
for (int i = 0; i < content.ChildCount; i++)
{
if (content.GetChildAt(i).FindViewById<TextView>(Resource.Id.profile_card_entry_content).Text == s)
{
return true;
}
}
return false;
}