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 8578559
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T20:25:06+00:00 2026-06-11T20:25:06+00:00

I’m trying to create a simple ListView. the items shown on the ListView are

  • 0

I’m trying to create a simple ListView. the items shown on the ListView are just strings from an array i have. Only that i want just one of the strings to be shown in bold. At first when i used a long TextView that contained all of the strings with line breaks tags inside a ScrollView, i could simply use

<b> </b>

around the string i wanted to be shown bold on the gui, this way:

TextView tv.setText(Html.fromHtml(str));

But using a big TextView inside a ScrollView caused other problems, and seemed a bad option when you have ListView exactly for this matter. So now I use a ListView, that gets all the strings from an ArrayList and displays them. Only that however I try to turn this around, I can’t seem to change the style of one item into Bold. I also tried creating a TextView for each of the strings, and than add the TextViews to the List, but I don’t know if ArrayAdapter or SimpleAdapter can do this. SimpleAdapter only seems to be able to get the TextView as a resource ID, which is the same for all items in the list, which prevents me from achieving what i want.

Long story short: after researching this issue here I know there are ways of extending BaseAdapter for a custom Adapter that allows any custom layout for the list, but is there really no other way? Do i really need to implement a BaseAdapter and @override getItem only to make one item bold? This seems odd to me. Does anyone know of a way I can just add TextViews to the ListView? using an ArrayAdapter displays the TextViews toString :/
If you know another simple way to show just one bold item, I’ll really appriciate any help. Thanks!

  • 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-06-11T20:25:07+00:00Added an answer on June 11, 2026 at 8:25 pm

    Alright, I have finally decided to solve this by making a custom adapter which extends ArrayAdapter. There are many examples out there, but some of them provide a lot of extras and over complicate this issue in my opinion, and I just wanted to solve this decently. I found this example extremely useful and friendly, in my research here i saw a lot of developers asking similar questions, so I really hope this helps you too.

    An adapter that extends ArrayAdapter isn’t too complicated, but moreover allows you to have it exactly your way with the layout in a fairly simple way. After the adapter is done, you can just add html tags to your specific strings in your source array, and when you bind them on the Adapter, use Html.fromHtml . This is how I solved it.
    If anybody knows if there’s a way to make bold or colored text in different specific items on a ListView without the need to make this adjustment yourself (extending ArrayAdapter and overriding getItem()) please do share it with us.
    I hope this helps others.

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

Sidebar

Related Questions

I have just tried to save a simple *.rtf file with some websites and
I have a French site that I want to parse, but am running into
I'm trying to create an if statement in PHP that prevents a single post
Basically, what I'm trying to create is a page of div tags, each has
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I am doing a simple coin flipping experiment for class that involves flipping a
I want use html5's new tag to play a wav file (currently only supported
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have a text area in my form which accepts all possible characters from
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out

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.