Giter Site home page Giter Site logo

allitemview's Introduction

AllItemView

万能的ItemView

考虑到每个APP都会用到一些常用的功能,比如,个人资料、关于、检测更新、设置以及各种列表 然而基本上这些功能的样式都是一个itemview,所以分装一个万能的itemview的必要性显得尤为重要

支持的样式

icon(本地或阿里巴巴iconfont位图)、标签、标签值、箭头、切换开关等任意组合,(后续考虑实现输入框的一些功能,和自定义样式)

功能

  1. 基本功能(icon、标签、标签值、箭头的任意组合)
  2. 电话
  3. 版本更新(目前点击更新需要自己实现,后续版本添加上去)
  4. 跳转到网页
  5. 选择弹框
  6. 切换开关
  7. 跳转到指定不带参数Activity

效果

Alt text

实现

  1. Add it in your root build.gradle at the end of repositories

     allprojects {
     repositories {
     	...
     	maven { url 'https://jitpack.io' }
     }
     }
    
  2. Add the dependency

     dependencies {
         compile 'com.github.codbking:AllItemView:v1.0.0'
     }
    
  3. xml

     <com.codbking.view.ItemView
     android:layout_width="match_parent"
     android:layout_height="wrap_content"
     app:ItemView_text="关于"
     app:ItemView_type="activity"
     app:ItemView_acname="com.codbking.allitem.exaple.AboutActivity"/>
    
  4. 权限

     <uses-permission android:name="android.permission.CALL_PHONE"/>
     <uses-permission android:name="android.permission.INTERNET"/>
     <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
    

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.