1

I am a noob and have no one to help me so please forgive my ignorance. 1) I have three menus on main activity (three buttons like read, about and info). I used intent for one of the buttons. But how do I redirect the other two buttons to specific activities (view only)

public void onClick(View view) {
    Intent i = new Intent(this, Main2Activity.class);
    startActivity(i);
}

2) What widget should I use to display a page of article within an activity? I have used plain text but unable to format it.

Thanks for the kind help.

F43nd1r
  • 7,690
  • 3
  • 24
  • 62
Shara Vega
  • 21
  • 3

2 Answers2

0
  1. You need to implement an onclick listener on each of the buttons.

An example of how to implement it is available here.

  1. It depends on what format the article is. If it is already in HTML format. You may use a WebView widget.

FYI: You can format a normal TextView, but that's probably a little more advanced and better left alone for now.

Community
  • 1
  • 1
Passer by
  • 562
  • 9
  • 14
  • Glad it was helpful, if I've answered all the questions. You can [accept](http://stackoverflow.com/help/accepted-answer) my answer. – Passer by Aug 20 '16 at 18:13
0
  1. You should have no problem in using same intent to redirect.
  2. Try to host that article online, using css and html and then just link that webpage by using web view in your activity.
Kunal Yadav
  • 139
  • 10