How to make Semicircular horizontal listview in android?

How is Quora Android app's list so smooth?

  • I've been in Android development and I know how difficult it is to have such wide mix of layouts in one listview and still make it butter smooth? How did Quora Android app handle it?

  • Answer:

    The Quora app for Android uses a mix of native views and web views. Web views are really fast at rendering text layouts. The more shallow the DOM and simpler CSS rules, the faster the webview rendering. A bunch of custom stuff is added around the web view to make it work as best as possible. Native views when used follow the best practices for the Android platform, including memory and file caches for resources, and asynchronous loading.

Brien Colwell at Quora Visit the source

Was this solution helpful to you?

Other answers

There are two videos from previous Google I/O presentations that when used together can provide pretty much everything you need to know about making smooth scrolling lists on the native side in Android.  These videos are World of ListView (2010) and Doing More With Less (2012).  For the latter, specifically the first 10-15 minutes of it deal with creating an in-memory bitmap cache and loading images into an ImageView on a background thread when not already in memory. The main ideas are: In order to cut down on memory, the ListView's adapter should reuse a small number of list items that are shown over and over again, and you simply apply your data to the child controls.  The ArrayAdapter base class handles this for you, so derive from it and override getView Inflating the layout and getting references to all the child controls can take a noticeable amount of time when your user is scrolling fast.  They show some ways to get around this and specifically introduce a pattern they call "ViewHolder" that cuts down on this time even further. If you're loading images into your list items, even if you're loading them from resources in your apk or loading them from internal memory, this could also trip your users up if they're scrolling fast or if you're displaying thumbnails in a grid.  You can use a memory cache to get around this, and the Doing More With Less video basically spoonfeeds you this code. It might seem like a lot of work at first, but after you've done this a few times (creating the custom adapter, the item layout, the ViewHolder class, the boilerplate code in getView, wiring it all together in your activity or fragment), it'll be as natural as creating a new Activity, registering it in the manifest, creating your xml layout and overriding onCreate...Android muscle memory. Google I/O 2010 - The world of ListView Google I/O 2012 - Doing More With Less: Being a Good Android Citizen

Rich Stern

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.