本文整理汇总了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;
}
示例2: CreateTabContent
public View CreateTabContent(string tag)
{
var view = new View(_generator.TabHost.Context);
view.SetMinimumWidth(0);
view.SetMinimumHeight(0);
return view;
}
示例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;
}
示例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);
}
}
示例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;
}
示例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;
}
示例7: UpdateMinimumHeightFromParent
static void UpdateMinimumHeightFromParent(Context context, AView view, ListView listView)
{
if (!listView.HasUnevenRows && listView.RowHeight > 0)
view.SetMinimumHeight((int)context.ToPixels(listView.RowHeight));
}