本文整理汇总了C#中ImageButton.CallOnClick方法的典型用法代码示例。如果您正苦于以下问题:C# ImageButton.CallOnClick方法的具体用法?C# ImageButton.CallOnClick怎么用?C# ImageButton.CallOnClick使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ImageButton
的用法示例。
在下文中一共展示了ImageButton.CallOnClick方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnCreateView
public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
{
View view = inflater.Inflate(Resource.Layout.PopularActivity, container, false);
Scope = "Local";
Type = "Timed";
TopTimedGlobalPostFeedFragment = new PostFeedFragment();
TopTimedGlobalPostFeedFragment.EmptyTableString = Strings.no_active_posts;
TopTimedGlobalPostFeedFragment.Master = this;
TopTimedGlobalPostFeedFragment.Target = FeedTypeEnum.FeedType.PopularGlobalTimedFeed;
TopTimedGlobalPostFeedFragment.NewPageContainerID = Resource.Id.fragment_container_page;
TopTimedLocalFeedFragment = new PostFeedFragment();
TopTimedLocalFeedFragment.EmptyTableString = Strings.no_active_posts;
TopTimedLocalFeedFragment.Master = this;
TopTimedLocalFeedFragment.Target = FeedTypeEnum.FeedType.PopularLocalTimedFeed;
TopTimedLocalFeedFragment.NewPageContainerID = Resource.Id.fragment_container_page;
TopTimersGlobalUserFeedFragment = new UserFeedFragment();
TopTimersGlobalUserFeedFragment.EmptyTableString = Strings.no_users_found;
TopTimersGlobalUserFeedFragment.Master = this;
TopTimersGlobalUserFeedFragment.Target = FeedTypeEnum.FeedType.PopularGlobalTimersFeed;
TopTimersLocalUserFeedFragment = new UserFeedFragment();
TopTimersLocalUserFeedFragment.EmptyTableString = Strings.no_users_found;
TopTimersLocalUserFeedFragment.Master = this;
TopTimersLocalUserFeedFragment.Target = FeedTypeEnum.FeedType.PopularLocalTimersFeed;
View toolbarLayout = view.FindViewById(Resource.Id.toolbarLayout);
((TextView)toolbarLayout.FindViewById(Resource.Id.toolbar_titleCenter)).Text = "Popular";
timersButton = (Button)view.FindViewById(Resource.Id.timers);
timersButton.Click += delegate
{
timedButton.SetBackgroundResource(Resource.Drawable.LeftSegmentedControl);
timedButton.SetTextColor(Android.Graphics.Color.ParseColor("#338a9e"));
timersButton.SetBackgroundResource(Resource.Drawable.RightSegmentedControlSelected);
timersButton.SetTextColor(Android.Graphics.Color.White);
Type = "Timers";
ShowCorrectPage();
};
timedButton = (Button)view.FindViewById(Resource.Id.timed);
timedButton.Click += delegate
{
timedButton.SetBackgroundResource(Resource.Drawable.LeftSegmentedControlSelected);
timedButton.SetTextColor(Android.Graphics.Color.White);
timersButton.SetBackgroundResource(Resource.Drawable.RightSegmentedControl);
timersButton.SetTextColor(Android.Graphics.Color.ParseColor("#338a9e"));
Type = "Timed";
ShowCorrectPage();
};
localButton = (ImageButton)view.FindViewById(Resource.Id.local);
localButton.Click += delegate
{
localButton.SetImageResource(Resource.Drawable.localselected);
globalButton.SetImageResource(Resource.Drawable.global);
Scope = "Local";
ShowCorrectPage();
};
globalButton = (ImageButton)view.FindViewById(Resource.Id.global);
globalButton.Click += delegate
{
localButton.SetImageResource(Resource.Drawable.local);
globalButton.SetImageResource(Resource.Drawable.globalselected);
Scope = "Global";
ShowCorrectPage();
};
timedButton.CallOnClick();
localButton.CallOnClick();
return view;
}