本文整理汇总了C#中Android.Views.ViewGroup.FindViewById方法的典型用法代码示例。如果您正苦于以下问题:C# ViewGroup.FindViewById方法的具体用法?C# ViewGroup.FindViewById怎么用?C# ViewGroup.FindViewById使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Android.Views.ViewGroup
的用法示例。
在下文中一共展示了ViewGroup.FindViewById方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnCreateView
public override View OnCreateView (LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
{
mainLayout = (ViewGroup)inflater.Inflate (Resource.Layout.RecentTimeEntriesListFragment, container, false);
mainLayout.FindViewById<TextView> (Resource.Id.EmptyTitleTextView).SetFont (Font.Roboto);
mainLayout.FindViewById<TextView> (Resource.Id.EmptyTextTextView).SetFont (Font.RobotoLight);
return mainLayout;
}
示例2: setTimerFrame
public void setTimerFrame(ViewGroup timerFrame)
{
this.timerFrame = timerFrame;
recipeStepTimer.SetBarTextView (timerFrame.FindViewById<TextView> (Resource.Id.walkthrough_time));
recipeStepTimer.SetProgressBar (timerFrame.FindViewById<ProgressBar> (Resource.Id.walkthrough_bar));
timerFrame.FindViewById<TextView> (Resource.Id.walkthrough_text).Text = this.timerName;
recipeStepTimer.TimeUpdate ();
}
示例3: InstantiateItem
/// <summary>
/// 初始item位置界面
/// </summary>
/// <returns>The item.</returns>
/// <param name="container">Container.</param>
/// <param name="position">Position.</param>
public override Java.Lang.Object InstantiateItem (ViewGroup container, int position)
{
container.AddView(views[position]);
if (position == views.Count - 1) {
var btn_start_use = container.FindViewById<Button> (Resource.Id.btn_start_use);
btn_start_use.SetOnClickListener (this);
} else {
var btn_skip = container.FindViewById<Button> (Resource.Id.btn_skip);
btn_skip.SetOnClickListener (this);
}
return views[position];
}
示例4: OnCreateView
public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
{
_mRootView = (ViewGroup)inflater.Inflate(Resource.Layout.fragment_list_view, container, false);
_mListView = (ListView)_mRootView.FindViewById(Resource.Id.generalListView);
_mListView.FastScrollEnabled = true;
return null;
}
示例5: OnCreateView
public override Android.Views.View OnCreateView (LayoutInflater inflater, ViewGroup container, Bundle p2)
{
mRootView = (ViewGroup)inflater.Inflate (Resource.Layout.fragment_vendor_detail, null);
mName = mRootView.FindViewById<TextView> (Resource.Id.vendor_name);
mStarred = mRootView.FindViewById<CompoundButton> (Resource.Id.star_button);
mStarred.Focusable = true;
mStarred.Clickable = true;
// Larger target triggers star toggle
View starParent = mRootView.FindViewById (Resource.Id.header_vendor);
FractionalTouchDelegate.SetupDelegate (starParent, mStarred, new RectF (0.6f, 0f, 1f, 0.8f));
mLogo = mRootView.FindViewById<ImageView> (Resource.Id.vendor_logo);
mUrl = mRootView.FindViewById<TextView> (Resource.Id.vendor_url);
mDesc = mRootView.FindViewById<TextView> (Resource.Id.vendor_desc);
mProductDesc = mRootView.FindViewById<TextView> (Resource.Id.vendor_product_desc);
return mRootView;
}
示例6: OnCreateView
public override Android.Views.View OnCreateView (LayoutInflater inflater, ViewGroup container, Bundle p2)
{
mRootView = (ViewGroup)inflater.Inflate (Resource.Layout.fragment_session_detail, null);
mTabHost = mRootView.FindViewById<TabHost> (Android.Resource.Id.TabHost);
mTabHost.Setup ();
mTitle = mRootView.FindViewById<TextView> (Resource.Id.session_title);
mSubtitle = mRootView.FindViewById<TextView> (Resource.Id.session_subtitle);
mStarred = mRootView.FindViewById<CompoundButton> (Resource.Id.star_button);
mStarred.CheckedChange += HandleCheckedChange;
mStarred.Focusable = true;
mStarred.Clickable = true;
// Larger target triggers star toggle
View starParent = mRootView.FindViewById<View> (Resource.Id.header_session);
FractionalTouchDelegate.SetupDelegate (starParent, mStarred, new RectF (0.6f, 0f, 1f, 0.8f));
mAbstract = mRootView.FindViewById<TextView> (Resource.Id.session_abstract);
mRequirements = mRootView.FindViewById<TextView> (Resource.Id.session_requirements);
SetupSummaryTab ();
SetupNotesTab ();
SetupLinksTab ();
return mRootView;
}
示例7: InstantiateItem
public override Java.Lang.Object InstantiateItem(ViewGroup container, int position)
{
try
{
View view;
Int32 lastExpandedPosition = -1;
CreateExpandableListData ();
if (position == 0) //Current Booking tab
{
view = LayoutInflater.From (container.Context).Inflate (Resource.Layout.CurrentBookingLayout, container, false);
container.AddView (view);
flCurrentBookings = container.FindViewById<FrameLayout> (Resource.Id.flCurrentBookings);
flNoCurrentBookings = container.FindViewById<FrameLayout> (Resource.Id.flNoCurrentBookings);
elvCurrentBookings = container.FindViewById<ExpandableListView> (Resource.Id.elvCurrentBookings);
if (dictGroupCurr.Count > 0)
{
flNoCurrentBookings.Visibility = ViewStates.Gone;
flCurrentBookings.Visibility = ViewStates.Visible;
elvCurrentBookings.SetAdapter (new ExpandViewBookingAdapter (parent, dictGroupCurr));
elvCurrentBookings.ChildClick += delegate(object sender, ExpandableListView.ChildClickEventArgs e) {
string itmGroup = lstKeysCurr [e.GroupPosition];
WorkshopBooking itmChild = dictGroupCurr [itmGroup];
};
elvCurrentBookings.GroupExpand += delegate(object sender, ExpandableListView.GroupExpandEventArgs e) {
if (lastExpandedPosition != -1 && e.GroupPosition != lastExpandedPosition) {
elvCurrentBookings.CollapseGroup (lastExpandedPosition);
}
lastExpandedPosition = e.GroupPosition;
};
}
else
{
flNoCurrentBookings.Visibility = ViewStates.Visible;
flCurrentBookings.Visibility = ViewStates.Gone;
}
}
else //Past Bookings
{
view = LayoutInflater.From (container.Context).Inflate (Resource.Layout.PastBookings, container, false);
container.AddView (view);
flPastBookings = container.FindViewById<FrameLayout> (Resource.Id.flPastBookings);
flNoPastBookings = container.FindViewById<FrameLayout> (Resource.Id.flNoPastBookings);
elvPastBookings = container.FindViewById<ExpandableListView> (Resource.Id.elvPastBookings);
if (dictGroupPast.Count > 0)
{
flNoPastBookings.Visibility = ViewStates.Gone;
flPastBookings.Visibility = ViewStates.Visible;
elvPastBookings.SetAdapter (new ExpandViewBookingAdapter (parent, dictGroupPast));
elvPastBookings.ChildClick += delegate(object sender, ExpandableListView.ChildClickEventArgs e) {
string itmGroup = lstKeysPast [e.GroupPosition];
WorkshopBooking itmChild = dictGroupPast [itmGroup];
};
elvPastBookings.GroupExpand += delegate(object sender, ExpandableListView.GroupExpandEventArgs e) {
if (lastExpandedPosition != -1 && e.GroupPosition != lastExpandedPosition) {
elvPastBookings.CollapseGroup (lastExpandedPosition);
}
lastExpandedPosition = e.GroupPosition;
};
}
else
{
flNoPastBookings.Visibility = ViewStates.Visible;
flPastBookings.Visibility = ViewStates.Gone;
}
}
return view;
}
catch (Exception e)
{
ErrorHandling.LogError (e, container.Context);
return -1;
}
}
示例8: TimerDisplayFrame
public TimerDisplayFrame(ViewGroup frame)
{
this.displayFrame = frame;
this.countdownDisplay = frame.FindViewById<TextView> (Resource.Id.walkthrough_time);
this.progressBar = frame.FindViewById<ProgressBar> (Resource.Id.walkthrough_bar);
}
示例9: ViewHolder
public ViewHolder (ViewGroup scorecardItem)
{
mQuizView = scorecardItem.FindViewById<TextView> (Resource.Id.quiz);
mAnswerView = scorecardItem.FindViewById<TextView> (Resource.Id.answer);
mSolvedState = scorecardItem.FindViewById<ImageView> (Resource.Id.solved_state);
}
示例10: RefreshProgressBar
private static View RefreshProgressBar(ViewGroup refreshView)
{
return refreshView.FindViewById(Resource.Id.pull_to_refresh_progress);
}
示例11: RefreshImage
private static View RefreshImage(ViewGroup refreshView)
{
return refreshView.FindViewById(Resource.Id.pull_to_refresh_image);
}
示例12: RefreshTextView
private static TextView RefreshTextView(ViewGroup refreshView)
{
return (refreshView.FindViewById<TextView>(Resource.Id.pull_to_refresh_text));
}
示例13: SetHeader
public virtual StickyHeaderBuilder SetHeader(int idResource, ViewGroup view)
{
this.header = view.FindViewById(idResource);
return this;
}
示例14: OnCreateView
public override Android.Views.View OnCreateView (LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
{
mRootView = (ViewGroup)inflater.Inflate (Resource.Layout.fragment_tracks_dropdown, null);
mTitle = (TextView)mRootView.FindViewById (Resource.Id.track_title);
mAbstract = (TextView)mRootView.FindViewById (Resource.Id.track_abstract);
mRootView.Click += (sender, e) => {
mListPopupWindow = new ListPopupWindow (Activity);
mListPopupWindow.SetAdapter (mAdapter);
mListPopupWindow.Modal = true;
mListPopupWindow.SetContentWidth (400);
mListPopupWindow.AnchorView = mRootView;
mListPopupWindow.SetOnItemClickListener (this);
mListPopupWindow.Show ();
mListPopupWindow.SetOnDismissListener (this);
};
return mRootView;
}