On Tue, Apr 17, 2012 at 2:50 PM, Russell <free...@gmail.com> wrote:
> 1.I wish my gallery widget can dispaly 6 images at the same time, and
> the layout is a 2*3 matrix, and when I slide the screen, the widget
> display another 6 images, how to code this function?

Use ViewPager instead of Gallery.

> 2.I want to add some dots under the gallery widget to show which page
> the gallery is displaying, is there a widget can achieve this
> function?

Use one of the ViewPagerIndicator.com widgets.

> 3.I know hot to load pitcures in the res/drawable, but if my pitcures
> are in a database, how to load them?

Using Java code. Check out BitmapFactory.

> 4.I want to add some buttons to set the gallery widget to display
> different category images, how to code?

Add the button widgets to your layout, use android:onClick or
setOnClickListener() to arrange to get control when the buttons are
clicked, and replace the adapter in your ViewPager as needed.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

Android App Developer Books: http://commonsware.com/books

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to