Radoi Button Right to Left مثل فارسی

ساخت وبلاگ
دیزاین :

android:id="@+id/q3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/lblUntilNow"
android:layout_toLeftOf="@id/lblUntilNow"
android:layout_alignParentRight="true"
android:padding="5dp">

android:id="@+id/rbGroup"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_below="@+id/q3"
android:layout_alignParentRight="true">

کد :

RadioGroup rgp = root.FindViewById(Resource.Id.rbGroup);
rgp.RemoveAllViews();
RadioGroup.LayoutParams rprms;
// RadioGroup ll = new RadioGroup(Activity);
//ll.Orientation = Orientation.Horizontal;


// #7F7F7F
//#7F7F7F
//15sp
//IRANSansMobile.ttf
ContextThemeWrapper newContext = new ContextThemeWrapper(Activity, Resource.Style.RadioButtonColor);
RadioButton radioButton = new RadioButton(newContext);
radioButton.Text = dt.Rows[i]["Title"].ToString();
/* radioButton.Tag = Convert.ToInt32(dt.Rows[i]["Id"].ToString());
radioButton.Id = i;*/
radioButton.Tag = Convert.ToInt32(dt.Rows[i]["Amount"].ToString());
radioButton.Id = Convert.ToInt32(dt.Rows[i]["Id"].ToString());
if (i == 0)
radioButton.Checked = true;
radioButton.SetTextColor(Android.Graphics.Color.ParseColor("#7F7F7F"));
radioButton.ButtonTintList = (Android.Content.Res.ColorStateList.ValueOf(Android.Graphics.Color.ParseColor("#7F7F7F")));

Android.Graphics.Typeface tf = Android.Graphics.Typeface.CreateFromAsset(Context.Assets, "IRANSansMobile_Bold.ttf");


var tfStyle = Android.Graphics.TypefaceStyle.Normal;
radioButton.SetTypeface(tf, tfStyle);

radioButton.SetTextSize(Android.Util.ComplexUnitType.Sp, 15);
Android.Graphics.Drawables.Drawable drawable = Resources.GetDrawable(Android.Resource.Drawable.ButtonRadio);
drawable.SetBounds(0, 0, 57, 72);
radioButton.SetCompoundDrawables(null, null, drawable, null);
radioButton.Gravity = GravityFlags.CenterVertical;
radioButton.SetButtonDrawable(Android.Resource.Color.Transparent);
radioButton.SetBackgroundDrawable(null);

rprms = new RadioGroup.LayoutParams(Android.Support.V7.App.ActionBar.LayoutParams.WrapContent, Android.Support.V7.App.ActionBar.LayoutParams.WrapContent);
rgp.AddView(radioButton);

 

C# و SQL Server نکته های جالب و مهم در ...
ما را در سایت C# و SQL Server نکته های جالب و مهم در دنبال می کنید

برچسب : radio button right side,radio button right android,radio button right align,radio button right to left,radio button right label, نویسنده : alinaiemabadio بازدید : 159 تاريخ : دوشنبه 19 مهر 1395 ساعت: 12:42