|
| 1 | +# TagCloudView |
| 2 | +[ ](https://bintray.com/misakuo/maven/tagcloudview/_latestVersion) |
| 3 | +[](http://www.android-arsenal.com/details/1/3060) |
| 4 | +[](https://travis-ci.org/misakuo/3dTagCloudAndroid) |
| 5 | +[](http://www.android-gems.com/lib/misakuo/3dTagCloudAndroid) |
| 6 | +[中文](https://github.com/misakuo/3dTagCloudAndroid/blob/master/README.md) |
| 7 | +###Sample |
| 8 | + |
| 9 | +Scaning to download the sample APK. |
| 10 | +###Summary |
| 11 | +TagCloudView is a component based Android ViewGroup, it support to showing group of Views as a 3D sphere, and the sphere can scroll in all directions. |
| 12 | +###UI Style |
| 13 | +[Image](http://7fvfii.com1.z0.glb.clouddn.com/screenshot.gif) |
| 14 | + |
| 15 | + |
| 16 | +###Useage |
| 17 | +##### Eclipse |
| 18 | +copy source code or using maven plugin for Eclipse. |
| 19 | +##### Android Studio / IDEA |
| 20 | +- Place code in your `build.gradle` |
| 21 | +``` |
| 22 | +dependencies { |
| 23 | + compile 'com.moxun:tagcloudlib:1.1.2' |
| 24 | +} |
| 25 | +``` |
| 26 | + |
| 27 | +- Using in xml |
| 28 | +``` |
| 29 | +<com.moxun.tagcloudlib.view.TagCloudView/> |
| 30 | +``` |
| 31 | + |
| 32 | +- Set Adapter |
| 33 | +Extending class `TagsAdapter` and implement following methods: |
| 34 | +**public int getCount();** |
| 35 | +*Return the number of tags* |
| 36 | +**public View getView(Context context, int position, ViewGroup parent);** |
| 37 | +*Return the View instance of each tag* |
| 38 | +**public Object getItem(int position);** |
| 39 | +*Return the data of each tag(could be null)* |
| 40 | +**public int getPopularity(int position);** |
| 41 | +*Assign a propularity value for each Tag, this value is relation to tag's theme color* |
| 42 | +**public void onThemeColorChanged(View view,int themeColor);** |
| 43 | +*This method will be called when tag's theme color changed* |
| 44 | + |
| 45 | +- Custom Properties |
| 46 | + |
| 47 | +| Properties | In XML | In Code |Value Type| |
| 48 | +|:------------: |:-------------:| :----:|:-: |
| 49 | +| Auto Scroll | app:autoScrollMode | setAutoScrollMode(int mode) |enum [disable,uniform,decelerate] |
| 50 | +| Radius | app:radiusPercent | setRadiusPercent(float percent) |float (0,1) |
| 51 | +| Scroll Speed | app:scrollSpeed | setScrollSpeed(float scrollSpeed) |float (0,+] |
| 52 | +|Start Color|app:lightColor|setLightColor(int color)|int |
| 53 | +|End Color|app:darkColor|setDarkColor(int color)|int |
| 54 | + |
| 55 | + |
| 56 | +*** |
| 57 | +Welcome to Pull Request and Issues. |
0 commit comments