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.
Asked
Active
Viewed 2,469 times
-6
-
use `TextView`? – V-rund Puro-hit Oct 14 '16 at 05:37
-
Why don't you use a TextView to show the description? – Febi M Felix Oct 14 '16 at 05:38
-
Create new `Activity` as many as your buttons then use `Intent` to redirect to other activity and per activity create a `textView` for the description – Reginald Oct 14 '16 at 05:39
1 Answers
1
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);

Goblin シ
- 90
- 13
-
thanks for the answer. I created up to this. I struck at secondactivity.class – rahul Oct 14 '16 at 05:49
-
I searching how to create secondactivity.class . to display a bunch of lines. I am new to android. Kindly help me to get out of this issue. – rahul Oct 14 '16 at 05:50
-
For every layout (XML) you have to create a Class(.java), in which you have to declare everything like Layout Containing textView, imageView etc. So that will be your second Activity. – Goblin シ Oct 14 '16 at 05:55
-
This is the simplest example for intent call: http://programmerguru.com/android-tutorial/android-intent-example/ – Goblin シ Oct 14 '16 at 05:59
-
-
-
@rahul try to follow questionnaire structure provided by stackoverflow to get rid of down vote to your question. – Jaccs Oct 14 '16 at 07:40