本文整理汇总了C#中EditText.SetBackgroundResource方法的典型用法代码示例。如果您正苦于以下问题:C# EditText.SetBackgroundResource方法的具体用法?C# EditText.SetBackgroundResource怎么用?C# EditText.SetBackgroundResource使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类EditText
的用法示例。
在下文中一共展示了EditText.SetBackgroundResource方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnCreate
protected override void OnCreate(Bundle bundle)
{
//RequestWindowFeature(WindowFeatures.NoTitle);
base.OnCreate (bundle);
SetContentView (Resource.Layout.Pay_SMS_Main);
sendSMS_btn = FindViewById<Button> (Resource.Id.sendSMS);
numberEditText = FindViewById<EditText> (Resource.Id.editText_number);
numberEditText.Text = GeoFencer.inZone ();
listView = FindViewById<ListView> (Resource.Id.List_SMS_Main_History);
listView.ItemClick += OnListItemClick;
messageEditText = FindViewById<EditText> (Resource.Id.editText_message);
//prikazuje sva slova kao velika.(upper) i ogranicava velicinu registracije na registrationLength
messageEditText.SetFilters (new IInputFilter[] { new InputFilterAllCaps (),new InputFilterLengthFilter (registrationLength) });
var prefs = Application.Context.GetSharedPreferences("MySharedPrefs", FileCreationMode.Private);
const int regaPicDefault=Resource.Drawable.ociscena_rega;
messageEditText.SetBackgroundResource ( prefs.GetInt("MyRegistrationPrefs",regaPicDefault ));
try{
messageEditText.Text = prefs.GetString ("MyRegistrationDefaultPrefs", "");
//Log.Debug ("defaultna rega",messageEditText.Text);
}catch(Exception e){
Log.Debug ("Nema registracije na izbor",e.ToString ());
}
#region Ucitava podatke iz datoteke svaki put kad se otvori layout Pay_SMS_Main
//Log.Debug ("ON CREATE","DULJINA"+new FileInfo(message_Data).Length+" -- "+Enable_message_update);
long duljina=0;
try{
duljina = new FileInfo (message_Data).Length;
}catch(Exception e){
Log.Debug ("Pay_SMS_Main","FILE INFO krivo učitava "+e.ToString ());
}
if (duljina != 0 || Fill_ListView_With_Data.update_inbox_messages==true) {
List<string> data = new List<string> ();
String line;
StreamReader reader = new StreamReader (message_Data);
while ((line=reader.ReadLine ()) != null) {
data.Add (line);
}
reader.Close ();
podaciDialogLista=data;
try{
Fill_ListView_With_Data.FillListWithData (data,this,listView);
}
catch(NullReferenceException e){
Log.Debug ("FillListWithData:Na pocetku Pay_SMS_Main", e.ToString ());
}
}else{
Fill_ListView_With_Data.DeleteHistory ();
}
#endregion
//if user enabled Inbox messages
if(Fill_ListView_With_Data.Enable_message_update==true){
Fill_ListView_With_Data.Fill_With_Inbox_Data (this,listView);
}
try{
var tuple=ParseZoneNumbers.LoadZoneNumbersAssetsData (this);
zone = tuple.Item1; //zone
zoneDictionary = tuple.Item2; // zone i pripadni stringovi
}catch(Exception e){
Log.Debug ("Greska prilikom ucitavanja zone i zoneDictionary u Pay_SMS_Main",e.ToString ());
}
//dodavanje metode EventHandler delegatu iz OnReceiveSMS
//OnReceiveSMS.ReceiveSMSmessage += new OnReceiveSMS.ReceiveSMSdelegate (EventHandler);
//spremanje popisa brojeva zona u memoriju
var prefsZone = Application.Context.GetSharedPreferences("MySharedPrefs", FileCreationMode.Private);
var prefsZoneEditor = prefsZone.Edit ();
prefsZoneEditor.PutStringSet("MyZonePrefs", zone);
prefsZoneEditor.Commit();
//spremanje dictionarya zone-numbers u memoriju
var prefsDict = Application.Context.GetSharedPreferences("MySharedPrefs", FileCreationMode.Private);
var prefsDictEditor = prefsDict.Edit ();
string dict = string.Join (", ", zoneDictionary
.Select (m => m.Key + ":" + m.Value)
.ToArray ());
prefsDictEditor.PutString("MyDictPrefs", dict);
prefsDictEditor.Commit();
#region Button inicijalizacija zona i Click metoda
/*
* Inicijalizacija dugmova zona i postavljanje njihovog rada.
*/
Button vuki_btn = FindViewById<Button> (Resource.Id.zona01_btn);
//.........这里部分代码省略.........