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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T21:37:50+00:00 2026-05-27T21:37:50+00:00

Background information: I’m working on a small app for myself and a few friends,

  • 0

Background information:

I’m working on a small app for myself and a few friends, and it contains a few ListViews with items based on custom XML layouts. The layouts are somewhat heavy – a few ImageViews, TextViews, a LinearLayout and a RelativeLayout – so I started thinking about performance. I’m not personally experiencing any performance issues, but I know that some of my friends, who’ll be using the app, don’t have high-end phones and that they might have issues with these layouts.

I remember watching a video presentation regarding performance in Android, and I recall Romain Guy mentioning something about custom Views being better for performance than constantly inflating custom XML layouts. I believe the context was the early development of the Gmail application (around Android 1.5, I believe), where each item of the Listview was rather complex.

It’s probably worth pointing out that I’m reusing Views in my application, and that I’m using the ViewHolder principle as recommended by Google.

My question: Is it better for performance to use custom Views or is it OK to inflate custom XML layouts?

  • 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-27T21:37:51+00:00Added an answer on May 27, 2026 at 9:37 pm

    As always, then answer is “it depends” – inflating view from XML imposes some performance penalty ( parsing overhead ) over plain creation in code, but also provides greater flexibility. You should definitely reuse views whenever possible ( especially in larger lists) – it improves scrolling performance dramatically

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

Sidebar

Related Questions

Here is a little background information. I'm working on replacing a dll that has
A bit of background information: Inorder to read/write to SLE4442 memory cards, my app
Background Information Ordinal position notation, AKA ordinals, is column shorthand based on the column
This question contains a lot of background information, to make sure you fully understand
Background Information: In the past, I have been picking up a collection of XML
Some background information: We have an ancient web-based document database system where I work,
Background Information: Ultimately, I would like to write an emulator of a real machine
As usual, some background information first: Database A (Access database) - Holds a table
And if you do, can you give some background information on the implementation and
Background: I have a little video playing app with a UI inspired by the

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.