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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T09:16:41+00:00 2026-06-17T09:16:41+00:00

After redesigning an app we got larger load times on new views create (the

  • 0

After redesigning an app we got larger load times on new views create (the old version had almost no images and was much faster). We use ViewFlipper to navigate through the views. The first two views, which are created, are two layouts with ListViews, whose elements have background images and other graphics. Coincidentally we found, that each time, when a new View is created and is put on the view stack, the app calculates the dimensions of each existing view (Among other calls the getView() method of the ListView adapters several times). The trace log of each call looks like:

LinearLayout.measureChildBeforeLayout(View, int, int, int, int, int) line: 1369 LinearLayout.measureVertical(int, int) line: 660 LinearLayout.onMeasure(int, int) line: 553 LinearLayout(View).measure(int, int) line: 12937 TabHost(ViewGroup).measureChildWithMargins(View, int, int, int, int) line: 5045 TabHost(FrameLayout).onMeasure(int, int) line: 293 TabHost(View).measure(int, int) line: 12937 RelativeLayout.measureChildHorizontal(View, RelativeLayout$LayoutParams, int, int) line: 594 RelativeLayout.onMeasure(int, int) line: 376 RelativeLayout(View).measure(int, int) line: 12937 FrameLayout(ViewGroup).measureChildWithMargins(View, int, int, int, int) line: 5045 FrameLayout.onMeasure(int, int) line: 293 FrameLayout(View).measure(int, int) line: 12937 LinearLayout(ViewGroup).measureChildWithMargins(View, int, int, int, int) line: 5045 LinearLayout.measureChildBeforeLayout(View, int, int, int, int, int) line: 1369 LinearLayout.measureVertical(int, int) line: 660 LinearLayout.onMeasure(int, int) line: 553 LinearLayout(View).measure(int, int) line: 12937 PhoneWindow$DecorView(ViewGroup).measureChildWithMargins(View, int, int, int, int) line: 5045 PhoneWindow$DecorView(FrameLayout).onMeasure(int, int) line: 293 PhoneWindow$DecorView.onMeasure(int, int) line: 2180 PhoneWindow$DecorView(View).measure(int, int) line: 12937

and so on…
I think it is the reason why the app has become so slow.
What can I do to prevent the app to do these measures or to make the app faster?

ListAdapter getView():

    public View getView(int pos, View convertView, ViewGroup parent) {

    View row;
    Entry entry = null;
    if (objects.get(pos) instanceof Entry) {
        entry = (Entry) objects.get(pos) ;

        Boolean isGroupedEntry;
        if (entry.getGroup() != null && entry.isGroupedEntry()) {
            isGroupedEntry = true;
        } else {
            isGroupedEntry = false;
        }

        if (convertView != null) {
            row = convertView;
        } else {
            row = new EntryBoxFrameLayout(getContext());
        }

        ((EntryBoxFrameLayout) row).configureFor(entry);

    } else {
        row = new View(ContentManager.getInstance().getContext());
    }

    row.setSelected(false);
    row.setTag(pos);
    return row;
}

in configureFor() i set some texts and then:

        if (entry.getUserIsSignedUp() > 0) {
        this.setBackgroundColor("4A4A4A");
        this.findViewById(R.id.star).setVisibility(View.VISIBLE);
        this.findViewById(R.id.entry_face).setBackgroundResource(R.drawable.entry_face_loggedin);
        fulldate.setTextColor(Color.BLACK);
    } else {
        this.setBackgroundColor(entry.getColorHex());
        this.findViewById(R.id.star).setVisibility(View.INVISIBLE);
        this.findViewById(R.id.entry_face).setBackgroundResource(R.drawable.entry_face);
        fulldate.setTextColor(Color.WHITE);
    }

    if (entry.getGroup() != null) {
        this.findViewById(R.id.imgGroupArrow).setVisibility(View.VISIBLE);
        if (entry.isGroupExpanded()) {
            ((ImageView)this.findViewById(R.id.imgGroupArrow)).setImageResource(R.drawable.entry_up_arrow);
        } else {
            ((ImageView)this.findViewById(R.id.imgGroupArrow)).setImageResource(R.drawable.entry_down_arrow);
        }
        this.setGroupContainer(true);
    } else {
        this.findViewById(R.id.imgGroupArrow).setVisibility(View.INVISIBLE);
        this.setGroupContainer(false);
    }

    String filename = entry.getCacheFilename();
    Drawable entryimage = null;
    if (filename != null) {
        try {
            FileInputStream input = ContentManager.getInstance().getContext().openFileInput(filename);
            entryimage = new BitmapDrawable(ContentManager.getInstance().getContext().getResources(), input);
            input.close();
        } catch (Exception e) {
            Log.e(e.getLocalizedMessage());
        }
    }

    if (entryimage != null) {
        this.getImageView().setImageDrawable(entryimage);
    } else {
        this.getImageView().setImageResource(R.drawable.entry_placeholder);
    }
  • 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-17T09:16:42+00:00Added an answer on June 17, 2026 at 9:16 am

    The getView() method is slowing your application down. The listView recycles view objects for performance.

    There are many learning resources covering this.

    From google I/O conference and from creator of listView: Romain Guy

    • Make your Android UI Fast and Efficient
    • The world of listview

    Optimisation regarding images

    • Downloaded from the internet: LazyLoading
    • From your resources: displaying bitmaps

    For more code examples:

    • Google for optimization listview
    • Google for lazy loading listview
    • Google for convertview, viewholder listview
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've got a product I'm redesigning. The old db design was ... ID, Key,
After deploying WCF server (svc) on my Server, I have got this message when
After submitting our application several times, we continue to receive the following response: Thank
OK a little background story. I am redesigning one of my old websites and
After thinking for long, I have decided to build my data app for the
After upgrading my PHP to 5.4.3 (WAMP server 2.2), my web app made in
So, after redesigning my site, I thought I would use the HTML5 history API,
I am redesigning a webpage for a club I am in. After a lot
I am rewriting a new timesheet application including redesigning database and it will require
After redesigning my application somewhat to incorporate a more flexible design, i'm running into

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.