4

How does Google+ on Android achieve this horizontal scrolling with multiple items visible at once.

Also for memory usage, how would they destroy stuff that is off screen and build it as it's getting closer to be on screen?

I want to create something similar but only with bitmaps that are clickable.

enter image description here

Matt Ball
  • 354,903
  • 100
  • 647
  • 710
Nek
  • 463
  • 5
  • 15
  • For a horizontal listview see: http://stackoverflow.com/questions/3240331/horizontal-listview-in-android – Maria Neumayer Aug 21 '12 at 17:33
  • Well you can start by busting open hierarchyviewer – Frank Sposaro Aug 21 '12 at 17:33
  • I can't see the picture, but this pattern is achieved using a some type of [AdapterView](http://developer.android.com/guide/topics/ui/binding.html). See [Hello, ListView](http://developer.android.com/guide/topics/ui/layout/listview.html) and [Hello, GridView](http://developer.android.com/guide/topics/ui/layout/gridview.html) for examples. The `Adapter` class that backs the `AdapterView` handles memory by reusing existing `View` objects (your custom `Adapter` class overrides the `getView` method to make this happen). – quietmint Aug 21 '12 at 17:34
  • for good techniques on memory management watch http://www.youtube.com/watch?v=gbQb1PVjfqM from the Google I/O 2012 – stefan Aug 21 '12 at 18:03
  • I've refunded the bounty on this, the question is just too broad for Stack Overflow. – Tim Post Dec 13 '12 at 16:04

1 Answers1

0

My guess is they use Fragments along with other Adapters.

Here is Fragment information: http://developer.android.com/guide/components/fragments.html

Like someone else mentioned, they probably use some adapter view, along with scrollable.

BlackHatSamurai
  • 23,275
  • 22
  • 95
  • 156
  • I looked through all the fragment information but I didn't make much progress. I haven't found a way to scroll horizontally with multiple items on screen at once. What did you mean by "along with scrollable"? – Nek Aug 22 '12 at 21:15