本文整理汇总了C#中RelativeLayout.SetX方法的典型用法代码示例。如果您正苦于以下问题:C# RelativeLayout.SetX方法的具体用法?C# RelativeLayout.SetX怎么用?C# RelativeLayout.SetX使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类RelativeLayout
的用法示例。
在下文中一共展示了RelativeLayout.SetX方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ini
async Task ini(){
_mainLayout = new RelativeLayout (this);
_mainLayout.LayoutParameters = new RelativeLayout.LayoutParams (-1,-1);
_mainLayout.SetBackgroundColor(Color.ParseColor("#ffffff"));
mainLayoutIndice = new RelativeLayout (this);
mainLayoutIndice.LayoutParameters = new RelativeLayout.LayoutParams (-1,-1);
mainLayoutIndice.SetBackgroundColor(Color.ParseColor("#ffffff"));
mainLayoutPages = new RelativeLayout (this);
mainLayoutPages.LayoutParameters = new RelativeLayout.LayoutParams (-1,Configuration.getWidth(1136-85));
mainLayoutPages.SetBackgroundColor(Color.ParseColor("#ffffff"));
viewPager = new ViewPager (this);
viewPagerIni = new ViewPager (this);
/* layoutPanelScroll = new LinearLayout (this);
layoutPanelScroll.LayoutParameters = new LinearLayout.LayoutParams (-1,-2);
layoutPanelScroll.SetBackgroundColor(Color.ParseColor("#ffffff"));
layoutPanelScroll.Orientation = Orientation.Vertical;
*/
/* scrollVertical = new VerticalScrollView (this);
scrollVertical.setOnScrollViewListener (this);
scrollVertical.LayoutParameters = new ViewGroup.LayoutParams (-1, -1);
scrollVertical.SetX (0); scrollVertical.SetY (0);
scrollVertical.AddView (layoutPanelScroll);*/
//mainLayoutIndice.AddView (scrollVertical);
mainLayoutIndice.SetX (0); mainLayoutIndice.SetY (0);
_mainLayout.AddView (mainLayoutIndice);
//mainLayout.AddView (scrollVertical);
//var vm = this.ViewModel as LOViewModel;
await vm.InitLoad();
//loadLOsInCircle(0);
LoadPagesDataSource();
viewPagerIni.SetOnPageChangeListener (new MyPageChangeListener (this,listFront));
viewPager.SetOnPageChangeListener (new MyPageChangeListenerPager (this, listFrontPager));
vm.PropertyChanged += Vm_PropertyChanged;
}
示例2: Initialize
void Initialize ()
{
var metrics = Resources.DisplayMetrics;
widthInDp = ((int)metrics.WidthPixels);
heightInDp = ((int)metrics.HeightPixels);
Configuration.setWidthPixel (widthInDp);
Configuration.setHeigthPixel (heightInDp);
adsImagesPath.Add ("images/ad1.jpg");
adsImagesPath.Add ("images/ad2.jpg");
adsImagesPath.Add ("images/ad3.jpg");
_leyendaMap = new ImageView(context);
_leyendaMapBack = new ImageView(context);
int w = Configuration.getWidth (25);
int h = Configuration.getHeight (45);
_leyendaMap.SetImageBitmap (Bitmap.CreateScaledBitmap (getBitmapFromAsset ("icons/atras.png"), w, h, true));
_leyendaMap.SetPadding (w, 0, 0, 0);
_leyendaMap.Click += delegate {
showLeyenda ();
};
leyendaLayout = new RelativeLayout (context);
leyendaLayout.LayoutParameters = new LinearLayout.LayoutParams (Configuration.getWidth(500),Configuration.getHeight(1136-85));
leyendaLayout.SetBackgroundColor (Color.White);
leyendaLayout.SetX (Configuration.getWidth (640));
leyendaLayout.Click += delegate {
showLeyenda();
};
_leyendaImage = new ImageView (context);
//_leyendaImage.LayoutParameters = new LinearLayout.LayoutParams (Configuration.getWidth (500), -1);
_leyendaImage.SetImageBitmap(Bitmap.CreateScaledBitmap(getBitmapFromAsset("images/leyenda.png"),Configuration.getWidth (500),Configuration.getWidth(500),true));
//_leyendaImage.SetX (Configuration.getWidth (141));
_leyendaImage.SetY (Configuration.getHeight (125));
_leyendaImage.SetBackgroundColor (Color.Black);
_leyendaMapBack.SetImageBitmap (Bitmap.CreateScaledBitmap (getBitmapFromAsset ("icons/adelante.png"), w, h, true));
//_leyendaMapBack.Rotation = 180;
_leyendaMapBack.SetPadding (w, 0, 0, 0);
_leyendaMapBack.SetX (Configuration.getWidth (445));
_leyendaMapBack.SetY (Configuration.getHeight (40));
_leyendaMapBack.Click += delegate {
showLeyenda ();
};
TextView tituloLeyenda = new TextView (context);
tituloLeyenda.LayoutParameters = new LinearLayout.LayoutParams (-1, Configuration.getHeight (125));
tituloLeyenda.Gravity = GravityFlags.Center;
tituloLeyenda.SetTextSize (ComplexUnitType.Fraction, Configuration.getHeight(38));
tituloLeyenda.Typeface = Typeface.CreateFromAsset(context.Assets, "fonts/ArcherMediumPro.otf");
tituloLeyenda.Text = "LEYENDA";
leyendaLayout.AddView (tituloLeyenda);
leyendaLayout.AddView (_leyendaImage);
leyendaLayout.AddView (_leyendaMapBack);
loadIcons ();
//loadMapas ();
ini ();
//iniNotifList ();
this.AddView (_mainLayout);
}
示例3: ini
async Task ini(){
mainLayout = new RelativeLayout (this);
_progresD = new ProgressDialog (this);
_progresD.SetCancelable (false);
_progresD.SetMessage ("Wait please..");
mainLayout.LayoutParameters = new RelativeLayout.LayoutParams (-1,-1);
mainLayout.SetBackgroundColor(Color.ParseColor("#ffffff"));
mainLayoutIndice = new RelativeLayout (this);
mainLayoutIndice.LayoutParameters = new RelativeLayout.LayoutParams (-1,-1);
mainLayoutIndice.SetBackgroundColor(Color.ParseColor("#ffffff"));
mainLayoutPages = new RelativeLayout (this);
mainLayoutPages.LayoutParameters = new RelativeLayout.LayoutParams (-1,-1);
mainLayoutPages.SetBackgroundColor(Color.ParseColor("#ffffff"));
viewPager = new ViewPager (this);
viewPagerIni = new ViewPager (this);
/* layoutPanelScroll = new LinearLayout (this);
layoutPanelScroll.LayoutParameters = new LinearLayout.LayoutParams (-1,-2);
layoutPanelScroll.SetBackgroundColor(Color.ParseColor("#ffffff"));
layoutPanelScroll.Orientation = Orientation.Vertical;
*/
/* scrollVertical = new VerticalScrollView (this);
scrollVertical.setOnScrollViewListener (this);
scrollVertical.LayoutParameters = new ViewGroup.LayoutParams (-1, -1);
scrollVertical.SetX (0); scrollVertical.SetY (0);
scrollVertical.AddView (layoutPanelScroll);*/
//mainLayoutIndice.AddView (scrollVertical);
mainLayoutIndice.SetX (0); mainLayoutIndice.SetY (0);
mainLayout.AddView (mainLayoutIndice);
//mainLayout.AddView (scrollVertical);
//var vm = this.ViewModel as LOViewModel;
await vm.InitLoad();
loadLOsInCircle(0);
viewPagerIni.SetOnPageChangeListener (new MyPageChangeListener (this,listFront));
viewPager.SetOnPageChangeListener (new MyPageChangeListenerPager (this, listFrontPager));
vm.PropertyChanged += Vm_PropertyChanged;
}