rahul rahul - 1 month ago 6
Android Question

display plain text page in android

I want to display a text page in android app, which is having description about my app. This text page will be displayed after clicking upon a button. I have several buttons and I want to display various pages for every button. Could you help me ?
Thanks in advance.

Answer

First:-

Create one layout in which you show your desired buttons. Set setOnClickListener on Buttons.

Second:-

Create different Layouts for every button click Page results. Like you have 5 buttons then create 5 Layout containing TextViews.

Third:-

set Intent call on every Button. Put this code on every Button click Intent calling method.

Intent intent= new Intent(Firstactivity.this,secondactivity.class);
startActivity(intent);
Comments