本文整理汇总了C#中RelativeLayout.SetBackgroundDrawable方法的典型用法代码示例。如果您正苦于以下问题:C# RelativeLayout.SetBackgroundDrawable方法的具体用法?C# RelativeLayout.SetBackgroundDrawable怎么用?C# RelativeLayout.SetBackgroundDrawable使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类RelativeLayout
的用法示例。
在下文中一共展示了RelativeLayout.SetBackgroundDrawable方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ini
public void ini(){
var textFormat = Android.Util.ComplexUnitType.Px;
mainLayout = new RelativeLayout (context);
mainLayout.LayoutParameters = new RelativeLayout.LayoutParams (-1,-1);
Drawable d = new BitmapDrawable (Bitmap.CreateScaledBitmap (getBitmapFromAsset ("icons/fondo.png"), 1024, 768, true));
mainLayout.SetBackgroundDrawable (d);
title = new TextView (context);
imgLinea = new ImageView (context);
listNotification = new ListView (context);
linearList = new LinearLayout (context);
imgPoint = new ImageView (context);
title.Text = "Notificaciones";
title.Typeface = Typeface.CreateFromAsset(context.Assets, "fonts/HelveticaNeue.ttf");
title.SetTextColor (Color.ParseColor ("#ffffff"));
title.SetTextSize (textFormat, Configuration.getHeight (48));
title.SetX (Configuration.getHeight (35));
title.SetY (Configuration.getWidth (142));
linearList.SetBackgroundColor (Color.ParseColor ("#ffffff"));
linearList.LayoutParameters = new LinearLayout.LayoutParams (-1, Configuration.getHeight (886));
linearList.SetX (Configuration.getWidth (0)); linearList.SetY (Configuration.getHeight(250));
listNotification.SetX (Configuration.getWidth (0)); listNotification.SetY (Configuration.getHeight(250));
listNotification.LayoutParameters = new LinearLayout.LayoutParams(-1, Configuration.getHeight (886));
imgLinea.SetImageBitmap (Bitmap.CreateScaledBitmap (getBitmapFromAsset ("icons/lineanotificaciones.png"), 4,2000 , true));
imgLinea.SetX (Configuration.getWidth (61)); imgLinea.SetY (Configuration.getHeight(240));
imgPoint.SetImageBitmap (Bitmap.CreateScaledBitmap (getBitmapFromAsset ("icons/circblanco.png"), 30,30 , true));
imgPoint.SetX (Configuration.getWidth (52)); imgPoint.SetY (Configuration.getHeight(228));
//linearList.AddView (listNotification);
mainLayout.AddView (title);
mainLayout.AddView(linearList);
mainLayout.AddView (listNotification);
mainLayout.AddView (imgLinea);
mainLayout.AddView (imgPoint);
}
示例2: init
public void init(){
var textFormat = Android.Util.ComplexUnitType.Px;
_dialog = new ProgressDialog(this);
//popupBuilder.SetView(_dialog);
_dialog.SetMessage("Espere por favor...");
_dialog.SetCancelable(false);
//_dialog.Show();
mainLayout = new RelativeLayout (this);
relSingup = new RelativeLayout (this);
relLogin = new RelativeLayout (this);
linearLicencia = new LinearLayout (this);
linearLogin = new LinearLayout (this);
linearSingup = new LinearLayout (this);
linearLogo = new LinearLayout (this);
imgLogo = new ImageView (this);
btnLogin = new ImageButton (this);
btnSingUp = new ImageButton (this);
btnFacebook = new ImageButton (this);
chkLogin = new CheckBox (this);
txtLicencia_a = new TextView (this);
txtLicencia_b = new TextView (this);
txtlogin_a1 = new TextView (this);
txtlogin_a2 = new TextView (this);
txtlogin_b1 = new TextView (this);
txtlogin_b2 = new TextView (this);
txtlogin_c1 = new TextView (this);
txtlogin_c2 = new TextView (this);
initText (txtlogin_a1, "", "#00c6ff");
txtlogin_a1.Typeface = Typeface.CreateFromAsset(this.Assets, "fonts/HelveticaNeue.ttf");
initText (txtlogin_a2, "", "#ffffff");
txtlogin_a2.Typeface = Typeface.CreateFromAsset(this.Assets, "fonts/HelveticaNeue.ttf");
initText (txtlogin_b1, "", "#00c6ff");
txtlogin_b1.Typeface = Typeface.CreateFromAsset(this.Assets, "fonts/HelveticaNeue.ttf");
initText (txtlogin_b2, "","#ffffff");
txtlogin_b2.Typeface = Typeface.CreateFromAsset(this.Assets, "fonts/HelveticaNeue.ttf");
initText (txtlogin_c1, "", "#00c6ff");
txtlogin_c1.Typeface = Typeface.CreateFromAsset(this.Assets, "fonts/HelveticaNeue.ttf");
initText (txtlogin_c2, "", "#ffffff");
txtlogin_c2.Typeface = Typeface.CreateFromAsset(this.Assets, "fonts/HelveticaNeue.ttf");
linearTxta = new LinearLayout (this);
linearTxtb = new LinearLayout (this);
linearTxtc = new LinearLayout (this);
linearContentText = new LinearLayout (this);
linearTxta.LayoutParameters = new LinearLayout.LayoutParams (-1, -2);
linearTxtb.LayoutParameters = new LinearLayout.LayoutParams (-1, -2);
linearTxtc.LayoutParameters = new LinearLayout.LayoutParams (-1, -2);
linearContentText.LayoutParameters = new LinearLayout.LayoutParams (-1, -2);
linearTxta.Orientation = Orientation.Horizontal;
linearTxta.SetGravity (GravityFlags.Center);
linearTxtb.Orientation = Orientation.Horizontal;
linearTxtb.SetGravity (GravityFlags.Center);
linearTxtc.Orientation = Orientation.Horizontal;
linearTxtc.SetGravity (GravityFlags.Center);
linearContentText.Orientation = Orientation.Vertical;
linearContentText.SetGravity (GravityFlags.Center);
linearTxta.AddView (txtlogin_a1); linearTxta.AddView (txtlogin_a2);
linearTxtb.AddView (txtlogin_b1); linearTxtb.AddView (txtlogin_b2);
linearTxtc.AddView (txtlogin_c1); linearTxtc.AddView (txtlogin_c2);
linearContentText.AddView (linearTxta);
linearContentText.AddView (linearTxtb);
linearContentText.AddView (linearTxtc);
mainLayout.LayoutParameters = new RelativeLayout.LayoutParams (-1, -1);
Drawable d = new BitmapDrawable (Bitmap.CreateScaledBitmap (getBitmapFromAsset ("icons/afondo.png"), 768, 1024, true));
mainLayout.SetBackgroundDrawable (d);
relSingup.LayoutParameters = new RelativeLayout.LayoutParams (-1,-1);
relLogin.LayoutParameters = new RelativeLayout.LayoutParams (-1,-1);
linearLicencia.LayoutParameters = new LinearLayout.LayoutParams (-1, LinearLayout.LayoutParams.WrapContent);
linearLicencia.Orientation = Orientation.Horizontal;
linearLicencia.SetGravity (GravityFlags.Center);
//.........这里部分代码省略.........
示例3: iniMenu
private void iniMenu(){
mainLayout = new RelativeLayout (this);
_foro = new LOContainerView (this);
_dialogDownload = new ProgressDialog (this);
_dialogDownload.SetCancelable (false);
_dialogDownload.SetMessage ("Downloading...");
txtUserName = new TextView (this);
txtCurse = new TextView (this);
txtSchoolName = new TextView (this);
txtUserRol = new TextView (this);
txtPorcentaje = new TextView (this);
txtCurseTitle = new TextView (this);
txtTaskTitle = new TextView (this);
txtPendiente = new TextView (this);
txtValorBarra = new TextView (this);
imgChat = new ImageView (this);
imgUser = new ImageView (this);
imgSchool = new ImageView (this);
imgNotificacion = new ImageView (this);
imgCurse = new ImageView (this);
imgTask = new ImageView (this);
linearBarraCurso = new LinearLayout (this);
linearCurse= new LinearLayout (this);
linearSchool= new LinearLayout (this);
linearTask= new LinearLayout (this);
linearUserData= new LinearLayout (this);
linearUser = new LinearLayout (this);
linearListCurso = new LinearLayout (this);
linearListTask = new LinearLayout (this);
linearList = new LinearLayout (this);
linearPendiente = new LinearLayout (this);
linearTxtValorBarra = new LinearLayout (this);
listCursos = new ListView (this);
listTasks = new ListView (this);
mItemsChat = new List<ChatDataRow> ();
mainLayout.LayoutParameters = new RelativeLayout.LayoutParams (-1,-1);
Drawable d = new BitmapDrawable (getBitmapFromAsset ("icons/fondo.png"));
mainLayout.SetBackgroundDrawable (d);
d = null;
linearBarraCurso.LayoutParameters = new LinearLayout.LayoutParams (-1,LinearLayout.LayoutParams.WrapContent);
linearCurse.LayoutParameters = new LinearLayout.LayoutParams (-1,Configuration.getHeight(50));
linearTask.LayoutParameters = new LinearLayout.LayoutParams (-1,Configuration.getHeight(50));
linearSchool.LayoutParameters = new LinearLayout.LayoutParams (-1,LinearLayout.LayoutParams.WrapContent);
linearUserData.LayoutParameters = new LinearLayout.LayoutParams (-1,LinearLayout.LayoutParams.WrapContent);
linearUser.LayoutParameters = new LinearLayout.LayoutParams (-1, LinearLayout.LayoutParams.WrapContent);
linearListCurso.LayoutParameters = new LinearLayout.LayoutParams (-1,Configuration.getHeight(250));
linearListTask.LayoutParameters = new LinearLayout.LayoutParams (-1,LinearLayout.LayoutParams.WrapContent);
linearList.LayoutParameters = new LinearLayout.LayoutParams (-1, LinearLayout.LayoutParams.WrapContent);
linearPendiente.LayoutParameters = new LinearLayout.LayoutParams (Configuration.getWidth (30), Configuration.getWidth (30));
linearTxtValorBarra.LayoutParameters = new LinearLayout.LayoutParams (-1, -2);
linearBarraCurso.Orientation = Orientation.Vertical;
linearBarraCurso.SetGravity (GravityFlags.Center);
linearTxtValorBarra.Orientation = Orientation.Vertical;
linearTxtValorBarra.SetGravity (GravityFlags.Center);
txtValorBarra.Gravity = GravityFlags.Center;
linearCurse.Orientation = Orientation.Horizontal;
linearCurse.SetGravity (GravityFlags.CenterVertical);
linearTask.Orientation = Orientation.Horizontal;
linearTask.SetGravity (GravityFlags.CenterVertical);
linearSchool.Orientation = Orientation.Horizontal;
//linearSchool.SetGravity (GravityFlags.CenterVer);
linearUserData.Orientation = Orientation.Vertical;
linearUserData.SetGravity (GravityFlags.Center);
linearUser.Orientation = Orientation.Vertical;
linearUser.SetGravity (GravityFlags.CenterHorizontal);
linearListCurso.Orientation = Orientation.Vertical;
linearListTask.Orientation = Orientation.Vertical;
linearList.Orientation = Orientation.Vertical;
linearPendiente.Orientation = Orientation.Horizontal;
linearPendiente.SetGravity (GravityFlags.Center);
//linearList.SetGravity (GravityFlags.CenterVertical);
progressBar = new ProgressBar (this,null,Android.Resource.Attribute.ProgressBarStyleHorizontal);
progressBar.LayoutParameters = new ViewGroup.LayoutParams (Configuration.getWidth (274), Configuration.getHeight (32));
progressBar.ProgressDrawable = Resources.GetDrawable (Resource.Drawable.progressBackground);
progressBar.Progress = 60;
txtValorBarra.Text = "60%";
//progressBar.text
//.........这里部分代码省略.........
示例4: init
public void init(){
mainLayout = new RelativeLayout (this);
mainLayout.LayoutParameters = new RelativeLayout.LayoutParams (-1, -1);
linearButtons = new LinearLayout (this);
linearImageCamera = new LinearLayout (this);
LinearImageText = new LinearLayout (this);
LinearTextCamera = new LinearLayout (this);
linearButtons.LayoutParameters = new LinearLayout.LayoutParams (-1, LinearLayout.LayoutParams.WrapContent);
linearImageCamera.LayoutParameters = new LinearLayout.LayoutParams (-1, LinearLayout.LayoutParams.WrapContent);
LinearImageText.LayoutParameters = new LinearLayout.LayoutParams (-1, LinearLayout.LayoutParams.WrapContent);
LinearTextCamera.LayoutParameters = new LinearLayout.LayoutParams (-1, LinearLayout.LayoutParams.WrapContent);
linearButtons.Orientation = Orientation.Horizontal;
linearImageCamera.Orientation = Orientation.Horizontal;
LinearImageText.Orientation = Orientation.Horizontal;
LinearTextCamera.Orientation = Orientation.Vertical;
//linearButtons.SetGravity (GravityFlags.Center);
linearImageCamera.SetGravity (GravityFlags.Center);
LinearImageText.SetGravity (GravityFlags.Center);
LinearTextCamera.SetGravity (GravityFlags.Center);
Drawable dr = new BitmapDrawable (Bitmap.CreateScaledBitmap (getBitmapFromAsset ("icons/bfondo.png"), 1024, 768, true));
mainLayout.SetBackgroundDrawable (dr);
imgCamera = new ImageView (this);
imgLineal = new ImageView (this);
btnCamera = new ImageButton (this);
btnRepository = new ImageButton (this);
btnDone = new ImageButton (this);
txtCamera = new TextView (this);
txtCamera.Text = "CHOOSE A PICTURE AND \n SELECT A COLOUR";
txtCamera.Typeface = Typeface.CreateFromAsset(this.Assets, "fonts/HelveticaNeue.ttf");
txtCamera.SetTextSize(Android.Util.ComplexUnitType.Px,Configuration.getHeight(30));
txtCamera.SetTextColor (Color.ParseColor ("#ffffff"));
Button bt = new Button (this);
imgCamera.SetImageBitmap (Bitmap.CreateScaledBitmap (getBitmapFromAsset("icons/camara.png"), Configuration.getWidth(164),Configuration.getHeight(164),true));
imgLineal.SetImageBitmap (Bitmap.CreateScaledBitmap (getBitmapFromAsset("icons/colores.png"), Configuration.getWidth(542), 5,true));
btnCamera.SetImageBitmap (Bitmap.CreateScaledBitmap (getBitmapFromAsset("icons/loadcamara.png"), Configuration.getWidth(58),Configuration.getHeight(50),true));
btnRepository.SetImageBitmap (Bitmap.CreateScaledBitmap (getBitmapFromAsset("icons/loadbiblioteca.png"), Configuration.getWidth(58),Configuration.getHeight(50),true));
btnDone.SetImageBitmap (Bitmap.CreateScaledBitmap (getBitmapFromAsset("icons/adelante.png"), Configuration.getWidth(20),Configuration.getWidth(30),true));
imgCamera.Click += delegate {
var com = ((CameraViewModel)this.DataContext).TakePictureCommand;
com.Execute (null);
};
linearButtons.AddView (btnCamera);
linearButtons.AddView (btnRepository);
btnCamera.SetPadding (Configuration.getWidth(122),0,0,0);
btnRepository.SetPadding (Configuration.getWidth(300),0,0,0);
linearImageCamera.AddView (imgCamera);
txtCamera.SetPadding (0, Configuration.getHeight(70), 0, 0);
LinearImageText.AddView (txtCamera);
LinearTextCamera.AddView (linearImageCamera);
LinearTextCamera.AddView (LinearImageText);
LinearTextCamera.SetX (0); LinearTextCamera.SetY (Configuration.getHeight(295));
linearButtons.SetX (0); linearButtons.SetY (Configuration.getHeight(926));
imgLineal.SetX (Configuration.getWidth(61)); imgLineal.SetY (Configuration.getHeight(1019));
btnDone.SetX (Configuration.getWidth(550)); btnDone.SetY (Configuration.getHeight(40));
mainLayout.AddView (btnDone);
mainLayout.AddView (LinearTextCamera);
mainLayout.AddView (linearButtons);
mainLayout.AddView (imgLineal);
initButtonColor (btnCamera);
initButtonColor (btnRepository);
initButtonColor (btnDone);
btnCamera.Click += delegate {
var com = ((CameraViewModel)this.DataContext).TakePictureCommand;
com.Execute(null);
};
btnRepository.Click += delegate {
var com = ((CameraViewModel)this.DataContext).ChoosePictureCommand;
com.Execute(null);
};
Bitmap bm;
var vm = this.ViewModel as CameraViewModel;
if (vm.Bytes != null)
{
bm= BitmapFactory.DecodeByteArray(vm.Bytes, 0, vm.Bytes.Length);
imgCamera.SetImageBitmap (bm);
}
//.........这里部分代码省略.........
示例5: ini
public void ini(){
_txtCursoN = new TextView (context);
_txtCursoN.LayoutParameters = new LinearLayout.LayoutParams (-1, -2);
_txtUnidadN = new TextView (context);
_mainLayout = new RelativeLayout (context);
linearGradiente = new LinearLayout (context);
linearGradiente.LayoutParameters = new LinearLayout.LayoutParams (-1, Configuration.getHeight (310));
linearGradiente.SetBackgroundResource (Resource.Drawable.gradiente);
var textFormat = Android.Util.ComplexUnitType.Px;
_mainLayout.LayoutParameters = new RelativeLayout.LayoutParams (-1, -1);
_scrollSpace = new VerticalScrollView (context);
_scrollSpace.LayoutParameters = new VerticalScrollView.LayoutParams (-1, Configuration.getHeight(1015-85));
_scrollSpace.SetY (Configuration.getHeight (125));
//_scrollSpace.SetBackgroundColor (Color.ParseColor ("#FF0000"));
_mainLayout.AddView (_scrollSpace);
_publicidadLayout = new LinearLayout (context);
_publicidadLayout.LayoutParameters = new LinearLayout.LayoutParams (-1, Configuration.getHeight (85));
Drawable dr = new BitmapDrawable (getBitmapFromAsset ("images/footerad.jpg"));
_publicidadLayout.SetBackgroundDrawable (dr);
_publicidadLayout.SetY (Configuration.getHeight(1136-85));
_mainLayout.AddView (_publicidadLayout);
_publicidadLayout.Click += delegate {
if (adOpen) {
hideAd ();
} else {
Random rnd = new Random();
showAd (rnd.Next(adsImagesPath.Count));
}
};
_mapSpace = new LinearLayout (context);
_mapSpace.LayoutParameters = new LinearLayout.LayoutParams (-1, Configuration.getHeight (1015));
_mapSpace.SetY(Configuration.getHeight (125));
_mainLayout.AddView (_mapSpace);
_mainSpace = new LinearLayout (context);
_mainSpace.LayoutParameters = new LinearLayout.LayoutParams (-1, -2);
_mainSpace.Orientation = Orientation.Vertical;
_scrollSpace.AddView (_mainSpace);
_fondo2 = new RelativeLayout (context);
_fondo2.LayoutParameters = new RelativeLayout.LayoutParams (-1, Configuration.getWidth (640));
_fondo2.SetY (Configuration.getHeight (0));
Drawable dr1 = new BitmapDrawable (getBitmapFromAsset("icons/fondoselec.png"));
_fondo2.SetBackgroundDrawable (dr1);
dr1 = null;
_mainSpace.AddView (_fondo2);
infoCursoUnidad = new LinearLayout (context);
infoCursoUnidad.LayoutParameters = new LinearLayout.LayoutParams (-1, Configuration.getHeight(250));
infoCursoUnidad.Orientation = Orientation.Vertical;
infoCursoUnidad.SetGravity(Android.Views.GravityFlags.Right);
infoCursoUnidad.SetPadding (Configuration.getWidth(30), Configuration.getWidth (25), Configuration.getWidth(30), Configuration.getWidth (25));
infoCursoUnidad.SetBackgroundColor (Color.ParseColor ("#40000000"));
TextView _txtCurso = new TextView (context);
_txtCurso.Text = Resource.String.THE_ROUTES.ToString ();;
_txtCurso.SetY (-100);
//section1-----------------------------------------------
_contentRLayout_S1 = new RelativeLayout(context);
_txtTitle_S1 = new TextView (context);
_txtAuthor_S1 = new TextView (context);
_imAuthor_S1 = new ImageView (context);
_txtChapter_S1 = new TextView (context);
_itemsLayout_S1 = new LinearLayout (context);//not used
_imItem_S1 = new List<ImageView> ();
_txtItem_S1 = new List<TextView>();
_contentRLayout_S1.LayoutParameters = new RelativeLayout.LayoutParams (-1, Configuration.getHeight (480));
LinearLayout _linearTitle = new LinearLayout (context);
_linearTitle.LayoutParameters = new LinearLayout.LayoutParams (-1, -2);
_linearTitle.SetGravity (Android.Views.GravityFlags.Center);
_linearTitle.AddView (_txtTitle_S1);
_linearTitle.SetY (Configuration.getHeight (60));
linearGradiente.SetX (0); linearGradiente.SetY (Configuration.getHeight(860));
//_mainLayout.AddView (linearGradiente);
//_mainLayout.AddView (_linearTitle);
//_txtTitle_S1.SetX (Configuration.getWidth (245));_txtTitle_S1.SetY (Configuration.getHeight (60));
//.........这里部分代码省略.........
示例6: init
public void init(){
mainLayout = new RelativeLayout (this);
txtRegister = new TextView (this);
etxtEmail = new EditText (this);
etxtUser = new EditText (this);
etxtPassword = new EditText (this);
btnCreateAccount = new ImageButton (this);
linearButtonRegister = new LinearLayout (this);
linearRegister = new LinearLayout (this);
linearButtonRegister.LayoutParameters = new LinearLayout.LayoutParams (-1,LinearLayout.LayoutParams.WrapContent);
linearRegister.LayoutParameters = new LinearLayout.LayoutParams (-1,LinearLayout.LayoutParams.WrapContent);
linearButtonRegister.Orientation = Orientation.Horizontal;
linearRegister.Orientation = Orientation.Vertical;
linearButtonRegister.SetGravity (GravityFlags.Center);
linearRegister.SetGravity (GravityFlags.Center);
etxtUser.LayoutParameters = new ViewGroup.LayoutParams (Configuration.getWidth (507), Configuration.getHeight (78));
etxtPassword.LayoutParameters = new ViewGroup.LayoutParams (Configuration.getWidth (507), Configuration.getHeight (78));
etxtEmail.LayoutParameters = new ViewGroup.LayoutParams (Configuration.getWidth (507), Configuration.getHeight (78));
mainLayout.LayoutParameters = new RelativeLayout.LayoutParams (-1, -1);
Drawable drawableBackground = new BitmapDrawable (Bitmap.CreateScaledBitmap (getBitmapFromAsset ("icons/cfondo.png"), 768, 1024, true));
mainLayout.SetBackgroundDrawable (drawableBackground);
txtRegister.Text = "Registro";
txtRegister.Typeface = Typeface.CreateFromAsset(this.Assets, "fonts/HelveticaNeue.ttf");
etxtUser.Hint =" Nombre de usuario";
etxtUser.Typeface = Typeface.CreateFromAsset(this.Assets, "fonts/HelveticaNeue.ttf");
etxtEmail.Hint = " Dirección de correo";
etxtEmail.Typeface = Typeface.CreateFromAsset(this.Assets, "fonts/HelveticaNeue.ttf");
etxtPassword.Hint =" Contraseña";
etxtPassword.Typeface = Typeface.CreateFromAsset(this.Assets, "fonts/HelveticaNeue.ttf");
Drawable drawableEditText = new BitmapDrawable (Bitmap.CreateScaledBitmap (getBitmapFromAsset ("icons/cajatexto.png"), Configuration.getWidth (507), Configuration.getHeight (80), true));
etxtUser.SetBackgroundDrawable (drawableEditText);
etxtPassword.SetBackgroundDrawable (drawableEditText);
etxtEmail.SetBackgroundDrawable (drawableEditText);
etxtUser.SetTextColor (Color.ParseColor ("#ffffff"));
etxtUser.SetSingleLine (true);
etxtPassword.SetTextColor (Color.ParseColor ("#ffffff"));
etxtPassword.SetSingleLine (true);
etxtEmail.SetTextColor (Color.ParseColor ("#ffffff"));
etxtEmail.SetSingleLine (true);
txtRegister.SetTextColor (Color.ParseColor("#ffffff"));
txtRegister.SetTextSize (Android.Util.ComplexUnitType.Px, Configuration.getHeight (40));
etxtPassword.InputType = InputTypes.TextVariationVisiblePassword;
etxtPassword.TransformationMethod = Android.Text.Method.PasswordTransformationMethod.Instance;
btnCreateAccount.SetImageBitmap (Bitmap.CreateScaledBitmap (getBitmapFromAsset ("icons/crearcuenta.png"), Configuration.getWidth (507), Configuration.getHeight (80), true));
btnCreateAccount.Alpha = 255;
//btn.SetAlpha(255);
btnCreateAccount.SetBackgroundColor(Color.Transparent);
LinearLayout space = new LinearLayout (this);
space.LayoutParameters = new LinearLayout.LayoutParams (-1, 20);
LinearLayout space2 = new LinearLayout (this);
space2.LayoutParameters = new LinearLayout.LayoutParams (-1, 20);
linearRegister.AddView (etxtUser);
linearRegister.AddView (space);
linearRegister.AddView (etxtEmail);
linearRegister.AddView (space2);
linearRegister.AddView (etxtPassword);
linearButtonRegister.AddView (btnCreateAccount);
txtRegister.SetX (Configuration.getWidth(72)); txtRegister.SetY (Configuration.getHeight(535));
linearRegister.SetX (0); linearRegister.SetY (Configuration.getHeight(592));
linearButtonRegister.SetX (0); linearButtonRegister.SetY (Configuration.getHeight(975));
mainLayout.AddView (txtRegister);
mainLayout.AddView (linearRegister);
mainLayout.AddView (linearButtonRegister);
//string ndef = "None" ;
//string foto = "http://www.clinicatorielli.com/img/icons/no-user.png";
EditText lastName = new EditText (this);
lastName.Text = "None";
EditText url = new EditText (this);
url.Text = "http://www.clinicatorielli.com/img/icons/no-user.png";
//.........这里部分代码省略.........
示例7: initPopoverView
/**
* Init the popover view
* @param viewToEnclose The view we wan to insert inside the popover
*/
private void initPopoverView (View viewToEnclose)
{
//Configure self
SetBackgroundColor (Color.Transparent);
//setOnClickListener(this);
SetOnTouchListener (this);
//Set initial drawables
popoverBackgroundDrawable = PopoverView.defaultPopoverBackgroundDrawable;
popoverArrowUpDrawable = PopoverView.defaultPopoverArrowUpDrawable;
popoverArrowDownDrawable = PopoverView.defaultPopoverArrowDownDrawable;
popoverArrowLeftDrawable = PopoverView.defaultPopoverArrowLeftDrawable;
popoverArrowRightDrawable = PopoverView.defaultPopoverArrowRightDrawable;
//Init the relative layout
popoverView = new RelativeLayout (Application.Context);
popoverView.SetBackgroundDrawable (Resources.GetDrawable (popoverBackgroundDrawable));
popoverView.AddView (viewToEnclose, LayoutParams.MatchParent, LayoutParams.MatchParent);
}
示例8: ini
public void ini(){
//creating comment List
commentLayout = new LinearLayout(context);
commentLayout.LayoutParameters = new LinearLayout.LayoutParams (-1, Configuration.getHeight (934));
commentList = new ListView (context);
//commentList.AddView (commentList);
//end comment List
_mainLayout = new RelativeLayout (context);
linearGradiente = new LinearLayout (context);
linearGradiente.LayoutParameters = new LinearLayout.LayoutParams (-1, Configuration.getHeight (541));
linearGradiente.SetBackgroundResource (Resource.Drawable.gradiente);
var textFormat = Android.Util.ComplexUnitType.Px;
_mainLayout.LayoutParameters = new RelativeLayout.LayoutParams (-1, -1);
_fondo2 = new LinearLayout (context);
_fondo2.LayoutParameters = new LinearLayout.LayoutParams (-1, Configuration.getWidth (640));
_fondo2.SetY (Configuration.getHeight (109));
Drawable dr1 = new BitmapDrawable (getBitmapFromAsset("icons/fondoselec.png"));
_fondo2.SetBackgroundDrawable (dr1);
dr1 = null;
_mainLayout.AddView (_fondo2);
//section1-----------------------------------------------
_contentRLayout_S1 = new RelativeLayout(context);
_txtTitle_S1 = new TextView (context);
_txtAuthor_S1 = new TextView (context);
_imAuthor_S1 = new ImageView (context);
_txtChapter_S1 = new TextView (context);
_itemsLayout_S1 = new LinearLayout (context);//not used
_imItem_S1 = new List<ImageView> ();
_txtItem_S1 = new List<TextView>();
//_mainLayout.AddView (_txtTitle_S1);
//_mainLayout.AddView (_txtAuthor_S1);
_mainLayout.AddView (_imAuthor_S1);
//_mainLayout.AddView (_txtChapter_S1);
_contentRLayout_S1.LayoutParameters = new RelativeLayout.LayoutParams (-1, Configuration.getHeight (480));
LinearLayout _linearTitle = new LinearLayout (context);
_linearTitle.LayoutParameters = new LinearLayout.LayoutParams (-1, -2);
_linearTitle.SetGravity (Android.Views.GravityFlags.Center);
_linearTitle.AddView (_txtTitle_S1);
_linearTitle.SetY (Configuration.getHeight (60));
linearGradiente.SetX (0); linearGradiente.SetY (Configuration.getHeight(502));
_mainLayout.AddView (linearGradiente);
_mainLayout.AddView (_linearTitle);
//_txtTitle_S1.SetX (Configuration.getWidth (245));_txtTitle_S1.SetY (Configuration.getHeight (60));
Bitmap newbm = Configuration.getRoundedShape(Bitmap.CreateScaledBitmap( getBitmapFromAsset("icons/imgautor.png"), Configuration.getWidth(170), Configuration.getWidth(170), true),Configuration.getWidth(170),Configuration.getHeight(170));
_imAuthor_S1.SetImageBitmap (newbm);
// newbm.Recycle ();
newbm = null;
_imAuthor_S1.SetX (Configuration.getWidth (240));_imAuthor_S1.SetY (Configuration.getHeight (189));
LinearLayout _linearAuthor = new LinearLayout (context);
_linearAuthor.LayoutParameters = new LinearLayout.LayoutParams (-1, -2);
_linearAuthor.SetGravity (Android.Views.GravityFlags.Center);
_linearAuthor.AddView (_txtAuthor_S1);
_linearAuthor.SetY (Configuration.getHeight (378));
_mainLayout.AddView (_linearAuthor);
//_txtAuthor_S1.SetX (Configuration.getWidth (228));_txtAuthor_S1.SetY (Configuration.getHeight (378));
LinearLayout _linearChapter = new LinearLayout (context);
_linearChapter.LayoutParameters = new LinearLayout.LayoutParams (-1, -2);
//.........这里部分代码省略.........
示例9: initUi
public void initUi(){
_dialog = new ProgressDialog(this);
_dialog.SetMessage("Espere por favor...");
_dialog.SetCancelable(false);
mainLayout = new RelativeLayout (this);
mainLayout.LayoutParameters = new RelativeLayout.LayoutParams (-1, -1);
Drawable d = new BitmapDrawable (Bitmap.CreateScaledBitmap (getBitmapFromAsset ("icons/afondo.png"), 768, 1024, true));
mainLayout.SetBackgroundDrawable (d);
initUi_SignUp();
initUi_Login ();
}