Пример #1
0
 private void SetupAlarmTypeSpinner()
 {
     try
     {
         string[] alarmTypes = StringHelper.AlarmNotificationTypes();
         if (alarmTypes != null && alarmTypes.Length > 0)
         {
             ArrayAdapter adapter = new ArrayAdapter(this, Resource.Layout.SpinnerGeneral, alarmTypes);
             if (adapter != null)
             {
                 adapter.SetDropDownViewResource(Resource.Layout.SpinnerGeneralDropdownItem);
                 _alarmType.Adapter = adapter;
                 Log.Info(TAG, "SetupAlarmTypeSpinner: Set Alarm type spinner Adapter");
             }
             else
             {
                 Log.Error(TAG, "SetupAlarmTypeSpinner: Failed to create Adapter");
             }
         }
     }
     catch (Exception e)
     {
         Log.Error(TAG, "");
         if (GlobalData.ShowErrorDialog)
         {
             ErrorDisplay.ShowErrorAlert(this, e, "Setting up Alarm type spinner", "SettingsActivity.SetupAlarmTypeSpinner");
         }
     }
 }