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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T02:48:35+00:00 2026-05-28T02:48:35+00:00

I am creating a ListView dynamically and want to add two TextViews in a

  • 0

I am creating a ListView dynamically and want to add two TextViews in a single ListItem (one Below the other). If I add both TextView they are overlapping each other (The reason I m adding two TextView is because both have to have different text size and styles.)

here is the code… inside the custom ListAdapter getView Method

FrameLayout v = new FrameLayout(AppStarter.this);
TextView title = new TextView(AppStarter.this);
TextView date = new TextView(AppStarter.this);
title.setTextSize(16);
title.setTypeface(Typeface.DEFAULT, Typeface.BOLD);
title.setText(values[position]);
date.setText("Date : " + AppStarter.this.date[position]);
date.setTextSize(14);
v.addView(title);
v.addView(date, 1);
return v;

both title and date are overlapping each other I even tried addView(date,1);it didnt workout.

  • 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-28T02:48:36+00:00Added an answer on May 28, 2026 at 2:48 am

    Either use LinearLayout or RelativeLayout.

        LinearLayout linear = new LinearLayout(this);
        linear.setOrientation(LinearLayout.VERTICAL);
        TextView tv1 = new TextView(this);
        tv1.setText("First Text!");
        TextView tv2 = new TextView(this);
        tv2.setText("Second Text!");
        linear.addView(tv1);
        linear.addView(tv2);
    

    pass the layout in adapter of listview.
    or Add RelativeLayout and place views relatively on same

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

Sidebar

Related Questions

am working in windows application with c#.Am creating the listview items dynamically..i want to
I have a WPF ListView control for which I am dynamically creating columns. One
I'm creating a UserControl consisting of a TextBox and a ListView . I want
hi i am creating a custom listview with two chekboxes and problen is when
I'm dynamically creating a listview with data from a AJAX response. It successfully creates
I am creating listview dyanamicaly in the code..Not through XML....!! Two things i couldnt
I am creating a ListView . I have created two XML files, in the
How to differentiate between two items in the ListView Activity(Android)?? As i am creating
I'm creating a simple dialog with a ListView on it. I want to be
I'm creating a WPF application where several ListView selections are made in a row

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.