Giter VIP home page Giter VIP logo

diy_view's Introduction

DIY_View

Click to see English Document

  • 作者:Carson_Ho
  • 概述

示意图

注:关于该开源项目的意见 & 建议可在Issue上提出。欢迎 Star !

1. 简介

一款 基础的 Android自定义View控件

Github地址:DIY_Demo

示意图

2. 应用场景

对 实现一款自定义View的所有基础 & 注意事项 进行教学

3. 特点

对比市面上自定义控件,该控件的特点是:

3.1 使用简单
3.2 源码简单
3.3 二次开发成本低
  • 本项目已在 Github上开源:DIY_Demo
  • 详细的源码分析文档:具体请看本文的第6节

4. 具体使用

步骤1:导入控件库

主要有 Gradle & Maven 2种方式:

  • 方式1:Gradle引入依赖 build.Gradle
dependencies {
   compile 'scut.carson_ho:CircileView:1.0.0'
}
  • 方式2:Maven引入依赖 pom.xml
<dependency>
  <groupId>scut.carson_ho</groupId>
  <artifactId>CircileView</artifactId>
  <version>1.0.0</version>
  <type>pom</type>
</dependency>
步骤2:设置动画属性
  • 属性说明
circle_color
// 类型 = color 默认 = Color.RED(红色)
  • 使用示例 在XML文件中进行设置 activity_main.xml
<scut.carson_ho.circlelibrary.libraryCircle
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:background="#000000"
        android:padding="30dp"
        app:circle_color="#FF4081"
         />

5. 完整Demo地址

Carson_Ho的Github地址:DIY_View

示意图

6. 源码解析

请看文章手把手教你写一个完整的自定义View

7. 开源协议

DIY_View 遵循 MIT 开源协议

8. 贡献代码

  • 具体请看:贡献代码说明
  • 关于该开源项目的意见 & 建议可在Issue上提出。欢迎 Star !

9. 版本说明

2017-03-15 v1.0.0 :新增 圆 视图

关于作者

diy_view's People

Contributors

carson-ho 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.