What's new
DroidForums.net | Android Forum & News

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Tex Link and Paragraph

JJJCR

New Member
Hello Droiders,

Getting my hands wet on Android and has started doing Hello World!!

I just want to ask, how to make a text as link?

Like I have a text:
Beyond the Storm

And if I click the text "Beyond the Storm" a new paragraph will open

And to make a new paragraph, does it need only a textview method? or are there other ways to display a paragraph after clicking a link?

Thank you Gurus, for any input and ideas.. :) :happy:
 
Hello Droiders,

Getting my hands wet on Android and has started doing Hello World!!

I just want to ask, how to make a text as link?

Like I have a text:
Beyond the Storm

And if I click the text "Beyond the Storm" a new paragraph will open

And to make a new paragraph, does it need only a textview method? or are there other ways to display a paragraph after clicking a link?

Thank you Gurus, for any input and ideas.. :) :happy:

any help guys.. :)
 
Hey JJJ,

Im sorry, I don't really understand your question. You said you're doing "hello world"? Are you referring to starting to program?
 
Welcome to the site. Think you may need to make your question a little more clear. DancingNexus
 
Hey JJJ,

Im sorry, I don't really understand your question. You said you're doing "hello world"? Are you referring to starting to program?

Hi MotoX,

Sorry for the confusion..

I mean I had finished doing the Hello World!!

And had started to explore other things.

After a couple searching on the web, I had this code and it seems to work.,


@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_first); // Our only layout for this app is main.xml

// Initialize the UI components
changingTextView = (TextView) findViewById(R.id.textView1);
final TextView view = (TextView) findViewById(R.id.textView1);
view.setOnClickListener(this);

@Override
public void onClick(View v) { // Parameter v stands for the view that was clicked.


if(v.getId() == R.id.textView1){
Toast.makeText(this, "Text View Link Testing!!!",
Toast.LENGTH_LONG).show();
}

Thanks,hope it will help someone else along the way :)
 
Last edited:
Welcome to the site. Think you may need to make your question a little more clear. DancingNexus

Hi SFGate, thanks for your welcome!! Appreciate it!!

dancedroid

Sorry for the confusion, I manage to found a code after searching the web and I share the code above.
 
Back
Top