This tutorial aims to provide a working page flip implementation for usage in ListView.
Compatibility : Android 4.0+
Source code from : https://github.com/Yalantis/FlipViewPager.Draco
For a working implementation, Have a look at the Live Demo and download the Sample Project - attached :)
To achieve the same grid-looking view you should :
1. I have implemented the library in same project if this is not convenient, you can create a lib and reference it to the project
2. Create your main layout, it will be the view with 2 items merged together
<!-- ... -->
<ImageView android:contentDescription = "left image" android:scaleType = "fitXY" /> <LinearLayout
<ImageView android:contentDescription = "right image" android:scaleType = "fitXY" /> <!-- ... -->
3. Create layout for displaying an additional info for each merged item
<!-- ... -->
</LinearLayout> 4. Create your adapter and extend it from BaseFlipAdapter<T> class FriendsAdapter extends BaseFlipAdapter<Friend> { @Override
public View getPage (int position , View convertView, // ... } class FriendsHolder {
5. Set your adapter in
ListView
6. You can handle clicks just like in regular
ListView
|
Source code : Click here to download.
As always, Thanks a lot for reading...
Don't forget to share this post if you found it interesting!
If you find something to add to this post? or any other quick thoughts/hints that you think people will find useful? Share it in the comments & feedback's are most welcome.
One of the knowledge stuffed blogs i've ever seen. It helps revamp existing technology and architecture, using constantly evolving strategies to drive improved market performance. reffer the given blog for more info Application Modernization Services or
ReplyDeletereach +18882075969 for more information