当前位置: 首页>>代码示例>>C#>>正文


C# View.SetMinimumHeight方法代码示例

本文整理汇总了C#中Android.Views.View.SetMinimumHeight方法的典型用法代码示例。如果您正苦于以下问题:C# View.SetMinimumHeight方法的具体用法?C# View.SetMinimumHeight怎么用?C# View.SetMinimumHeight使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Android.Views.View的用法示例。


在下文中一共展示了View.SetMinimumHeight方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: CreateTabContent

 public View CreateTabContent(string tag)
 {
     var v = new View(_context);
     v.SetMinimumHeight(0);
     v.SetMinimumWidth(0);
     return v;
 }
开发者ID:slodge,项目名称:MonoDroid.ActionBar,代码行数:7,代码来源:TabsAdapter.cs

示例2: CreateTabContent

 public View CreateTabContent(string tag)
 {
     var view = new View(_generator.TabHost.Context);
     view.SetMinimumWidth(0);
     view.SetMinimumHeight(0);
     return view;
 }
开发者ID:windygu,项目名称:MugenMvvmToolkit,代码行数:7,代码来源:TabHostItemsSourceGenerator.cs

示例3: OnCreateDialog

        public override Dialog OnCreateDialog(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            // Begin building a new dialog.
            var builder = new AlertDialog.Builder(Activity);

            Rect displayRectangle = new Rect();
            Window window = Activity.Window;
            window.DecorView.GetWindowVisibleDisplayFrame(displayRectangle);

            var inflater = Activity.LayoutInflater;
            dateView = inflater.Inflate(Resource.Layout.DateRange, null);
            dateView.SetMinimumHeight((int)(displayRectangle.Width() * 0.9f));
            dateView.SetMinimumHeight((int)(displayRectangle.Height() * 0.9f));

            Button butOk = dateView.FindViewById<Button> (Resource.Id.butok);
            butOk.Click+= ButOk_Click;
            datePicker1 = DatePicker.NewInstance(SetDateDlg1);
            datePicker2 =  DatePicker.NewInstance(SetDateDlg2);
            EditText frd = dateView.FindViewById<EditText> (Resource.Id.trxdatefr);
            EditText tod = dateView.FindViewById<EditText> (Resource.Id.trxdateto);
            frd.Text = DateTime.Today.ToString ("dd-MM-yyyy");
            frd.Click += delegate(object sender, EventArgs e) {
                datePicker1.Show(FragmentManager, "datePicker");
            };
            tod.Text = DateTime.Today.ToString ("dd-MM-yyyy");
            tod.Click += delegate(object sender, EventArgs e) {
                datePicker2.Show(FragmentManager, "datePicker2");
            };

            builder.SetView (dateView);
            builder.SetPositiveButton ("CANCEL", HandlePositiveButtonClick);
            var dialog = builder.Create();
            //Now return the constructed dialog to the calling activity
            return dialog;
        }
开发者ID:mokth,项目名称:merpV2Production,代码行数:36,代码来源:DateRangeDialog.cs

