Giter VIP home page Giter VIP logo

colorpicker's Introduction

ColorPickerColorPicker

作者:景三

English Document

[TOC]

简介

Download api build

ColorPicker是一个仿PhotoShop取色板的颜色拾取组件。

主界面

引用方法

使用gradle加载依赖

1 在project的build.gradle中

allprojects {
    repositories {
        // maven { url 'https://jitpack.io' } // 0.0.x 老版本发布在jitpack上(建议使用新版本)
        jcenter() // 1.x.x 支持AndroidX
    }
}

2 在你app的build.gradle中

// implementation 'com.github.relish-wang:ColorPicker:0.0.2-SNAPSHOT' // 0.x.x 老版本
implementation 'wang.relish.widget:colorpicker:1.0.0' // 1.x.x 新版本(支持AndroidX)

更新历史

CHANGELOG.md

使用方法

启动选择弹窗

new ColorPickerDialog.Builder(context, mColor)   //mColor:初始颜色
        .setHexValueEnabled(mHexValueEnable)               //是否显示颜色值
        .setOnColorChangedListener(onColorChangedListener) //设置监听颜色改变的监听器
        .build()
        .show();//展示

或者

或者你可以直接把library下的关键文件拷走使用

放置到你项目的对应文件夹即可。 注意: 记得把dialog_color_picker.xml布局文件中ColorPickerView的包名改为你自己的包名

再或者

直接下载了此仓库的源码,再将library作为一个module导入你的工程

注意事项

  • 要求API Level 14及以上

常见问题

Manifest文件合并问题

Manifest merger failed : Attribute meta-data#android.support.VERSION@value value=(25.3.1) ...

解决方法:

在app的build.gradle文件末尾添加以下代码

configurations.all {
    resolutionStrategy.eachDependency { DependencyResolveDetails details ->
        def requested = details.requested
        if (requested.group == 'com.android.support') {
            if (!requested.name.startsWith("multidex")) {
                details.useVersion '25.3.0'
            }
        }
    }
}

混淆配置

colorpicker's People

Contributors

relish-wang avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

colorpicker's Issues

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.