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


C# EditText.SetHintTextColor方法代码示例

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


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

示例1: StyleTextField

        public static void StyleTextField( EditText textField, string placeholderText, string font, uint size )
        {
            textField.Background = null;
            textField.SetTextColor( Rock.Mobile.UI.Util.GetUIColor( ControlStylingConfig.TextField_ActiveTextColor ) );

            textField.Hint = placeholderText;
            textField.SetHintTextColor( Rock.Mobile.UI.Util.GetUIColor( ControlStylingConfig.TextField_PlaceholderTextColor ) );

            textField.SetTypeface( Rock.Mobile.PlatformSpecific.Android.Graphics.FontManager.Instance.GetFont( font ), TypefaceStyle.Normal );
            textField.SetTextSize( Android.Util.ComplexUnitType.Dip, size );
        }  
开发者ID:Higherbound,项目名称:HBMobileApp,代码行数:11,代码来源:ControlStyling.cs

示例2: InitializeVariables

 private void InitializeVariables()
 {
     this.ActionBar.SetBackgroundDrawable (Resources.GetDrawable (Resource.Drawable.Black));
     this.ActionBar.SetTitle (Resource.String.application);
     loginButton = FindViewById<Button> (Resource.Id.logInButton);
     username = FindViewById<EditText> (Resource.Id.usernameEntry);
     password = FindViewById<EditText> (Resource.Id.passwordEntry);
     username.SetBackgroundColor (Android.Graphics.Color.Orange);
     username.SetTextColor (Android.Graphics.Color.White);
     username.SetHintTextColor (Android.Graphics.Color.White);
     password.SetBackgroundColor (Android.Graphics.Color.Orange);
     password.SetTextColor (Android.Graphics.Color.White);
     password.SetHintTextColor (Android.Graphics.Color.White);
 }
开发者ID:rockyhe,项目名称:MojioTowingAlert,代码行数:14,代码来源:LoginActivity.cs

示例3: SetTheme

		public static void SetTheme(EditText editText, FlatTheme theme, 
			FlatUI.FlatFontFamily fontFamily, FlatUI.FlatFontWeight fontWeight, FlatUI.FlatTextAppearance textAppearance,
			int style, int radius, int padding, int border)
		{
			float[] outerR = new float[]{radius, radius, radius, radius, radius, radius, radius, radius};

			// creating normal state drawable
			var normalFront = new ShapeDrawable(new RoundRectShape(outerR, null, null));
			normalFront.SetPadding(padding, padding, padding, padding);

			var normalBack = new ShapeDrawable(new RoundRectShape(outerR, null, null));
			normalBack.SetPadding(border, border, border, border);

			if (style == 0) {             // flat
				normalFront.Paint.Color = Color.Transparent;
				normalBack.Paint.Color = theme.LightAccentColor;
				editText.SetTextColor(theme.VeryLightAccentColor);

			} else if (style == 1) {      // box
				normalFront.Paint.Color = Color.White;
				normalBack.Paint.Color = theme.LightAccentColor;
				editText.SetTextColor(theme.BackgroundColor);

			} else if (style == 2) {      // transparent
				normalFront.Paint.Color = Color.Transparent;
				normalBack.Paint.Color = Color.Transparent;
				editText.SetTextColor(theme.BackgroundColor);
			}

			Drawable[] d = {normalBack, normalFront};
			LayerDrawable normal = new LayerDrawable(d);

			editText.SetBackgroundDrawable(normal);

			editText.SetHintTextColor(theme.VeryLightAccentColor);

			if (textAppearance == FlatUI.FlatTextAppearance.Dark) editText.SetTextColor(theme.DarkAccentColor);
			else if (textAppearance == FlatUI.FlatTextAppearance.Light) editText.SetTextColor(theme.VeryLightAccentColor);

			var typeface = FlatUI.GetFont(editText.Context, fontFamily, fontWeight);
			if (typeface != null)
				editText.SetTypeface(typeface, TypefaceStyle.Normal);
		}
开发者ID:kuruminbr,项目名称:FlatUI.Xamarin.Android,代码行数:43,代码来源:FlatEditText.cs

示例4: SetPlaceholderTextColor

		private void SetPlaceholderTextColor(ExtendedEntry e, EditText editText){
			if(e.PlaceholderTextColor != Color.Default) {
				editText.SetHintTextColor(e.PlaceholderTextColor.ToAndroid());
				//editText.SetHintTextColor(e.PlaceholderTextColor.ToAndroid);
			}
		}
开发者ID:rileemallon,项目名称:Xamarin-Forms-Labs,代码行数:6,代码来源:ExtendedEntryRenderer.cs

示例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/afondo.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.SetHintTextColor(Color.ParseColor ("#ffffff"));
			etxtUser.SetSingleLine (true);
			etxtPassword.SetTextColor (Color.ParseColor ("#ffffff"));
			etxtPassword.SetHintTextColor(Color.ParseColor ("#ffffff"));
			etxtPassword.SetSingleLine (true);
			etxtEmail.SetTextColor (Color.ParseColor ("#ffffff"));
			etxtEmail.SetHintTextColor(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";
//.........这里部分代码省略.........
开发者ID:aocsa,项目名称:CInca,代码行数:101,代码来源:RegisterView.cs


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