GithubHelp home page GithubHelp logo

3dtagcloudandroid's Introduction

TagCloudView

Download Android Arsenal Build Status Android Gems
English ###Sample Sample APP
扫码下载示例APK ###简介 TagCloudView是一个完全基于Android ViewGroup编写的控件,支持将一组View展示为一个3D球形集合,并支持全方向滚动。 ###UI效果 Image
screenshot

###使用

Eclipse

copy代码,或使用ADT的maven插件

Android Studio / IDEA
  • build.gradle中添加
compile 'com.moxun:tagcloudlib:1.1.2'
  • 在布局文件中引入
<com.moxun.tagcloudlib.view.TagCloudView/>  
  • 设置Adapter
    继承TagsAdapter,实现以下方法

    public int getCount();
    返回Tag数量
    public View getView(Context context, int position, ViewGroup parent);
    返回每个Tag实例
    public Object getItem(int position);
    返回Tag数据
    public int getPopularity(int position);
    针对每个Tag返回一个权重值,该值与ThemeColor和Tag初始大小有关;一个简单的权重值生成方式是对一个数N取余或使用随机数
    public void onThemeColorChanged(View view,int themeColor);
    Tag主题色发生变化时会回调该方法

  • 定制属性

属性 xml 代码 值类型
自动滚动 app:autoScrollMode setAutoScrollMode(int mode) enum [disable,uniform,decelerate]
半径百分比 app:radiusPercent setRadiusPercent(float percent) float [0,1]
滚动速度 app:scrollSpeed setScrollSpeed(float scrollSpeed) float [0,+]
起始颜色 app:lightColor setLightColor(int color) int
终止颜色 app:darkColor setDarkColor(int color) int

欢迎提交PR

3dtagcloudandroid's People

Contributors

misakuo avatar songzhw avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.