SOLVED : The latest update solved the problem somehow.
I am experiencing a very odd problem. Whenever I click(tap) the button on my Monodroid app, nothing happens!(I can just hear the tick sound and nothing else).
Let me clarify that things have been going very well before, but today I have been experiencing this unusual problem. Following is the code.
base.OnCreate(bundle);
SetContentView(Resource.Layout.Main);
Button button = FindViewById<Button>(Resource.Id.button1);
ProgressBar progressbar = FindViewById<progressbar>(Resource.Id.progressbar1);
Now I’ve tried to fire click event in three following ways,
button.Click +=new EventHandler(button_Click);
button.Click +=(sender,e)=> {//stuff;};
button.Click += delegate {//stuff; };
In all of the methods, if I update the method (like changing the button’s text), it works but if I try to do anything else it doesn’t work.
What I’ve tried that doesn’t work in the above mentioned handlers:-
Toast.MakeText(this, "blabla", ToastLength.Long);
progressbar.visibility = viewstates.visible etc
This button click event has been working fine!, even I has one app implementing the above mentioned tasks which worked but upon re-compiling from visual studio and installing the app on device, it didn’t work.
Yes!, I have restarted my PC, Android device, made new programs to test the functionality but it didn’t work!.
I have tried the above both on an emulator and Android device( Galaxy S2). I have used both Visual Studio and MonoDevelop and I get the same result. Please help, this is a really odd problem. I have never faced such click event handling in years until now.
Solved!, the latest update solved the problem.