Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

RunOnUIThread() in Xamarin Android

$
0
0

details.Text = OStateUserID.name + "\n" + OStateUserID.population); I want to run this statement after getting result into OStateUserId object

                bStateuserID.Click +=  async delegate {
            details.Text=" ";
            Guid x = new Guid("33F8A8D5-0DF2-47A0-9C79-002351A95F88");
            state OStateUserID =(state) await obj.GetStateByUserId(x.ToString());
                details.Text = OStateUserID.name + "\n" + OStateUserID.population);

            };

GetStateByUserId() method returns an object of class State.It runs asynchronously.After completing operation ,I want to print name and population fields of of State object to 'details' TextView.How can i make the use of RunOnUIThread()? Can anyone modify my code as needed.?please........


Viewing all articles
Browse latest Browse all 204402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>