android - Setting text into a ContentView -


how go setting texts/images image , content view have in xml?

i have like:

tv.settext("random number: " + math.random()); if (currenthour > 8 && currenthour < 22) { tv.settext("random number:" + random + "%");

but want displayed text (tv) displayed in new xml file, result.

setcontentview(r.layout.result);

is there way gather information random number, etc..and have results displayed in new layout - result?

thanks!

this question makes no sense. layout xml static, tells layoutinflater views create, properties set, , how link them together.

if want change activity's layout call setcontentview(r.layout.result) , call findviewbyid() find edittext want , call settext() on that.


Comments

Popular posts from this blog

android - Spacing between the stars of a rating bar? -

aspxgridview - Devexpress grid - header filter does not work if column is initially hidden -

c# - How to execute a particular part of code asynchronously in a class -