Skip to content

Commit fe70f83

Browse files
author
Olga Konoreva
committed
Update ReadMe, increase library version to 1.0.1
1 parent de14e56 commit fe70f83

1 file changed

Lines changed: 60 additions & 9 deletions

File tree

README.md

Lines changed: 60 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,68 @@
1-
# Pixel Perfect
1+
# PixelPerfect
22

3-
The tool can be used by developers as well as designers to achieve the highest visual quality of an app and to add more transparency to both sides.
4-
You can control position of the application/pixelperfect switcher, model image opacity and image's movement diraction.
3+
PixelPerfect is aimed to help you to create pixel perfect UI for Android apps. It lets developers and designers easily compare implementation with reference design and fix visual difference between them.
54

6-
![Pixel Perfect Sample](https://s3.amazonaws.com/f.cl.ly/items/0o2g0Q2Z2N2i2y120q1N/pixel_perfect_sample.gif "Pixel Perfect Sample")
5+
![Pixel Perfect Sample](https://s3.amazonaws.com/f.cl.ly/items/1L3b1C3h1s2k2t350C2D/ezgif.com-resize.gif?v=391643b5 "Pixel Perfect Sample")
76

7+
#### Supported features:
8+
- Picking overlay image.
9+
- Adjustment transparency.
10+
- Moving overlay.
11+
- Measuring offset.
12+
- Inverse mode.
813

9-
## Getting started
14+
## Download
1015

11-
To add the library to your project update `build.gradle`:
16+
Grab via Gradle:
1217

1318
```gradle
14-
dependencies {
15-
compile 'is.handsome.pixelperfect:pixelperfect:0.1'
16-
}
19+
compile 'is.handsome.pixelperfect:pixelperfect:1.0.1'
20+
```
21+
22+
or Maven:
23+
24+
```maven
25+
<dependency>
26+
<groupId>is.handsome.pixelperfect</groupId>
27+
<artifactId>pixelperfect</artifactId>
28+
<version>1.0.1</version>
29+
<type>pom</type>
30+
</dependency>
1731
```
32+
33+
## Getting started
34+
35+
#### Show PixelPerfect
36+
```java
37+
PixelPerfect.show(HomeActivity.this);
38+
```
39+
40+
In default configuration PixelPerfect will be linked with 'pixelperfect' assets folder.
41+
42+
![Assets](https://s3.amazonaws.com/f.cl.ly/items/3m231E1W312M0U0X2t3U/assets.png?v=630e4d1b "Assets")
43+
44+
If you want to use different folder, please read `Configuration` section.
45+
46+
#### Hide PixelPerfect
47+
```java
48+
PixelPerfect.hide();
49+
```
50+
51+
## Configuration
52+
53+
`PixelPerfect.Config` provides possibility to configure major attributes of PixelPerfect. This snippet demonstrates usage of custom `overlayImagesAssetsPath` (assets folder for overlay images) and `overlayActiveImageName` (name of active by default overlay image):
54+
55+
```java
56+
PixelPerfect.Config config = new PixelPerfect.Config.Builder()
57+
.overlayImagesAssetsPath("my_overlays")
58+
.overlayActiveImageName("main.png")
59+
.build();
60+
PixelPerfect.show(HomeActivity.this, config);
61+
```
62+
63+
## Permissions and Android Marshmallow+
64+
65+
PixelPerfect requires SYSTEM_ALERT_WINDOW permission to run properly. So, for Marshmallow and later versions you have to handle permissions with `PixelPerfect.hasPermission(context)` and `PixelPerfect.askForPermission(context)` methods.
66+
67+
You can find demonstartion of its usage in Sample app.
68+

0 commit comments

Comments
 (0)