Having an issue to create gallery in jelly beans - android

I am creating a picture gallery for newly android release jellybeans.But i got to know from here is that gallery widget is deprecated and they suggested to use ViewPager or HorizontalScrollView.I decided to use HorizontalScrollView to create my gallery.
But after a while i found that we cant set adapter to HorizontalScrollView. Now I am confused how to create my gallery in jellybeans. Help me with your suggestions.Any help will be highly appreciated.
Thank you.

Here is an article and component that subclasses AdapterView for a horizontal ListView. It uses recycling, and standard AdapterView.OnItemClickListener. Note: It does not automatically "snap" to the center view.

Related

ViewPager in RecyclerView

I have created a android app UI in which I have added a image view in recycler view and now I want is that when user swipes over the image , the comments of images should seen. plz help me to do it either by using viewpager or anything else.
I believe you can use Gesture detector classes to detect swipe event and inflate view of your image comments.
Here is the link for reference:
https://developer.android.com/training/gestures/detector
Here is the example for the implementation.
https://www.spaceotechnologies.com/android-swipe-gestures-tutorial/
Also, kindly please share your base code for better help.

Advice on creating a menu (image attached)

Below is an image of GPS Essentials app, which I guess a lot uses.
I am interested in making a menu similar to this. How is such a menu (or what ever it is called) created.
My first thought was to use a ListView having elements containing an image and text-view in vertical orientation. But then I was wondering if there is any better, preferably an easier way to do it.
I would be very greatful if you could share your experience with me. Thank you.
GridView is the solution exactly. You have to actually define a custom adapter for the GridView.
Why custom adapter? Because you have to inflate a custom row (having ImageView and TextView) to every item in your GridView.
Hint: Search for the example with word "Android Gridview example", you will get many articles/tutorials.
use GridView. You can find documentation here http://developer.android.com/resources/tutorials/views/hello-gridview.html

How to create custom gallery view and zoom?

How to create own Gallery View?
i want to view multiple images and scroll.
Thank you,
Rajesh Patil
As I understand correctly you need to create your custom Gallery view. You need to extend it from AdapterView. There is a great example of how to do that, but in custom ListView interpretation by SonyEricsson. You may use it to figure out how to create custom Gallery

Custom Adapter for Gallery View in Android

hi i want to split my gallery with 5 images in 2 rows.
Please let me know how to do this in android using Gallery View & custom adapter for Gallery view.
Is there any sample code available please share it, i have already checked the previous posts in this site.
Thanks
If you still need this and Pagination instead of scroll will work for you, you might look at: https://github.com/sfarooq/PaginatedGallery
I designed it using ViewPager so you can manipulate the adapter to send any kind of views you want including two row views.
If you must use scrolling galleries you could implement two separate gallery in a vertical orientation and send touch events from each to the other.

How to add View to Gallery?

I have multiple ListViews and would like to add those to Gallery.
I tried with addView but it is not supported since Gallery view is an AdapterView.
Can someone let me know how to go about it?
Regards
Sunil
I have multiple ListViews and would
like to add those to Gallery.
That is unlikely to work. Either the Gallery or the ListView scrolling probably will not function.
I tried with addView but it is not
supported since Gallery view is an
AdapterView.
Correct.
Can someone let me know how to go
about it?
You will need to create an Adapter containing your ListViews, and hand that Adapter to your Gallery.
An example on how to use the Gallery class together with an Adapter can be found here. The adapter in this example provides images. You could provide your ListViews

Categories

Resources