How to implement screenshots gallery like Google Play? - android

I'm wondering how to implement gallery of screenshots like Google Play (Android Market). If i use typical Gallery, the problem is the first item of gallery is at the center(it has big big space at the beginning and the same at the end). I tried some horizontal listview but it seem has problem with scrolling when i push my horizontal listview in another scrollview link. In Google Play, the "gallery" doesn't have space at the beginning.
Thanks in advance.

use a ViewPager. it's used extensively in Google's in-house apps and works quite well for horizontal paging. it's also a pretty excellent replacement for TabHost.
Gallery is actually deprecated in favor of ViewPager.

Actually i finished my project long ago and forgot close question. Using this Android: Create an image Viewer using ViewPager.
For future guests, you can see another training from Android Developer about ViewPager here:
Displaying Bitmaps in Your UI

Related

Page Transformer animation like Google Play Books app

I want to implement animation when change the page in ViewPager, I know that I must use PageTransformer. I want to create an animation as Play Books app from google (like this).
I had searched a lot but no answer was accepted.
Any one can help?
There are many page curl libraries:
android-FlipView
transitionviewpager
android-flip
FoldableLayout
FoldableLayout2
android_page_curl
I wish one of them fulfill your need

how to get a "google image search" like layout

i am trying to build a UI that is similar to that of the Google image search,
basically a bottomless grid of pictures that are dynamically fetched once the user scrolls down.
i cant use the choose image intent because the pictures are not on the users device.
my current thinking is using a grid-layout and adding more items each time the user scrolls all the way down, does something like this already exists?
or is the grid-layout design is the way to go?
You can use existing libraries that make use of GridView. Check out the following article.
Just in case this article disappear I will post links to mentioned libraries here:
https://github.com/etsy/AndroidStaggeredGrid
https://github.com/maurycyw/StaggeredGridView
There are probably more libraries out there.

Android: Snapping effect with gallery of images

In one part of my app, I'm trying to make a gallery of photos that you can browser through. I want to have a snapping effect similar to the Gallery class. I want it to have a snapping effect every time you swipe from one image to the next in the list. This would be similar to the Gallery app where you browser through photos, or who you swipe through your gallery of apps. Every time you swipe, it has a "snapping" effect. What would be the easiest way to do this?
I know in the newer Android APIs the Gallery deprecated, so that is out of the question.
You want ViewPager. It's included in the compatibility package and described in this Android Developers blog post.

General android layout questions

I should begin by saying that I'm brand new to android development, although I have a good understanding of the fundamentals of java. That being said, I usually learn best by doing, so I'm writing an app for a campus magazine I work for and trying to learn through the process of making it.
At the top of the screen is a bar with two spinners labeled "issues" and "sections," which allow the user to filter the articles shown to only those in the respective issue / section. The rest of the screen is taken up by what I will describe as a vertically-oriented gallery, which shows the headline for each story underneath an image associated with it. The user can then "flip" through the stories in the magazine by scrolling through the "gallery." Selecting one of the stories will open the full story up in ViewPager.
I have two main questions at this point:
1) Initially, I planned to place the "issues" and "sections" spinners in the ActionBar. However, as I understand it, ActionBars are not displayed to users using Android 2.x. Given that these elements are critical to navigating the app, and that a majority of android users are still using 2.x, this seems unacceptable. As a result, I'm using an ActionBar-less theme and essentially drawing my own action bar via a linear layout on top of my main activity. Am I correct in my understanding that ActionBars do not display on Android 2.x devices? If so, am I correct in including my "tool bar" as a part of the main activity, or is there a better way to implement it? (Perhaps as a fragment? I don't really understand how those fit in yet...).
2) I am aware that the gallery widget is deprecated, so obviously I'm not going to use it. What alternative widgets would best achieve the same visual goal of having the user "flip" through the stories in the magazine by scrolling through the widget? Is there a way to animate a ListView to achieve this goal?
Again, any help - particularly which helps me to understand the wider issues involved here - will be greatly appreciated.
Thanks in advance.
You can use ActionBarSherlock - it is compatible down to Android v 1.6.
ViewPager might help you

Google Plus Android App UI Design - ListView swipe up into view

Could someone please explain how Google implemented the "detail" page of their Google + app? The detail page features an image at the top (which can be tapped) and a ListView that is positioned roughly 50% down the screen.
Like so:
Example
When you swipe up the ListView moves up to fill the entire screen:
Example
After this, additional swipes control the listView up/down:
Example
I've done my research but very little is available to suggest how they implemented this.
Thanks
The short answer is that they're using various tricks for enabling the sliding menus. Tons of resources have been authored by folks in the Android community, most notably:
The video on the subject here:
https://plus.google.com/115177579026138386092/posts/FjnASs9no1a
The sample that was authored to accompany the video:
https://github.com/jfeinstein10/SlidingMenu
And finally, a demo app that exists in the play store.
The easiest way to get the demo is to search for SlidingMenu Demos in the Play store. The specific controls of interest in the Demo are the "ViewPager" example and the "Slide" example.
When you look at the library, you'll notice that it pretty much rewrites significant pieces of the existing controls from View on up as well as custom transformations for a canvas element used in the view.
The sample that Jeremy authored, which really is an alternative library to existing ListView and Page controls, supports a large spectrum of Android devices as well as a number of UI controls that are slightly different variations of the examples you gave and that use varying transitions.

Categories

Resources