本文整理汇总了C#中Android.Widget.TextView.SetY方法的典型用法代码示例。如果您正苦于以下问题:C# TextView.SetY方法的具体用法?C# TextView.SetY怎么用?C# TextView.SetY使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Android.Widget.TextView
的用法示例。
在下文中一共展示了TextView.SetY方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: setItemLogin
//.........这里部分代码省略.........
etxtUser.Hint = " Usuario";
etxtUser.Typeface = Typeface.CreateFromAsset(this.Assets, "fonts/HelveticaNeue.ttf");
etxtPassword.Hint = " Contraseña";
etxtPassword.InputType = Android.Text.InputTypes.TextVariationPassword | Android.Text.InputTypes.ClassText;
etxtPassword.Typeface = Typeface.CreateFromAsset(this.Assets, "fonts/HelveticaNeue.ttf");
etxtPassword.InputType = InputTypes.TextVariationVisiblePassword;
txtLogin_a.Text = "FORGOT PASSWORD?";
txtLogin_a.Typeface = Typeface.CreateFromAsset(this.Assets, "fonts/HelveticaNeue.ttf");
txtLogin_b.Text = " CHANGE";
txtLogin_b.Typeface = Typeface.CreateFromAsset(this.Assets, "fonts/HelveticaNeue.ttf");
txtLogin_a.SetTextSize (txtFormat,Configuration.getHeight(30));
txtLogin_b.SetTextSize (txtFormat, Configuration.getHeight (30));
txtInicioSesion.Text = "Iniciar Sesión";
txtInicioSesion.Typeface = Typeface.CreateFromAsset(this.Assets, "fonts/HelveticaNeue.ttf");
txtInicioSesion.SetTextColor (Color.ParseColor("#ffffff"));
txtInicioSesion.SetTextSize (Android.Util.ComplexUnitType.Px, Configuration.getHeight (36));
btnLoginInto.SetImageBitmap (Bitmap.CreateScaledBitmap (getBitmapFromAsset("icons/otherlogin.png"),Configuration.getWidth (242), Configuration.getHeight (78),true));
etxtUser.SetTextColor (Color.ParseColor ("#ffffff"));
etxtPassword.SetTextColor (Color.ParseColor ("#ffffff"));
btnLoginInto.Click += delegate {
_dialog.Show();
var com = ((LoginViewModel)this.DataContext).LoginCommand;
com.Execute(null);
//AlertDialog.Builder popupBuilder = new AlertDialog.Builder(this);
};
initButtonColor (btnLoginInto);
etxtPassword.InputType = InputTypes.TextVariationVisiblePassword;
etxtPassword.TransformationMethod = Android.Text.Method.PasswordTransformationMethod.Instance;
txtLogin_a.SetTextColor (Color.ParseColor ("#ffffff"));
txtLogin_b.SetTextColor (Color.ParseColor ("#00c6ff"));
Drawable drawableEditText = new BitmapDrawable (Bitmap.CreateScaledBitmap (getBitmapFromAsset ("icons/cajatexto.png"), Configuration.getWidth(507), Configuration.getHeight(80), true));
etxtUser.SetBackgroundDrawable (drawableEditText);
etxtPassword.SetBackgroundDrawable (drawableEditText);
etxtUser.SetSingleLine (true);
etxtPassword.SetSingleLine (true);
LinearLayout space = new LinearLayout (this);
space.LayoutParameters = new LinearLayout.LayoutParams (-1, 20);
linearTextLogin.AddView (txtLogin_a);
linearTextLogin.AddView (txtLogin_b);
//linearButtonLogin.AddView (btnLoginInto);
//linearButtonLogin.AddView (linearTextLogin);
linearEditTextLogin.AddView (etxtUser);
linearEditTextLogin.AddView (space);
linearEditTextLogin.AddView (etxtPassword);
txtInicioSesion.SetX (Configuration.getWidth(75)); txtInicioSesion.SetY (Configuration.getHeight(680));
linearEditTextLogin.SetX (0); linearEditTextLogin.SetY (Configuration.getHeight(741));
//linearButtonLogin.SetX (0); linearButtonLogin.SetY (Configuration.getHeight(978));
btnLoginInto.SetX (Configuration.getWidth (45));btnLoginInto.SetY (Configuration.getHeight (980));
linearTextLogin.SetX (Configuration.getWidth (345));linearTextLogin.SetY (Configuration.getHeight(995));
relLogin.AddView (txtInicioSesion);
relLogin.AddView (linearEditTextLogin);
//relLogin.AddView (linearButtonLogin);
relLogin.AddView(btnLoginInto);
relLogin.AddView (linearTextLogin);
((LoginViewModel)this.ViewModel).PropertyChanged += Login_propertyChanged;;
var set = this.CreateBindingSet<LoginView, LoginViewModel>();
set.Bind(etxtUser).To(vm => vm.Username);
set.Bind(etxtPassword).To(vm => vm.Password);
set.Apply();
mainLayout.AddView (relLogin);
}
示例2: iniMenu
//.........这里部分代码省略.........
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
txtValorBarra.SetY(13);
txtCurse.Text = "Cursos del 2015";
txtCurse.Typeface = Typeface.CreateFromAsset(this.Assets, "fonts/HelveticaNeue.ttf");
// txtUserName.Text ="David Spencer";
txtUserName.Typeface = Typeface.CreateFromAsset(this.Assets, "fonts/HelveticaNeue.ttf");
txtUserRol.Text ="Alumno";
txtUserRol.Typeface = Typeface.CreateFromAsset(this.Assets, "fonts/HelveticaNeue.ttf");
txtSchoolName.Text ="Colegio Sagrados Corazones";
txtSchoolName.Typeface = Typeface.CreateFromAsset(this.Assets, "fonts/HelveticaNeue.ttf");
txtPorcentaje.Text = "60%";
txtPorcentaje.Typeface = Typeface.CreateFromAsset(this.Assets, "fonts/HelveticaNeue.ttf");
txtCurseTitle.Text = "CURSOS";
txtCurseTitle.Typeface = Typeface.CreateFromAsset(this.Assets, "fonts/HelveticaNeue.ttf");
txtTaskTitle.Text = "TAREAS";
txtTaskTitle.Typeface = Typeface.CreateFromAsset(this.Assets, "fonts/HelveticaNeue.ttf");
txtPendiente.Text = "1";
txtPendiente.Typeface = Typeface.CreateFromAsset(this.Assets, "fonts/HelveticaNeue.ttf");
txtPendiente.SetY (-10);
txtPendiente.SetTextSize (Android.Util.ComplexUnitType.Px, Configuration.getHeight (30));
txtUserName.SetTextSize (Android.Util.ComplexUnitType.Px, Configuration.getHeight (35));
txtUserRol.SetTextSize (Android.Util.ComplexUnitType.Px, Configuration.getHeight (30));
示例3: OnCreate
protected override void OnCreate(Bundle bundle)
{
this.Window.AddFlags(WindowManagerFlags.Fullscreen);
base.OnCreate(bundle);
SetContentView(Resource.Layout.MainView);
vm = this.ViewModel as MainViewModel;
vm.PropertyChanged += Vm_PropertyChanged;
loWallView = new WallView(this);
currentIndexLO = 0;
LinearLayout linearMainLayout = FindViewById<LinearLayout>(Resource.Id.left_drawer);
/*scrollIndice = new ScrollView (this);
scrollIndice.LayoutParameters = new ScrollView.LayoutParams (-1,400);
linearContentIndice = new LinearLayout (this);
linearContentIndice.LayoutParameters = new LinearLayout.LayoutParams (-1, 800);
linearContentIndice.Orientation = Orientation.Vertical;
linearContentIndice.SetBackgroundColor (Color.Red);
scrollIndice.AddView (linearContentIndice); */
var metrics = Resources.DisplayMetrics;
widthInDp = ((int)metrics.WidthPixels);
heightInDp = ((int)metrics.HeightPixels);
Configuration.setWidthPixel (widthInDp);
Configuration.setHeigthPixel (heightInDp);
task = new TaskView (this);
iniMenu ();
mToolbar = FindViewById<SupportToolbar>(Resource.Id.toolbar);
SetSupportActionBar(mToolbar);
mToolbar.SetNavigationIcon (Resource.Drawable.hamburger);
mDrawerLayout = FindViewById<DrawerLayout>(Resource.Id.drawer_layout);
mLeftDrawer = FindViewById<LinearLayout>(Resource.Id.left_drawer);
mRightDrawer = FindViewById<LinearLayout>(Resource.Id.right_drawer);
mLeftDrawer.Tag = 0;
mRightDrawer.Tag = 1;
frameLayout = FindViewById<FrameLayout> (Resource.Id.content_frame);
main_ContentView = new RelativeLayout (this);
main_ContentView.LayoutParameters = new RelativeLayout.LayoutParams (-1, -1);
// main_ContentView.AddView (scrollIndice);
//main_ContentView.AddView(linearContentIndice);
LOContainerView LOContainer = new LOContainerView (this);
//main_ContentView.AddView (LOContainer);
//WallView wallview = new WallView(this);
//wallview.OpenLO.Click += Lo_ImagenLO_Click;
//lo.OpenTasks.Click += ListTasks_ItemClick;
//wallview.OpenChat.Click += imBtn_Chat_Click;
//wallview.OpenUnits.Click += imBtn_Units_Click;
loWallView.OpenChat.Click += imBtn_Chat_Click;
loWallView.OpenUnits.Click += imBtn_Units_Click;
main_ContentView.AddView (loWallView);
frameLayout.AddView (main_ContentView);
RelativeLayout RL = FindViewById<RelativeLayout> (Resource.Id.main_view_relativeLayoutCL);
Drawable dr = new BitmapDrawable (Bitmap.CreateScaledBitmap (getBitmapFromAsset ("icons/nubeactivity.png"), 768, 1024, true));
RL.SetBackgroundDrawable (dr);
dr = null;
//seting up chat view content
title_view = FindViewById<TextView> (Resource.Id.chat_view_title);
info1= FindViewById<TextView> (Resource.Id.chat_view_info1);
info2 = FindViewById<TextView> (Resource.Id.chat_view_info2);
title_list = FindViewById<TextView> (Resource.Id.chat_list_title);
mListViewChat = FindViewById<ListView> (Resource.Id.chat_list_view);
title_view.SetX (Configuration.getWidth(74));
title_view.SetY (Configuration.getHeight (202));
title_view.Typeface = Typeface.CreateFromAsset(this.Assets, "fonts/HelveticaNeue.ttf");
title_view.SetTypeface (null, TypefaceStyle.Bold);
info1.SetX (Configuration.getWidth (76));
info1.SetY (Configuration.getHeight (250));
//.........这里部分代码省略.........
示例4: 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));
//.........这里部分代码省略.........
示例5: 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";
//.........这里部分代码省略.........
示例6: 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);
}