Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jacobmoncur/QuiltViewLibrary
Android Quilt View Library
https://github.com/jacobmoncur/QuiltViewLibrary
Last synced: about 6 hours ago
JSON representation
Android Quilt View Library
- Host: GitHub
- URL: https://github.com/jacobmoncur/QuiltViewLibrary
- Owner: jacobmoncur
- Created: 2013-01-10T05:27:07.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2014-02-19T14:16:08.000Z (almost 11 years ago)
- Last Synced: 2024-04-14T14:33:13.489Z (7 months ago)
- Language: Java
- Size: 2.31 MB
- Stars: 557
- Watchers: 50
- Forks: 194
- Open Issues: 21
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-android-ui - https://github.com/jacobmoncur/QuiltViewLibrary
- awesome-android-ui - https://github.com/jacobmoncur/QuiltViewLibrary
README
# QuiltViewLibrary
QuiltView displays **views of different sizes** in a **scrollable grid**.
![quilt](https://raw.github.com/jacobmoncur/QuiltViewLibrary/master/nexus7.png "QuiltView") ![quilt](https://raw.github.com/jacobmoncur/QuiltViewLibrary/master/nexus7_mayer.png "QuiltView")
Dependencies
------------
This library depends on gridlayout_v7 ([email protected]:jacobmoncur/gridlayout_v7.git)Setup
-----The QuiltView can be defined by XML:
Or programmatically
boolean isVertical = true|false; //defines which direction the QuiltView will scroll: true = Vertical, false = Horizontal
QuiltView quiltView = new QuiltView(context, isVertical); //(QuiltView) findViewById(R.id.quilt);
Adding Children
---------------Children must be added to the QuiltView programmatically as an ArrayList of ImageViews:
ArrayList images = new ArrayList();
for(int i = 0; i < num; i++){
ImageView image = new ImageView(this.getApplicationContext());
image.setScaleType(ScaleType.CENTER_CROP);
image.setImageResource(R.drawable.bg);
images.add(image);
}
quiltView.addPatchImages(images);Or an ArrayList of Views
ArrayList views = new ArrayList();
for(int i = 0; i < num; i++){
FrameLayout patch = new FrameLayout(this.getApplicationContext());
views.add(patch);
}
quiltView.addPatchViews(views);Goals for this view
-------------------
* Have no _empty_ patches
* Be sudo-random (lays out the children differently each time)
* Looks awesome!TODO
----
* Custom Adapter to allow view recycling
* Be able to define children in XML
* Adapt better to different screen sizes