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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T00:04:23+00:00 2026-06-18T00:04:23+00:00

I have a listview with multicolumns, where I have several textviews in each row.

  • 0

I have a listview with multicolumns, where I have several textviews in each row. Including two textview in each row with orientation="vertical".

In the xml file I can set the tag of each textview. However this tag of each textview is equal in each row.

How I can set the tag of each textview? The same problem happens with the id. In the first row it’s ok. The problem is in following rows.

I put an image with an example.

enter image description here

   public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState){
    ViewGroup rootView = (ViewGroup)inflater.inflate(R.layout.fragment_screen_slide_page, container,false);
    lv = (ListView)rootView.findViewById(android.R.id.list);

    ArrayList<HashMap<String, String>> mylistData =
            new ArrayList<HashMap<String, String>>();

    String[] columnTags = new String[] {"hour","col1", "col2", "col3","col4", "col5", "col6","col7", "col8", "col9","col10", "col11", "col12","col13","col14"};

    int[] columnIds = new int[] {R.id.tv_list_item1,R.id.tv_listRow_item1, R.id.tv_listRow_item2, R.id.tv_listRow_item3,R.id.tv_listRow_item4, R.id.tv_listRow_item5, R.id.tv_listRow_item6,R.id.tv_listRow_item7, R.id.tv_listRow_item8, R.id.tv_listRow_item9,R.id.tv_listRow_item10, R.id.tv_listRow_item11, R.id.tv_listRow_item12,R.id.tv_listRow_item13, R.id.tv_listRow_item14};
    for(int i=0; i<24; i++)
    {
       HashMap<String,String> map = new HashMap<String, String>();
        for(int j=0; j<15; j++)
         {
      if(j==0){
    map.put("hour", "0"+i+":00");
    if(i<10){
        map.put("hour", "0"+i+":00");   
    }
    else
        map.put("hour", i+":00");
}
else if(j>0){
    map.put(columnTags[j], "row”+i+”col"+j);
}
   }
   mylistData.add(map);
   }
    SimpleAdapter arrayAdapter =
        new SimpleAdapter(getActivity(), mylistData, R.layout.sechedule_list_row,
                      columnTags , columnIds);
    lv.setAdapter(arrayAdapter);
  • 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-18T00:04:24+00:00Added an answer on June 18, 2026 at 12:04 am

    You have to create your own custom adapter and then in getView set your tags and ids for each text view.

    Here is an example how to use getView
    android – custom ListView, getView method

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

Sidebar

Related Questions

I have listview with custom adapter. In each row i have 2 textviews and
I have ListView which as one TextView in each Row. and im discovering some
I have listView , each row of which is looking like that: <?xml version=1.0
I have ListView that uses a GridView to display several columns of data. Two
I have a ListView and each item have a TextView. I would like add
I have listview with 2 textbox and 1 checkbox on each row. I want
I have listView in which I inflate a row contain textview and button now
How can I recreate listView? I have listView with items containing few TextViews and
i have listview , and in each row needs to be an hoeizontal scrollview
I have ListView. I would like to fill each row of ListView with a

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.