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; }
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 (); }
/// <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]; }
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; }
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; }
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; }
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; } }
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); }
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); }
private static View RefreshProgressBar(ViewGroup refreshView) { return refreshView.FindViewById(Resource.Id.pull_to_refresh_progress); }
private static View RefreshImage(ViewGroup refreshView) { return refreshView.FindViewById(Resource.Id.pull_to_refresh_image); }
private static TextView RefreshTextView(ViewGroup refreshView) { return (refreshView.FindViewById<TextView>(Resource.Id.pull_to_refresh_text)); }
public virtual StickyHeaderBuilder SetHeader(int idResource, ViewGroup view) { this.header = view.FindViewById(idResource); return this; }
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; }