开发者

What View Component does the Google Plus App (Stream) use?

if you use the Google Plus App on Android and switch to the Stream, you get a view where you can swipe to the left and right between the All circles/Incoming/Nearby-Stream. What view component is used for this? Is this a standard Andr开发者_运维百科oid component? Or where can I find democode how i can build such a view component?


You should take a look at the ViewPager from Android Compatibility Package for the desired widget/swipe navigation. Find more about it here http://developer.android.com/sdk/compatibility-library.html

Also, checkout this recently posted tutorial and some sample code on ViewPager by Richard: http://geekyouup.blogspot.com/2011/07/viewpager-example-from-paug.html


It is a combination of a ViewPager together with an indicator for where you are currently and where you can go swiping left and right.

A sample of how this can be done along with code you can use in your own apps may for example be found here. I've played with this code a little and it works pretty well.


None of the default widgets/views. I guess, it's some kind of a custom view with swipe functionality.

Honeycomb opens up a few new widgets which seem to have these functionality. Have a look here.

http://developer.android.com/sdk/android-3.0.html (New Widgets)


I used APKTool to take a look at what's going on. Hopefully it is okay to post this here. This is from version 1.0.2 of the G+ APK.

removed google+ app code as per CommonsWare's suggestion

So, it looks like they're using standard views, though perhaps with a good deal of gesture detection and smooth animation magic.

EDIT) If you really want to know about the exact inner-workings of what is going on in the Stream activity, I suggest you use APKTool yourself and examine the .smali code

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