imageView.setLayoutParams(new Gallery.LayoutParams(WindowManager.LayoutParams.MATCH_PARENT, WindowManager.LayoutParams.MATCH_PARENT));
What are the other methods to replace Gallery. So I can use a horizontal scrolling in activity
Gallery is an offline photo gallery. You can use it to edit, find, and manage photos without being connected to the Internet. Gallery also works with SD cards on Android devices. Tip: Gallery is available on Android devices.
Galleries are a collection of images (like a category for images) whereas an image is an individual picture file. Before you upload an image you'll need to decide which gallery you're going to upload it into.
The Gallery documentation says:
This widget is no longer supported. Other horizontally scrolling widgets include HorizontalScrollView and ViewPager from the support library.
The best way for you is to use ViewPager
with an ImageView
in its fragment layout.
You can see this sample Android Gallery (No longer supported). There are also other gallery implementations on GitHub.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With