java - Executing Random in Android App -
i beginner in android development , need display random string on user's screen.
i have made array , got random string it,
so how display string on user's screen? sorry, beginner , can't find anywhere.
thank you.
put textview in activity's layout:
<textview android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/mytextview"/>
then in activity's oncreate
method fetch , change text string:
string mystring = "abc"; textview mytextview = (textview) findviewbyid(r.id.mytextview); mytextview.settext(mystring);
if doesn't make sense @ all, should try reading this: https://developer.android.com/training/basics/firstapp/building-ui.html
Comments
Post a Comment