Giter Club home page Giter Club logo

androidwheel's Introduction

AndroidWheel

Android 组件库,避免重复造轮子。

添加到项目

Step 1. Add the JitPack repository to your build file
Add it in your root build.gradle at the end of repositories:

allprojects {
  repositories {
    ...
    maven { url 'https://jitpack.io' }
  }
}

Step 2. Add the dependency

dependencies {
  implementation 'com.github.nesger:AndroidWheel:1.0.2'
}

效果图

zlog.jpg

debounce_edit_text.gif

selector_button.jpg

Releases

Releases

版本更新:

1.0.2:
增加 SelectorButton 工具类,减少 selector xml 文件的书写。

1.0.1:
增加防抖动 EditText

1.0.0:
提供日志工具类 ZLog,方便定位日志位置。提高开发效率。
提供日志辅助类 ZLogHelper,方便转换日志内容支持点击跳转。


文档

SelectorButton

功能:按住背景变色通用按钮 特点:支持代码配置和 xml 配置

xml 配置:

<com.zengyu.wheel.widgets.SelectorButton
    android:layout_marginTop="20dp"
    android:layout_width="200dp"
    android:layout_height="50dp"
    app:normal_color="#1a61a8"
    app:press_color="#63a3e3"
    app:stroke_color="#c4d6e9"
    app:stroke_width="6dp"
    android:text="xml stroke"
    android:textColor="@android:color/white"
    />

DebounceEditText

功能:防抖动
特点:支持代码配置和 xml 配置

xml 配置:

<com.zengyu.wheel.widgets.DebounceEditText
    android:id="@+id/edt_xml"
    android:layout_width="match_parent"
    android:layout_height="30dp"
    app:debounce_time="1000"
    />

ZLog

功能:日志工具类
特点:使用方便;可以快速点击跳转到日志打印处;

最简单用法:

// 1.打开开关。
ZLog.setDebugMode(true);
// 2.直接使用。
ZLog.e("use default tag ZLOG");

API:
setDebugMode(boolean debugMode): 设置是否打印日志。
setLinkMode(boolean linkMode): 设置是否支持日志跳转。
setTag(String tag): 设置默认 TAG 名称。

默认不打印,支持日志跳转,TAG 为 ZLOG

ZLogHelper

功能:让日志内容支持点击跳转。
特点:方便易用。

记住一点,stackIndex 为 1 表示定位到调用 ZLogHelper 的地方。
因此如果做了一层封装,要定位到外部调用处,stackIndex 需要为 2。

API:
wrapMessage(int stackIndex, String message): 包装 message 使其支持点击跳转。

androidwheel's People

Contributors

zhanzengyu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

lobster002

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.