Skip to content

Latest commit

 

History

History
98 lines (68 loc) · 2.78 KB

README-EN.md

File metadata and controls

98 lines (68 loc) · 2.78 KB

ViewSupport

License

Weibo: @GcsSloop

This is a library for View and CustomView,it has some tools can help you operate view or help you custom view easily.


Tools list

you can click the tools name to see the source.

Utils Summary
CanvasAidUtils Canvas Aid util, you can use it draw a coordinate system to help you check the view position.
DensityUtils A utils of screen density. it can help you convert the different unit.
E.g: dp -> px ps->dp sp->px px->sp
MathUtils A Math utils, It can help you make some common calculations.
E.g: Get the distance between two points; angle2Radian; radian2Angle and others
ViewUtils Utils for view. it can help you measure view, if you want get the view size before it not measured. or you can use it set view margin on code.

Get it

Gradle:

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 {
	        compile 'com.github.GcsSloop:ViewSupport:v1.0.3'
	}

Maven

Step 1. Add the JitPack repository to your build file

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

	<repositories>
		<repository>
		    <id>jitpack.io</id>
		    <url>https://jitpack.io</url>
		</repository>
	</repositories>

Step 2. Add the dependency

	<dependency>
	    <groupId>com.github.GcsSloop</groupId>
	    <artifactId>ViewSupport</artifactId>
	    <version>v1.0.2</version>
	</dependency>

About Me

Weibo: @GcsSloop

License

Copyright (c) 2016 GcsSloop

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.