示例4: RefreshContent2

        void RefreshContent2()
        {
            LinearLayout.LayoutParams p = new LinearLayout.LayoutParams (LinearLayout.LayoutParams.MatchParent, LinearLayout.LayoutParams.WrapContent);
            foreach (var q in queue) {
                RelativeLayout rl = new RelativeLayout (Activity);
                rl.LayoutParameters = p;

                if (q.isSync) {
                    rl.SetBackgroundColor (Android.Graphics.Color.LightGreen);
                } else {
                    rl.SetBackgroundColor (Android.Graphics.Color.LightPink);
                }

                TextView type = new TextView (Activity);
                TextView loc = new TextView (Activity);

                switch (q.type) {
                case SyncQueueType.sqtAttendance:
                    Attendance att = SyncQueueManager.GetAttendace (q.fileLoacation);
                    Pharmacy pharm = PharmacyManager.GetPharmacy (att.pharmacy);
                    type.Text = string.Format(@"Посещение аптеки {0} за дату {1}", pharm.fullName, att.date.ToString(@"d"));
                    loc.Text = q.fileLoacation;
                    break;
                case SyncQueueType.sqtAttendanceResult:
                    AttendanceResult attRes = SyncQueueManager.GetAttendaceResult (q.fileLoacation);
                    Attendance att2 = AttendanceManager.GetAttendance(attRes.attendance);
                    Pharmacy pharm2 = PharmacyManager.GetPharmacy (att2.pharmacy);
                    type.Text = string.Format(@"Значение по препарату в посещение аптеки {0} за дату {1}", pharm2.fullName, att2.date.ToString(@"d"));
                    loc.Text = q.fileLoacation;
                    break;
                case SyncQueueType.sqtAttendancePhoto:
                    type.Text = string.Format(@"Фото");
                    loc.Text = q.fileLoacation;
                    break;
                default:
                    type.Text = @"Неизвестный тип файла";
                    type.SetTextColor (Android.Graphics.Color.DarkRed);
                    break;
                }

                rl.AddView (type);

                RelativeLayout.LayoutParams rlLP = new RelativeLayout.LayoutParams (RelativeLayout.LayoutParams.WrapContent, RelativeLayout.LayoutParams.WrapContent);
                rlLP.AddRule(LayoutRules.Above, type.Id);
                loc.LayoutParameters = rlLP;
                rl.AddView (loc);

                View v = new View (Activity);
                v.SetMinimumHeight (2);

                rl.AddView (v);

                llSyncItems.AddView (rl);
            }
        }
开发者ID:pafik13,项目名称:pharm-merch-tablet,代码行数:55,代码来源:SyncFragment.cs

示例5: WireUpForceUpdateSizeRequested

		protected void WireUpForceUpdateSizeRequested(Cell cell, AView nativeCell)
		{
			cell.ForceUpdateSizeRequested -= _onForceUpdateSizeRequested;

			_onForceUpdateSizeRequested = delegate
			{
				// RenderHeight may not be changed, but that's okay, since we
				// don't actually use the height argument in the OnMeasure override.
				nativeCell.Measure(nativeCell.Width, (int)cell.RenderHeight);
				nativeCell.SetMinimumHeight(nativeCell.MeasuredHeight);
				nativeCell.SetMinimumWidth(nativeCell.MeasuredWidth);
			};

			cell.ForceUpdateSizeRequested += _onForceUpdateSizeRequested;
		}
开发者ID:Costo,项目名称:Xamarin.Forms,代码行数:15,代码来源:CellRenderer.cs

示例6: GetDelim

        TableRow GetDelim(Android.Graphics.Color color)
        {
            TableRow.LayoutParams lpDelim = new TableRow.LayoutParams ();
            lpDelim.Height = TableLayout.LayoutParams.WrapContent;
            lpDelim.Width = TableLayout.LayoutParams.WrapContent;
            lpDelim.SetMargins (ToDIP(2), ToDIP(1), ToDIP(2), ToDIP(1));
            //			lpDelim.Span = currentAttendances.Count + 2;
            lpDelim.Span = newAttendanceResults.Count + 2;

            TableRow rDelim = new TableRow (Activity);
            View vDelim = new View (Activity);
            vDelim.SetMinimumHeight (ToDIP(3));
            vDelim.SetBackgroundColor (color);
            vDelim.LayoutParameters = lpDelim;
            rDelim.AddView (vDelim);

            return rDelim;
        }
开发者ID:pafik13,项目名称:SBL-CRM,代码行数:18,代码来源:DrugInfoFragment.cs

示例7: UpdateMinimumHeightFromParent

		static void UpdateMinimumHeightFromParent(Context context, AView view, ListView listView)
		{
			if (!listView.HasUnevenRows && listView.RowHeight > 0)
				view.SetMinimumHeight((int)context.ToPixels(listView.RowHeight));
		}
开发者ID:Costo,项目名称:Xamarin.Forms,代码行数:5,代码来源:CellFactory.cs


注:本文中的Android.Views.View.SetMinimumHeight方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。