How to use same layout for different actions in android? -
i designing app contains around 25 questions.
how keep changing questions when click next button. here layout remains same except question (i.e. textview
may change according different questions other elements buttons
, background not change).so creating many layout different questions time consuming.
so how can use same layout
these many questions.should create these many layouts , classes
asking each question??
you should store questions in database, or in static final string[]
if there aren't many of them.
multiple classes not required here, because change question text, i.e. questionview.settext(newquestion);
.
then need 2 buttons - yes , no, have onclicklistener
set them, in return sets questionview
's text newquestion
.
Comments
Post a Comment