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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T22:14:47+00:00 2026-05-26T22:14:47+00:00

I encounter performances issues while using a RelativeLayout (wrapped into a ScrollView) containing 153

  • 0

I encounter performances issues while using a RelativeLayout (wrapped into a ScrollView) containing 153 TextView. Each of the TextView has a 9 patch background.

The main layout:

<ScrollView 
    android:id="@+id/forum_accueil_ScrollView"
    android:layout_width="fill_parent" android:layout_height="fill_parent"
    android:background="@color/white">
    <RelativeLayout android:id="@+id/forum_accueil_RelativeLayout"
        android:layout_width="fill_parent" android:layout_height="fill_parent"
        android:background="@color/white">
    </RelativeLayout>
</ScrollView>

The RelativeLayout is filled with TextViews programmatically (the item count and description comes from a WS). Each of the TextView has a 9patch background selector. TextView description below:

<TextView xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="wrap_content" android:layout_height="35dip"
    android:textColor="@color/myblue"
    android:textStyle="bold"
    android:gravity="center_vertical" android:layout_gravity="center_vertical"
    android:background="@drawable/selector_forum_accueil_item">
</TextView>

At the end, I have a RelativeLayout containing 153 TextView. The display and scroll is really slow. Even coming back on this activity takes some time.

I opened the Hierarchy viewer and the ScrollView takes the following time to display:

Measure: 28ms
Layout: 1.2ms
Draw: 18ms

Is there a way to speed up the display and the responsiveness? Is a single RelativeLayout containing as much Views is the best way to do it (I tried to flatten as much as possible the hierarchy with this technique)?
I tried removing the 9 patch background for test, it seems much more responsive. Why?

  • 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-26T22:14:47+00:00Added an answer on May 26, 2026 at 10:14 pm

    That is an obscene amount of TextViews. At that point use a ListView. What does your RelativeLayout do for you (in this instance) that a ListView can’t?

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

Sidebar

Related Questions

I encounter an error of the form: The model item passed into the dictionary
I encounter this issue pretty consistently when trying to merge a branch back into
I've been using a system with imagettftext for a while now to add nog
I'm getting some very jerky scrolling while using the code below to create a
We're designing a backbone application, in which each server-side collection has the potential to
I have been using php for quite a sometime now and encounter three different
i encounter an error like Error 1 fatal error LNK1107: invalid or corrupt file:
I encounter the following small annoying dilemma over and over again in Python: Option
I often encounter the following scenario where I need to offer many different types
I frequently encounter some definitions for Win32API structures (but not limited to it) that

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.