Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7573477
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T16:11:33+00:00 2026-05-30T16:11:33+00:00

Although I know there are hundreds of posts in stackoverflow regarding this post still,

  • 0

Although I know there are hundreds of posts in stackoverflow regarding this post still, I did not found my appropriate answer. So I am asking it as new question.

Problem:-
I have a text in text view “You need cookies or banana to eat?” I want that if any one click on banana or cookies then only it should go to Kitchen screen. If clicked on other word it should not react.

My Try:- I am doing it from text view, android:clickable="true" but complete line is getting clickable.
So I decided to break it into various text views, and used relative layout but again there was a problem that complete line was not coming in center of screen.When I hard coded it as android:layout_marginLeft="150dp" but then indentation disturbs for portrait and landscape. and obviously we should not hard code the values. Apart from that to give a clear view to user I need to do some formatting to banana and cookies like bold and underlined and some color. Although I used and tag for bold and underline, how to color the text.?

Lastly I should summarize my problems as

1) How to make some word in a complete string clickable (not url links)

2) How to do formatting of few text of complete string.

3) If relative layout is used how to keep the entire string in center.

If any other approach can b used they are also welcomed

Point to note that these all are not url links but internal screens.
So please if any one could help.
Any help will be appreciated. Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T16:11:34+00:00Added an answer on May 30, 2026 at 4:11 pm

    Hello AddingKnowledge.

    What u can do is to define your linear layout inside relative layout, that will provide u some flexibility.
    Apart from that style can be done through string.xml. Or you can do styling from style.xml and that is why style.xml is there.

    If you want you can go to link as How to make a part of text clickable like button in Android? for some deeper knowledge. Or handle textview link click in my android app

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Although I know that there are more idomatic ways of doing this, why doesn't
I know there's a million similar questions already, but I'm not sure they apply.
I know there are a lot of sources which explain this, but they just
My apologies, I know there are a million questions on pointers, arrays etc. although
I know there's already a lot of questions on this topic but I might
I know there are similar, more complex posts around, but I just can't get
Update: The issue still persists although it is not quite the same as before.
I know there is a couple answered questions on here regarding request scoped globals,
Please help me understand why this isn't working. I don't know if there is
I know there must be a way to do this and I've always just

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.