本文整理汇总了C#中ProgressBar.SetBackgroundColor方法的典型用法代码示例。如果您正苦于以下问题:C# ProgressBar.SetBackgroundColor方法的具体用法?C# ProgressBar.SetBackgroundColor怎么用?C# ProgressBar.SetBackgroundColor使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ProgressBar
的用法示例。
在下文中一共展示了ProgressBar.SetBackgroundColor方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnCreateView
public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
{
if (container == null)
{
// Currently in a layout without a container, so no reason to create our view.
return null;
}
MediaController = new MediaController( Rock.Mobile.PlatformSpecific.Android.Core.Context );
RelativeLayout view = new RelativeLayout( Rock.Mobile.PlatformSpecific.Android.Core.Context );
view.LayoutParameters = new RelativeLayout.LayoutParams( ViewGroup.LayoutParams.MatchParent, ViewGroup.LayoutParams.MatchParent );
view.SetBackgroundColor( Android.Graphics.Color.Black );
view.SetOnTouchListener( this );
VideoPlayer = new VideoView( Activity );
VideoPlayer.SetMediaController( MediaController );
VideoPlayer.LayoutParameters = new RelativeLayout.LayoutParams( ViewGroup.LayoutParams.MatchParent, ViewGroup.LayoutParams.WrapContent );
( (RelativeLayout.LayoutParams)VideoPlayer.LayoutParameters ).AddRule( LayoutRules.CenterInParent );
( ( view as RelativeLayout ) ).AddView( VideoPlayer );
VideoPlayer.SetOnPreparedListener( this );
VideoPlayer.SetOnErrorListener( this );
ProgressBar = new ProgressBar( Rock.Mobile.PlatformSpecific.Android.Core.Context );
ProgressBar.Indeterminate = true;
ProgressBar.SetBackgroundColor( Rock.Mobile.UI.Util.GetUIColor( 0 ) );
ProgressBar.LayoutParameters = new RelativeLayout.LayoutParams( ViewGroup.LayoutParams.WrapContent, ViewGroup.LayoutParams.WrapContent );
( (RelativeLayout.LayoutParams)ProgressBar.LayoutParameters ).AddRule( LayoutRules.CenterInParent );
view.AddView( ProgressBar );
ProgressBar.BringToFront();
ResultView = new UIResultView( view, new System.Drawing.RectangleF( 0, 0, NavbarFragment.GetFullDisplayWidth( ), this.Resources.DisplayMetrics.HeightPixels ), delegate { TryPlayMedia( ); } );
return view;
}
示例2: OnCreateView
public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
{
if (container == null)
{
// Currently in a layout without a container, so no reason to create our view.
return null;
}
RelativeLayout view = new RelativeLayout( Rock.Mobile.PlatformSpecific.Android.Core.Context );
view.LayoutParameters = new RelativeLayout.LayoutParams( ViewGroup.LayoutParams.MatchParent, ViewGroup.LayoutParams.MatchParent );
view.SetBackgroundColor( Android.Graphics.Color.Black );
view.SetOnTouchListener( this );
ProgressBar = new ProgressBar( Rock.Mobile.PlatformSpecific.Android.Core.Context );
ProgressBar.Indeterminate = true;
ProgressBar.SetBackgroundColor( Rock.Mobile.UI.Util.GetUIColor( 0 ) );
ProgressBar.LayoutParameters = new RelativeLayout.LayoutParams( ViewGroup.LayoutParams.WrapContent, ViewGroup.LayoutParams.WrapContent );
( (RelativeLayout.LayoutParams)ProgressBar.LayoutParameters ).AddRule( LayoutRules.CenterInParent );
view.AddView( ProgressBar );
// setup our media controller for viewing the position of media
MediaController = new MediaController( Rock.Mobile.PlatformSpecific.Android.Core.Context );
MediaController.SetAnchorView( view );
ResultView = new UIResultView( view, new System.Drawing.RectangleF( 0, 0, NavbarFragment.GetFullDisplayWidth( ), this.Resources.DisplayMetrics.HeightPixels ),
delegate
{
// we know we're bound, so now just retry.
ResultView.Hide( );
PlayerState = MediaPlayerState.Preparing;
StartAudio( );
SyncUI( );
});
return view;
}