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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T14:01:03+00:00 2026-05-28T14:01:03+00:00

In my android list page/activity I have a 2 text fields a main and

  • 0

In my android list page/activity I have a 2 text fields a main and subsection one above each other, but when it coems to creating the array string for it I only see examples with the one section of text.

 <resources>
    <string name="hello">Hello!</string>
 </resources>

To then create what I want I would do a if statement to match the title then if so add the subtitle, but I would like to have it so I can read my title and subtitle strings something like below:

  <resources>
      <string name="hello">
          <item>Hello!</item>
          <item>my subtitle </item>
      </string>
      <string name="hello">
          <item>Hello!</item>
          <item>my subtitle </item>
      </string>
  </resources>

But I cannot find an example of how to read this to a list item etc, so I do not need to do a long if statement within my java to match the subtitle to the title.

Many Thanks
Si

  • 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-28T14:01:05+00:00Added an answer on May 28, 2026 at 2:01 pm

    I usually delimit the text with a pipe | and split it when displaying. Its a bit ugly, but it works.

    <item>item1|item2</item>
    

    then when I call it in getView(…)

    String[] r = c.getResources().getStringArray(R.array.arraylist).split("\\|");
    

    then I have defines for the index:

    private final int VIEW_HEADING_TITLE = 0;
    private final int VIEW_HEADING_SUB = 1;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an Android app with a ListActivity in the main view. The list
I am writing an Android application with a main page being a list of
It seems that android has enforced that a listview must have the name android:id=@android:id/list,
well, I have my Android app that have 4 main options. For that I
I have created a list in jquery mobile which directs to some page on
I have an app in android which retrieve a picture from http page.I'm asking
I am trying to create a refesh function for my main page. I have
I have a list of menu items and content in a single page. In
I have a few questions regarding android market(Google play). How can I list my
I want to show a button at the end of an Android list view.

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.