本文整理汇总了C#中EditText.SetTextSize方法的典型用法代码示例。如果您正苦于以下问题:C# EditText.SetTextSize方法的具体用法?C# EditText.SetTextSize怎么用?C# EditText.SetTextSize使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类EditText
的用法示例。
在下文中一共展示了EditText.SetTextSize方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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 );
}
示例2: UpdateView
void UpdateView(View view)
{
if (view is EditText)
{
TextBox = ((EditText)view);
TextBox.SetTextSize(ComplexUnitType.Dip, _fontSizeInDip);
}
}
示例3: updateTextAttributes
private void updateTextAttributes(EditText title, EditText content)
{
float baseSize = Float.parseFloat(Preferences.GetString(Preferences.Key.BASE_TEXT_SIZE));
content.SetTextSize(baseSize);
title.SetTextSize(baseSize*1.3f);
title.SetTextColor(Color.Blue);
title.PaintFlags = title.PaintFlags | PaintFlags.UnderlineText;
title.SetBackgroundColor(0xffffffff);
content.SetBackgroundColor(0xffffffff);
content.SetTextColor(Color.DarkGray);
}
示例4: OnCreate
protected override void OnCreate(Bundle bundle)
{
base.OnCreate(bundle);
// Create your application here
SetContentView(Resource.Layout.chatActivity);
//get intent data
toEmail = Intent.GetStringExtra("email");
toFirstName = Intent.GetStringExtra("firstName");
toLastName = Intent.GetStringExtra("lastName");
this.Title = toFirstName+" " + toLastName;
msgList = FindViewById<ListView>(Resource.Id.msg_list);
sendButton = FindViewById<Button>(Resource.Id.send_btn);
msgToSend = FindViewById<EditText>(Resource.Id.msg_edit);
msgToSend.SetTextColor(Android.Graphics.Color.Black);
msgToSend.SetTextSize(Android.Util.ComplexUnitType.Px,30);
//messages.Add(msg + "email= " + toEmail);
sendButton.Click += sendClickEvent;
msgAdapter = new ArrayAdapter(this, Android.Resource.Layout.SimpleListItem1, messages);
msgList.Adapter = msgAdapter;
ChatActivity.instance = this;
RegisterBroadcastReceiver();
updateMsgBox();
}
示例5: AddRowToLayout
void AddRowToLayout(SearchRow item)
{
var row = new LinearLayout(context) { Orientation = Orientation.Horizontal };
row.LayoutParameters = new ViewGroup.LayoutParams(LayoutParams.MatchParent, LayoutParams.WrapContent);
row.WeightSum = 1;
row.SetMinimumHeight(PixelConverter.DpToPixels(30));
LinearLayout.LayoutParams p = new LinearLayout.LayoutParams(0, ViewGroup.LayoutParams.MatchParent, 0.5f);
LinearLayout.LayoutParams f = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MatchParent, ViewGroup.LayoutParams.MatchParent);
var entryHolder = new LinearLayout(context);
entryHolder.Orientation = Orientation.Horizontal;
entryHolder.SetHorizontalGravity(GravityFlags.Right);
entryHolder.LayoutParameters = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MatchParent, ViewGroup.LayoutParams.MatchParent);
entryHolder.ShowDividers = ShowDividers.Middle;
entryHolder.DividerPadding = 20;
entryHolder.SetPadding(PixelConverter.DpToPixels(10), 0, 0, 0);
switch (item.RowType)
{
case SearchRowTypes.Heading:
row.AddView(Heading(item));
break;
case SearchRowTypes.SearchTerms:
EditText searchfield = new EditText(context);
searchfield.LayoutParameters = f;
searchfield.Hint = string.Format("Search {0}:", this.category.Value);
searchfield.SetTextSize(Android.Util.ComplexUnitType.Px, rowHeight * 0.40f);
searchfield.SetPadding((int)(rowHeight * 0.1), (int)(rowHeight * 0.15), (int)(rowHeight * 0.1), (int)(rowHeight * 0.15));
searchfield.SetSingleLine(true);
searchfield.InputType = InputTypes.ClassText;
row.AddView(searchfield);
searchfield.TextChanged += (object sender, TextChangedEventArgs e) =>
{
AddSearchItem(item.QueryPrefix, e.Text.ToString());
};
break;
case SearchRowTypes.PriceDoubleEntry:
row.AddView(Title(item));
EditText minPricefield = new EditText(context);
minPricefield.LayoutParameters = p;
minPricefield.Hint = "min";
minPricefield.SetTextSize(Android.Util.ComplexUnitType.Px, rowHeight * 0.40f);
minPricefield.SetPadding((int)(rowHeight * 0.1), (int)(rowHeight * 0.15), (int)(rowHeight * 0.1), (int)(rowHeight * 0.15));
minPricefield.SetSingleLine(true);
minPricefield.InputType = InputTypes.ClassNumber;
entryHolder.AddView(minPricefield);
EditText maxPricefield = new EditText(context);
maxPricefield.LayoutParameters = p;
maxPricefield.Hint = "max";
maxPricefield.SetTextSize(Android.Util.ComplexUnitType.Px, rowHeight * 0.40f);
maxPricefield.SetPadding((int)(rowHeight * 0.1), (int)(rowHeight * 0.15), (int)(rowHeight * 0.1), (int)(rowHeight * 0.15));
maxPricefield.SetSingleLine(true);
maxPricefield.InputType = InputTypes.ClassNumber;
entryHolder.AddView(maxPricefield);
minPricefield.TextChanged += (object sender, TextChangedEventArgs e) =>
{
//TODO: Get this text masking to work correctly
//string text = minPricefield.Text;
//if (text.Length > 0 && text.Substring(0, 1) == "$")
// minPricefield.Text = text;
//else
// minPricefield.Text = "$" + text;
AddSearchItem(item.QueryPrefix, e.Text.ToString());
};
maxPricefield.TextChanged += (object sender, TextChangedEventArgs e) =>
{
//string text = maxPricefield.Text;
//if (text.Length > 0 && text.Substring(0, 1) == "$")
// maxPricefield.SetText(text, null);
//else
// maxPricefield.Text = "$" + text;
AddSearchItem(item.SecondQueryPrefix, e.Text.ToString());
};
row.AddView(entryHolder);
break;
case SearchRowTypes.DoubleEntry:
row.AddView(Title(item));
EditText minfield = new EditText(context);
minfield.LayoutParameters = p;
minfield.Hint = "min";
minfield.SetTextSize(Android.Util.ComplexUnitType.Px, rowHeight * 0.40f);
minfield.SetPadding((int)(rowHeight * 0.1), (int)(rowHeight * 0.15), (int)(rowHeight * 0.1), (int)(rowHeight * 0.15));
minfield.SetSingleLine(true);
minfield.InputType = InputTypes.ClassNumber;
entryHolder.AddView(minfield);
//.........这里部分代码省略.........
示例6: OnCreate
//--------------------------------------------------------------
// EVENT CATCHING METHODS
//--------------------------------------------------------------
protected override void OnCreate(Bundle savedInstanceState)
{
base.OnCreate (savedInstanceState);
RequestWindowFeature(WindowFeatures.NoTitle);
Window.SetBackgroundDrawable(new ColorDrawable(Color.Transparent));
SetContentView(Resource.Layout.Dialog);
_root = FindViewById<LinearLayout>(Resource.Id.alertContainer);
_root.SetPadding(Builder.StrokeBorderWidth, Builder.StrokeBorderWidth, Builder.StrokeBorderWidth, Builder.StrokeBorderWidth);
_root.SetMinimumWidth ((int)(WindowManager.DefaultDisplay.Width * MinWidthRatio));
_root.SetMinimumHeight((int)(WindowManager.DefaultDisplay.Height * MinHeightRatio));
if(_root.ViewTreeObserver.IsAlive)
{
_root.ViewTreeObserver.AddOnGlobalLayoutListener(this);
}
_title = FindViewById<TextView>(Resource.Id.alertTitle);
_title.SetTextColor(Builder.StrokeColor);
_title.Gravity = GravityFlags.CenterHorizontal;
if(String.IsNullOrEmpty(Builder.Title))
{
_title.Visibility = ViewStates.Gone;
}
else
{
_title.Text = Builder.Title;
}
_content = FindViewById<LinearLayout>(Resource.Id.alertContent);
switch (Builder.ContentType)
{
case DialogBuilder.DialogContentType.TextView:
if(!String.IsNullOrEmpty(Builder.Message))
{
_message = new TextView(this);
_message.Text = Builder.Message;
_message.SetTextSize(Android.Util.ComplexUnitType.Dip, TextSize);
_message.SetTextColor(Builder.TextColor);
_message.Gravity = GravityFlags.CenterHorizontal;
_content.AddView(_message, ViewGroup.LayoutParams.MatchParent, ViewGroup.LayoutParams.WrapContent);
}
break;
case DialogBuilder.DialogContentType.EditText:
_field = new EditText(this);
_field.Hint = Builder.Message;
_field.SetTextSize(Android.Util.ComplexUnitType.Dip, TextSize);
// Limit the length
_field.SetFilters( new IInputFilter[] { new InputFilterLengthFilter(Constants.MaxLengthName) } );
_content.AddView(_field, ViewGroup.LayoutParams.MatchParent, ViewGroup.LayoutParams.WrapContent);
break;
case DialogBuilder.DialogContentType.None:
foreach(View view in Builder.Content)
{
_content.AddView(view, ViewGroup.LayoutParams.MatchParent, ViewGroup.LayoutParams.WrapContent);
}
break;
default:
break;
}
_buttonLayout = FindViewById<LinearLayout>(Resource.Id.buttonLayout);
LinearLayout.LayoutParams lp = (LinearLayout.LayoutParams) _buttonLayout.LayoutParameters;
lp.TopMargin = Builder.StrokeBorderWidth;
_buttonLayout.LayoutParameters = lp;
_positiveButton = FindViewById<ButtonStroked>(Resource.Id.positiveButton);
_negativeButton = FindViewById<ButtonStroked>(Resource.Id.negativeButton);
if(String.IsNullOrEmpty(Builder.PositiveText) && String.IsNullOrEmpty(Builder.NegativeText))
{
_positiveButton.Visibility = ViewStates.Gone;
_negativeButton.Visibility = ViewStates.Gone;
}
else if(String.IsNullOrEmpty(Builder.PositiveText))
{
_positiveButton.Visibility = ViewStates.Gone;
LinearLayout.LayoutParams lpNeg = (LinearLayout.LayoutParams) _negativeButton.LayoutParameters;
lpNeg.Weight = 2;
_negativeButton.LayoutParameters = lpNeg;
}
else if(String.IsNullOrEmpty(Builder.NegativeText))
{
_negativeButton.Visibility = ViewStates.Gone;
LinearLayout.LayoutParams lpPos = (LinearLayout.LayoutParams) _positiveButton.LayoutParameters;
lpPos.Weight = 2;
_positiveButton.LayoutParameters = lpPos;
}
else
{
LinearLayout.LayoutParams lpPos = (LinearLayout.LayoutParams) _positiveButton.LayoutParameters;
lpPos.LeftMargin = Builder.StrokeBorderWidth/2;
_positiveButton.LayoutParameters = lpPos;
LinearLayout.LayoutParams lpNeg = (LinearLayout.LayoutParams) _negativeButton.LayoutParameters;
lpNeg.RightMargin = Builder.StrokeBorderWidth/2;
_negativeButton.LayoutParameters = lpNeg;
//.........这里部分代码省略.........
示例7: OnCreate
protected override void OnCreate(Bundle bundle)
{
base.OnCreate (bundle);
SetContentView (Resource.Layout.ComposePhotoPoll);
ImageView btns = FindViewById<ImageView> (Resource.Id.imgNewLoginHeader);
TextView header = FindViewById<TextView> (Resource.Id.txtFirstScreenHeader);
RelativeLayout relLayout = FindViewById<RelativeLayout> (Resource.Id.relativeLayout1);
ImageHelper.setupTopPanel (btns, header, relLayout, header.Context);
c = header.Context;
Header.headertext = Application.Context.Resources.GetString (Resource.String.pollPhotoTitle);
Header.fontsize = 36f;
ImageHelper.fontSizeInfo (c);
header.SetTextSize (Android.Util.ComplexUnitType.Dip, Header.fontsize);
header.Text = Header.headertext;
if (Photoalbums.PhotoPickerUtil.names == null)
Photoalbums.PhotoPickerUtil.names = new List<string> ();
elsewhere = base.Intent.GetIntExtra ("returned", 0);
imgPollPhoto = new ImageView[4];
txtPhotoPollMessage = FindViewById<EditText> (Resource.Id.txtPhotoPollMessage);
if (wowZapp.LaffOutOut.Singleton.resizeFonts) {
float fontSize = txtPhotoPollMessage.TextSize;
txtPhotoPollMessage.SetTextSize (Android.Util.ComplexUnitType.Dip, ImageHelper.getNewFontSize (fontSize, c));
}
imgPollPhoto [0] = FindViewById<ImageView> (Resource.Id.imgPollPhoto1);
imgPollPhoto [1] = FindViewById<ImageView> (Resource.Id.imgPollPhoto2);
imgPollPhoto [2] = FindViewById<ImageView> (Resource.Id.imgPollPhoto3);
imgPollPhoto [3] = FindViewById<ImageView> (Resource.Id.imgPollPhoto4);
imgPollPhoto [0].Click += delegate {
LaunchImagePicker (1);
};
imgPollPhoto [1].Click += delegate {
LaunchImagePicker (2);
};
imgPollPhoto [2].Click += delegate {
LaunchImagePicker (3);
};
imgPollPhoto [3].Click += delegate {
LaunchImagePicker (4);
};
Button btnAdd = FindViewById<Button> (Resource.Id.btnAdd);
btnAdd.Click += delegate {
AddToPoll ();
};
ImageView recordVoice = FindViewById<ImageView> (Resource.Id.imgRecordPollMsg);
string rec = Android.Content.PM.PackageManager.FeatureMicrophone;
if (rec != "android.hardware.microphone")
recordVoice.SetBackgroundResource (Resource.Drawable.nomicrophone2);
else
recordVoice.Click += (object sender, EventArgs e) => voiceRecord (sender, e);
ImageButton btnBack = FindViewById<ImageButton> (Resource.Id.btnBack);
btnBack.Tag = 0;
ImageButton btnHome = FindViewById<ImageButton> (Resource.Id.btnHome);
btnHome.Tag = 1;
LinearLayout bottom = FindViewById<LinearLayout> (Resource.Id.bottomHolder);
ImageButton[] buttons = new ImageButton[2];
buttons [0] = btnBack;
buttons [1] = btnHome;
ImageHelper.setupButtonsPosition (buttons, bottom, c);
if (elsewhere != 0)
LaunchFromPhone ();
newSizes = new float[4];
newSizes [0] = newSizes [1] = newSizes [2] = newSizes [3] = 200f;
cpcutil.pollIsDone = false;
if (wowZapp.LaffOutOut.Singleton.resizeFonts) {
images = new ImageView[4];
for (int n = 0; n < imgPollPhoto.Length; ++n)
images [n] = imgPollPhoto [n];
newSizes [0] *= wowZapp.LaffOutOut.Singleton.bigger;
newSizes [1] = newSizes [2] = newSizes [3] = newSizes [0];
}
btnBack.Click += delegate {
Finish ();
};
btnHome.Click += delegate {
Intent i = new Intent (this, typeof(Main.HomeActivity));
i.AddFlags (ActivityFlags.ClearTop);
StartActivity (i);
};
}
示例8: BuildUI
void BuildUI (Bundle savedInstanceState)
{
var hMargin = 20;
RequestWindowFeature (WindowFeatures.NoTitle);
Title = state.Service.ShareTitle;
layout = new LinearLayout (this) {
Orientation = Orientation.Vertical,
};
layout.SetBackgroundColor (Color.White);
SetContentView (layout);
//
// Toolbar
//
toolbar = new ToolbarView (this, Title);
toolbar.IsProgressing = state.IsSending;
toolbar.Clicked += (sender, args) => StartSending();
layout.AddView (toolbar);
//
// Scroll content
//
var scroller = new ScrollView (this) {
LayoutParameters = new LinearLayout.LayoutParams (LinearLayout.LayoutParams.WrapContent, LinearLayout.LayoutParams.WrapContent) {
},
};
var scrollContent = new LinearLayout (this) {
Orientation = Orientation.Vertical,
LayoutParameters = new LinearLayout.LayoutParams (LinearLayout.LayoutParams.WrapContent, LinearLayout.LayoutParams.WrapContent) {
},
};
scroller.ScrollbarFadingEnabled = true;
scroller.AddView (scrollContent);
layout.AddView (scroller);
//
// Account
//
var acctLabel = new TextView (this) {
Text = "From",
LayoutParameters = new LinearLayout.LayoutParams (LinearLayout.LayoutParams.WrapContent, LinearLayout.LayoutParams.WrapContent) {
RightMargin = 12,
},
};
acctLabel.SetTextColor (Color.DarkGray);
acctLabel.SetTextSize (ComplexUnitType.Sp, LabelTextSize);
acctPicker = new TextView (this) {
Typeface = Typeface.DefaultFromStyle (TypefaceStyle.Bold),
Clickable = true,
};
acctPicker.SetTextColor (Color.Black);
acctPicker.SetTextSize (ComplexUnitType.Sp, LabelTextSize);
acctPicker.Click += PickAccount;
UpdateAccountUI ();
var acctLayout = new LinearLayout (this) {
Orientation = Orientation.Horizontal,
LayoutParameters = new LinearLayout.LayoutParams (LinearLayout.LayoutParams.FillParent, LinearLayout.LayoutParams.WrapContent) {
TopMargin = 24,
LeftMargin = hMargin,
RightMargin = hMargin,
},
};
acctLayout.SetGravity (GravityFlags.Left);
acctLayout.AddView (acctLabel);
acctLayout.AddView (acctPicker);
scrollContent.AddView (acctLayout);
//
// Attachments
//
var attachLayout = new LinearLayout (this) {
Orientation = Orientation.Vertical,
Visibility = state.Item.HasAttachments ? ViewStates.Visible : ViewStates.Gone,
LayoutParameters = new LinearLayout.LayoutParams (LinearLayout.LayoutParams.FillParent, LinearLayout.LayoutParams.WrapContent) {
TopMargin = 30,
LeftMargin = hMargin,
RightMargin = hMargin,
},
};
foreach (var x in state.Item.Links) {
attachLayout.AddView (new AttachmentView (this, x.AbsoluteUri));
}
foreach (var x in state.Item.Images) {
attachLayout.AddView (new AttachmentView (this, x.Filename, x.Length));
}
foreach (var x in state.Item.Files) {
attachLayout.AddView (new AttachmentView (this, x.Filename, x.Length));
}
scrollContent.AddView (attachLayout);
//
// Composer
//.........这里部分代码省略.........
示例9: OnCreate
protected override void OnCreate(Bundle bundle)
{
base.OnCreate(bundle);
SetContentView(Resource.Layout.ComposeTextPoll);
ImageView btns = FindViewById<ImageView>(Resource.Id.imgNewLoginHeader);
TextView header = FindViewById<TextView>(Resource.Id.txtFirstScreenHeader);
RelativeLayout relLayout = FindViewById<RelativeLayout>(Resource.Id.relativeLayout1);
ImageHelper.setupTopPanel(btns, header, relLayout, header.Context);
Context context = header.Context;
Header.headertext = Application.Context.Resources.GetString(Resource.String.pollTextTitle);
Header.fontsize = 36f;
ImageHelper.fontSizeInfo(header.Context);
header.SetTextSize(Android.Util.ComplexUnitType.Dip, Header.fontsize);
header.Text = Header.headertext;
txtPollMessage = FindViewById<EditText>(Resource.Id.txtPollMessage);
txtPollOption1 = FindViewById<EditText>(Resource.Id.txtPollOption1);
txtPollOption2 = FindViewById<EditText>(Resource.Id.txtPollOption2);
txtPollOption3 = FindViewById<EditText>(Resource.Id.txtPollOption3);
txtPollOption4 = FindViewById<EditText>(Resource.Id.txtPollOption4);
if (wowZapp.LaffOutOut.Singleton.resizeFonts)
{
float fontSize = txtPollMessage.TextSize;
txtPollMessage.SetTextSize(Android.Util.ComplexUnitType.Dip, ImageHelper.getNewFontSize(fontSize, context));
}
Button btnCreatePoll = FindViewById<Button>(Resource.Id.btnCreateButton);
ImageButton btnBack = FindViewById<ImageButton>(Resource.Id.btnBack);
btnBack.Tag = 0;
ImageButton btnHome = FindViewById<ImageButton>(Resource.Id.btnHome);
btnHome.Tag = 1;
LinearLayout bottom = FindViewById<LinearLayout>(Resource.Id.bottomHolder);
ImageButton[] buttons = new ImageButton[2];
buttons [0] = btnBack;
buttons [1] = btnHome;
ImageHelper.setupButtonsPosition(buttons, bottom, context);
ImageView imgMicrophone = FindViewById<ImageView>(Resource.Id.imgMicrophone);
string rec = Android.Content.PM.PackageManager.FeatureMicrophone;
if (rec != "android.hardware.microphone")
imgMicrophone.SetImageResource(Resource.Drawable.nomicrophone2);
else
imgMicrophone.Click += new EventHandler(recordVoice);
txtPollMessage.TextChanged += delegate
{
if (txtPollMessage.Text.Length > 200)
txtPollMessage.Text = txtPollMessage.Text.Substring(0, 200);
};
txtPollOption1.TextChanged += new System.EventHandler<Android.Text.TextChangedEventArgs>(limitText);
txtPollOption2.TextChanged += new System.EventHandler<Android.Text.TextChangedEventArgs>(limitText);
txtPollOption3.TextChanged += new System.EventHandler<Android.Text.TextChangedEventArgs>(limitText);
txtPollOption4.TextChanged += new System.EventHandler<Android.Text.TextChangedEventArgs>(limitText);
btnBack.Click += delegate
{
Finish();
};
btnHome.Click += delegate
{
Intent i = new Intent(this, typeof(Main.HomeActivity));
i.AddFlags(ActivityFlags.ClearTop);
StartActivity(i);
};
btnCreatePoll.Click += delegate
{
CreateTextPoll();
};
}
示例10: OnCreate
protected override void OnCreate(Bundle bundle)
{
base.OnCreate (bundle);
SetContentView (Resource.Layout.ComposeTextMessageScreen);
string passedIn = base.Intent.GetStringExtra ("text");
ImageView btns = FindViewById<ImageView> (Resource.Id.imgNewloginHeader);
TextView header = FindViewById<TextView> (Resource.Id.txtFirstScreenHeader);
RelativeLayout relLayout = FindViewById<RelativeLayout> (Resource.Id.relativeLayout1);
ImageHelper.setupTopPanel (btns, header, relLayout, header.Context);
context = header.Context;
Header.headertext = Application.Context.Resources.GetString (Resource.String.sendMessageTextTitle);
Header.fontsize = 36f;
ImageHelper.fontSizeInfo (header.Context);
header.SetTextSize (Android.Util.ComplexUnitType.Dip, Header.fontsize);
header.Text = Header.headertext;
dbm = wowZapp.LaffOutOut.Singleton.dbm;
mmg = wowZapp.LaffOutOut.Singleton.mmg;
CurrentStepInc = base.Intent.GetIntExtra ("CurrentStep", 0);
Button addContent = FindViewById<Button> (Resource.Id.btnAddContent);
Button sendMessage = FindViewById<Button> (Resource.Id.btnMessageSend);
ImageView useVoice = FindViewById<ImageView> (Resource.Id.imgVoice);
text = FindViewById<EditText> (Resource.Id.editTextMessage);
if (wowZapp.LaffOutOut.Singleton.resizeFonts) {
float fSize = text.TextSize;
text.SetTextSize (Android.Util.ComplexUnitType.Dip, ImageHelper.getNewFontSize (fSize, context));
}
if (!string.IsNullOrEmpty (passedIn))
text.Text = passedIn;
string rec = Android.Content.PM.PackageManager.FeatureMicrophone;
if (rec != "android.hardware.microphone")
useVoice.SetBackgroundResource (Resource.Drawable.nomicrophone2);
else
useVoice.Click += new EventHandler (recordVoice);
text.TextChanged += delegate {
if (text.Text.Length > 500)
text.Text = text.Text.Substring (0, 500);
};
sendMessage.Click += delegate {
SendTextMessage ();
};
ImageButton btnBack = FindViewById<ImageButton> (Resource.Id.btnBack);
btnBack.Click += delegate {
Finish ();
};
addContent.Click += delegate {
if (!string.IsNullOrEmpty (text.Text)) {
MessageStep msgStep = new MessageStep ();
msgStep.MessageText = text.Text;
msgStep.StepType = MessageStep.StepTypes.Text;
if (CurrentStepInc > ComposeMessageMainUtil.msgSteps.Count) {
msgStep.StepNumber = ComposeMessageMainUtil.msgSteps.Count + 1;
ComposeMessageMainUtil.msgSteps.Add (msgStep);
} else {
msgStep.StepNumber = CurrentStepInc;
ComposeMessageMainUtil.msgSteps [CurrentStepInc - 1] = msgStep;
}
if (CurrentStepInc == 1) {
StartActivity (typeof(ComposeMessageMainActivity));
Finish ();
} else {
Finish ();
}
ComposeGenericResults.success = true;
} else
Finish ();
};
}