All Projects → LiangLuDev → Devshapeutils

LiangLuDev / Devshapeutils

一行代码设置Shape样式、Selector触摸反馈效果开源库

Programming Languages

java
68154 projects - #9 most used programming language

Labels

Projects that are alternatives of or similar to Devshapeutils

Vue Konva
Vue & Canvas - JavaScript library for drawing complex canvas graphics using Vue.
Stars: ✭ 682 (+323.6%)
Mutual labels:  shape
View shaper
A library to help create shaped views and layouts in Android
Stars: ✭ 42 (-73.91%)
Mutual labels:  shape
Sketch React
render sketch(v43+) file as react component
Stars: ✭ 98 (-39.13%)
Mutual labels:  shape
Mylittlecanvas
🎨Need to create a custom view ? You don't know how to use Canvas, use MyLittleCanvas instead !
Stars: ✭ 870 (+440.37%)
Mutual labels:  shape
Flutter Neumorphic
A complete, ready to use, Neumorphic ui kit for Flutter, 🕶️ dark mode compatible
Stars: ✭ 988 (+513.66%)
Mutual labels:  shape
Phidl
Python GDS layout and CAD geometry creation
Stars: ✭ 56 (-65.22%)
Mutual labels:  shape
Torchlayers
Shape and dimension inference (Keras-like) for PyTorch layers and neural networks
Stars: ✭ 527 (+227.33%)
Mutual labels:  shape
Marlin Renderer
Marlin is the FAST Java2D antialiasing rasterizer derived from OpenJDK Pisces (shape)
Stars: ✭ 146 (-9.32%)
Mutual labels:  shape
Rwidgethelper
Android UI 快速开发,专治原生控件各种不服
Stars: ✭ 996 (+518.63%)
Mutual labels:  shape
Shapes
📐 Net standard geometry/shape manipulation library, can be used to merge / split shapes
Stars: ✭ 95 (-40.99%)
Mutual labels:  shape
Shapesinopengles2.0
Create basic shapes in opnegles2. And for abstraction purpose, its a class implementation using VBO's to create basic shapes in Open GLES2.0
Stars: ✭ 20 (-87.58%)
Mutual labels:  shape
Built vector
Generate Flutter vector code from a subset of SVG files.
Stars: ✭ 33 (-79.5%)
Mutual labels:  shape
Ng2 Konva
Angular & Canvas - JavaScript library for drawing complex canvas graphics using Angular.
Stars: ✭ 78 (-51.55%)
Mutual labels:  shape
Konva
Konva.js is an HTML5 Canvas JavaScript framework that extends the 2d context by enabling canvas interactivity for desktop and mobile applications.
Stars: ✭ 6,985 (+4238.51%)
Mutual labels:  shape
Shapeshifter
🐺 Generate relational schemas, PropTypes, Flow aliases, and TypeScript interfaces from JSON or GraphQL schematic files.
Stars: ✭ 105 (-34.78%)
Mutual labels:  shape
Texture Vs Shape
Pre-trained models, data, code & materials from the paper "ImageNet-trained CNNs are biased towards texture; increasing shape bias improves accuracy and robustness" (ICLR 2019 Oral)
Stars: ✭ 556 (+245.34%)
Mutual labels:  shape
Morphi
Shapes for SwiftUI ♡☾
Stars: ✭ 54 (-66.46%)
Mutual labels:  shape
Tracks
Programming with shapes
Stars: ✭ 151 (-6.21%)
Mutual labels:  shape
Androidutillib
🔥 旨在打造一款属于Android开发的强大工具库:内置各种开发必备工具类、Dialog封装、组件重写等
Stars: ✭ 143 (-11.18%)
Mutual labels:  shape
Sketch Make Long Shadow
A plugin for Sketch to create long shadows of a user defined length from a shape.
Stars: ✭ 92 (-42.86%)
Mutual labels:  shape

DevShapeUtils开源库

项目初衷: 公司项目样式文件n+1个,多人开发文件命名各种各样,每次都要搜索半天,我也在网上看了很多类似样式设置库,大多数都是自定义View,我想View还是原生的好,如果以后要针对View做一些骚操作,可能会有些影响,所以我一直秉承着不自定义View。起初我想代码直接设置样式,比较方便一点,就在闲暇时间写了这个项目,代码直接设置样式,没有太多的属性需要设置,使用简单、为了更方便、快捷、省时的项目开发。

公告

最开始的代码设置样式的雏形虽然很简便,然而还是会有些不方便的地方,有朋友也反馈这个问题。经过一段时间的整理和朋友的建议,终于支持XML设置样式了 。可能会存在一下问题,请大家及时反馈。XML设置文档

1、功能介绍


  • Shape样式: 圆形、圆角、边框、虚线边框、颜色渐变
  • Selector样式: 触摸背景变化、触摸字体颜色变化

2、如何使用


2.1 Android Studio导入方法,添加Gradle依赖

在项目的 build.gradle 添加:

android {
    defaultConfig {
        ...
        minSdkVersion 16
        ...
    }
}

dependencies {
        ...
        implementation 'cn.luliangdev:DevShapeUtils:1.1.0'
        }

PS:项目中minSdkVersion设置为16(Android4.1),不然编译通不过。(现在的手机版本基本都在4.4以上)

2.2 在项目Application中初始化

public class DevApplication extends Application {
    @Override
    public void onCreate() {
        super.onCreate();
        DevShapeUtils.init(this);
    }
}

2.3 颜色设置

  • R.color.xxx color资源文件
  • #FFFFFF 16进制RGB色值
  • #33000000 16进制ARGB色值(33表示80%透明度,具体可查看透明度参照表

2.4 单位设置

项目中所有的数值单位为 dp

2.5 样式设置使用文档

3、更多功能

更新日志

由于用户反馈,后面该库会持续更新、完善、增加新的功能,尽量支持日常使用的所有场景,欢迎反馈。

  • 支持XML设置样式
  • 增加Shape的另外两种类型Line和Ring
  • 背景支持图片
  • 样式支持阴影(阴影颜色根据背景颜色)
  • 水波纹效果设置

4、意见反馈

此库目前适用于大部分常用场景,如果遇到问题或者好的建议,请反馈到:issue、[email protected] 或者[email protected]

如果觉得对你有用的话,点一下右上的星星赞一下吧!

License


Copyright 2018 Liang_Lu

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].