public override void OnViewCreated(View view, Bundle savedInstanceState) { base.OnViewCreated(view, savedInstanceState); listView = view.FindViewById <ListView>(Resource.Id.ListViewOrders); var client_data = new MQTTClient() { ClientId = "ESP32AndroidReleaseClient", Password = mqttPassword, Port = mqttPort, Server = mqttServer, UserName = mqttUserName }; mQTT = new MQTTService(client_data, Activity); BoxStateAdapter adapter = new BoxStateAdapter(Activity, this.FragmentManager, mQTT); listView.Adapter = adapter; //firstBox = view.FindViewById<RadioButton>(Resource.Id.RbtnFirstOrder); //secondBox = view.FindViewById<RadioButton>(Resource.Id.RbtnSecondOrder); //CloudAccessText = view.FindViewById<EditText>(Resource.Id.TextCloudAccessOptions); //CommandText = view.FindViewById<EditText>(Resource.Id.TextCommand); //Btn_Sending_Command = view.FindViewById<Button>(Resource.Id.ButtonSendCommand); //CloudAccessText.Text = topic; //CommandText.Text = "0"; //firstBox.Click += delegate //{ // topic = "mashtgbr/esp/led"; // CloudAccessText.Text = topic; // CommandText.Text = "0"; //}; //secondBox.Click += delegate //{ // topic = "mashtgbr/esp/led2"; // CloudAccessText.Text = topic; // CommandText.Text = "0"; //}; //Btn_Sending_Command.Click += BtnSendingCommand; //AlertDialog.Builder alert = new AlertDialog.Builder(Activity); //alert.SetTitle("Статус соединения с облаком"); //alert.SetMessage(CloudConnectionResult.Message); //alert.SetNeutralButton("Закрыть", (senderAlert, args) => //{ //}); //Dialog dialog = alert.Create(); //dialog.Show(); }
public BoxStateAdapter(Context context, FragmentManager manager, MQTTService service) { this._service = service; this.context = context; this.manager = manager.BeginTransaction(); }