Skip to content
This repository was archived by the owner on Dec 22, 2021. It is now read-only.

Commit a38e8eb

Browse files
committed
1.合并PopupWindow类到工程
2.合并Logger日志打印到工程 3.PopupWindow例子合并到app中 4.完善readme 5.补充jCenter的必要信息 6.资源变更和配置修改
1 parent 4077a55 commit a38e8eb

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+2137
-61
lines changed

README.md

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
[![GitHub release](https://img.shields.io/github/release/Ayvytr/EasyAndroid.svg)](https://github.com/Ayvytr/EasyAndroid/releases)
22
[![](https://jitpack.io/v/Ayvytr/EasyAndroid.svg)](https://jitpack.io/#Ayvytr/EasyAndroid)
3+
[![jCenter](https://img.shields.io/badge/jCenter-1.7.2-green.svg)](https://bintray.com/ayvytr/maven/EasyAndroid/_latestVersion)
4+
[![License](https://img.shields.io/badge/License-Apache--2.0%20-blue.svg)](./LICENSE)
35

46
<a href="http://www.methodscount.com/?lib=com.github.Ayvytr%3AEasyAndroid%3A1.7.0"><img src="https://img.shields.io/badge/Methods count-core: 732 | deps: 19163-e91e63.svg"/></a>
57
<a href="http://www.methodscount.com/?lib=com.github.Ayvytr%3AEasyAndroid%3A1.7.0"><img src="https://img.shields.io/badge/Size-75 KB-e91e63.svg"/></a>
@@ -9,19 +11,23 @@
911
# EasyAndroid Library
1012
Simplify development steps for Android Developers.(为Android开发者提供的简化开发过程的库)
1113

12-
> ## [Chinese](README_CN.md)
13-
14+
> ## [Chinese](README_CN.md)
1415
15-
> ## [Download Docs](https://github.com/Ayvytr/EasyAndroid/releases/download/aar/EasyAndroidDocs-1.7.7z)
16-
17-
> ## [Download Aar](https://github.com/Ayvytr/EasyAndroid/releases/download/aar/EasyAndroid-1.7.0.aar)
16+
> ## [Download Docs](https://github.com/Ayvytr/EasyAndroid/releases/download/doc/EasyAndroidDocs-1.7.2.7z)
1817
1918
> ## Use
2019
(About Context classes: You need call 'Easy.getDefault().init(this);'
2120
on your 'Application.onCreate()' first)
2221
Then, use directly;
22+
23+
> ### [I want print logger](README_Logger.md)
24+
25+
# Build
2326

24-
## Build
27+
## JCenter
28+
compile 'com.ayvytr:EasyAndroid:1.7.2'
29+
30+
## JitPack
2531

2632
### 1. Add the JitPack repository to your build file
2733

@@ -37,7 +43,7 @@ Simplify development steps for Android Developers.(为Android开发者提供的
3743
#### 2. Add the dependency
3844

3945
dependencies {
40-
compile 'com.github.Ayvytr:AndroidEasyDeveloper:1.7.0'
46+
compile 'com.github.Ayvytr:AndroidEasyDeveloper:1.7.2'
4147
}
4248

4349

@@ -56,6 +62,12 @@ Simplify development steps for Android Developers.(为Android开发者提供的
5662

5763
SeekBarPressure: double Thumb SeekBar
5864

65+
### PopupWindows [See Readme->](README_PopupWindow.md)
66+
AlphaPopupWindow
67+
BasePopupWindow
68+
ToggleSoftInputPopupWindow
69+
TopPopupWindow
70+
5971
### Tool classes with out Context
6072
Convert Type conversion class, modeled on the C# Convert class (for this
6173
kind of love have alone bell)

README_CN.md

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
[![GitHub release](https://img.shields.io/github/release/Ayvytr/EasyAndroid.svg)](https://github.com/Ayvytr/EasyAndroid/releases)
22
[![](https://jitpack.io/v/Ayvytr/EasyAndroid.svg)](https://jitpack.io/#Ayvytr/EasyAndroid)
3+
[![jCenter](https://img.shields.io/badge/jCenter-1.7.2-green.svg)](https://bintray.com/ayvytr/maven/EasyAndroid/_latestVersion)
4+
[![License](https://img.shields.io/badge/License-Apache--2.0%20-blue.svg)](./LICENSE)
35

46
<a href="http://www.methodscount.com/?lib=com.github.Ayvytr%3AEasyAndroid%3A1.7.0"><img src="https://img.shields.io/badge/Methods count-core: 732 | deps: 19163-e91e63.svg"/></a>
57
<a href="http://www.methodscount.com/?lib=com.github.Ayvytr%3AEasyAndroid%3A1.7.0"><img src="https://img.shields.io/badge/Size-75 KB-e91e63.svg"/></a>
@@ -10,16 +12,20 @@
1012

1113
> ## [English](README.md)
1214
13-
14-
> ## [下载文档](https://github.com/Ayvytr/EasyAndroid/releases/download/aar/EasyAndroidDocs-1.7.7z)
15-
16-
> ## [下载 Aar](https://github.com/Ayvytr/EasyAndroid/releases/download/aar/EasyAndroid-1.7.0.aar)
15+
> ## [下载文档](https://github.com/Ayvytr/EasyAndroid/releases/download/doc/EasyAndroidDocs-1.7.2.7z)
1716
1817
> ## 使用
1918
(有关Context类: 先在 'Application.onCreate()' 中调用 'Easy.getDefault().init(this);')
2019
直接使用
20+
21+
> ### [我要打印日志](README_Logger.md)
22+
23+
# 编译
2124

22-
## 编译
25+
## JCenter
26+
compile 'com.ayvytr:EasyAndroid:1.7.2'
27+
28+
## JitPack
2329

2430
### Step 1. 添加JitPack依赖
2531

@@ -35,7 +41,7 @@
3541
#### Step 2. 添加你的仓库
3642

3743
dependencies {
38-
compile 'com.github.Ayvytr:AndroidEasyDeveloper:1.7.0'
44+
compile 'com.github.Ayvytr:AndroidEasyDeveloper:1.7.1'
3945
}
4046

4147

@@ -54,6 +60,12 @@
5460

5561
SeekBarPressure: 双Thumb的SeekBar
5662

63+
### PopupWindows [浏览 Readme->](README_PopupWindow.md)
64+
AlphaPopupWindow
65+
BasePopupWindow
66+
ToggleSoftInputPopupWindow
67+
TopPopupWindow
68+
5769
### Tool classes with out Context
5870
Convert 类型转换类,仿照了C#的Convert类(对这个类情(zhen)有(de)独(hao)钟(yong))
5971
提供了大部分基本类型到bool,int,byte的转换,以及isZero方法
@@ -332,7 +344,7 @@
332344
DensityToolTest
333345

334346

335-
> ### 引用如下,感谢他们的库
347+
> ### 借鉴如下,感谢他们的库
336348
1. https://github.com/Blankj/AndroidUtilCode
337349
2. https://github.com/Trinea/android-common
338350
3. https://github.com/wyouflf/xUtils3

README_Logger.md

Lines changed: 189 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,189 @@
1+
[![](https://jitpack.io/v/Ayvytr/logger.svg)](https://jitpack.io/#Ayvytr/logger)
2+
3+
<img align="right" src='https://github.com/ayvytr/logger/blob/master/images/logger-logo.png' width='128' height='128'/>
4+
5+
## [点击返回](https://github.com/Ayvytr/EasyAndroid)
6+
7+
#Logger
8+
###Simple, pretty and powerful logger for android
9+
10+
##Logger provides :
11+
- Thread information
12+
- Class information
13+
- Method information
14+
- Pretty-print for json content
15+
- Pretty-print for new line "\n"
16+
- Clean output
17+
- Jump to source
18+
19+
## Gradle Build
20+
21+
###Step 1. Add the JitPack repository to your build file
22+
####Add it in your root build.gradle at the end of repositories:
23+
allprojects {
24+
repositories {
25+
...
26+
maven { url "https://jitpack.io" }
27+
}
28+
}
29+
###Step 2. Add the dependency
30+
dependencies {
31+
compile 'com.github.Ayvytr:logger:1.18'
32+
}
33+
34+
### Current Log system
35+
```java
36+
Log.d(TAG,"hello");
37+
```
38+
39+
<img src='https://github.com/ayvytr/logger/blob/master/images/current-log.png'/>
40+
41+
42+
### Logger
43+
```java
44+
L.d("hello");
45+
L.d("hello", "world", 5);
46+
```
47+
<img src='https://github.com/ayvytr/logger/blob/master/images/description.png'/>
48+
49+
```java
50+
L.d("hello");
51+
L.e("hello");
52+
L.w("hello");
53+
L.v("hello");
54+
L.wtf("hello");
55+
L.json(JSON_CONTENT);
56+
L.xml(XML_CONTENT);
57+
L.log(DEBUG, "tag", "message", throwable);
58+
```
59+
60+
#### Array, Map, Set and List are supported
61+
```java
62+
L.d(list);
63+
L.d(map);
64+
L.d(set);
65+
L.d(new String[]);
66+
```
67+
68+
### Change TAG
69+
All logs
70+
```java
71+
L.init(YOUR_TAG);
72+
```
73+
Log based
74+
```java
75+
L.t("mytag").d("hello");
76+
```
77+
<img src='https://github.com/ayvytr/logger/blob/master/images/custom-tag.png'/>
78+
79+
80+
### Settings (optional)
81+
Change the settings with init. This should be called only once. Best place would be in application class. All of them
82+
are optional. You can just use the default settings if you don't init Logger.
83+
```java
84+
L
85+
.init(YOUR_TAG) // default PRETTYLOGGER or use just init()
86+
.methodCount(3) // default 2
87+
.hideThreadInfo() // default shown
88+
.logLevel(LogLevel.NONE) // default LogLevel.FULL
89+
.methodOffset(2) // default 0
90+
.logAdapter(new AndroidLogAdapter()); //default AndroidLogAdapter
91+
}
92+
93+
```
94+
Note: Use LogLevel.NONE for the release versions.
95+
96+
### Use another log util instead of android.util.log
97+
- Implement LogAdapter
98+
- set it with init
99+
```java
100+
.logAdapter(new CustomLogAdapter())
101+
```
102+
103+
### More log samples
104+
```java
105+
L.d("hello");
106+
L.e(exception, "message");
107+
L.json(JSON_CONTENT);
108+
```
109+
<img src='https://github.com/ayvytr/logger/blob/master/images/logger-log.png'/>
110+
111+
### Method info
112+
Observe the caller methods in the order they are invoked and also thread information.
113+
```java
114+
void methodA(){
115+
methodB();
116+
}
117+
void methodA(){
118+
L.d("hello");
119+
}
120+
```
121+
Both method information will be shown in the order of invocation.
122+
123+
<img src='https://github.com/ayvytr/logger/blob/master/images/two-method-with-thread-desc.png'/>
124+
125+
### Change method count (Default: 2)
126+
All logs
127+
```java
128+
L.init().methodCount(1);
129+
```
130+
Log based
131+
```java
132+
L.t(1).d("hello");
133+
```
134+
135+
<img src='https://github.com/ayvytr/logger/blob/master/images/one-method-with-thread.png'/>
136+
137+
### Change method stack offset (Default: 0)
138+
To integrate logger with other libraries, you can set the offset in order to avoid that library's methods.
139+
```java
140+
L.init().methodOffset(5);
141+
```
142+
143+
### Hide thread information
144+
```java
145+
L.init().methodCount(1).hideThreadInfo();
146+
```
147+
148+
<img src='https://github.com/ayvytr/logger/blob/master/images/one-method-no-header.png'/>
149+
150+
### Only show the message
151+
```java
152+
L.init().methodCount(0).hideThreadInfo();
153+
```
154+
155+
<img src='https://github.com/ayvytr/logger/blob/master/images/just-content.png'/>
156+
157+
### Pretty print json, Logger.json
158+
Format the json content in a pretty way
159+
```java
160+
L.json(YOUR_JSON_DATA);
161+
```
162+
163+
<img src='https://github.com/ayvytr/logger/blob/master/images/json-log.png'/>
164+
165+
### Log exceptions in a simple way
166+
Show the cause of the exception
167+
```java
168+
L.e(exception,"message");
169+
```
170+
171+
### Notes
172+
- Use the filter for a better result
173+
174+
<img src='https://github.com/ayvytr/logger/blob/master/images/filter.png'/>
175+
176+
- Make sure that the wrap option is disabled
177+
178+
<img src='https://github.com/ayvytr/logger/blob/master/images/wrap-closed.png'/>
179+
180+
### Timber Integration
181+
You can also use logger along with Timber.
182+
```java
183+
Timber.plant(new Timber.DebugTree() {
184+
@Override protected void log(int priority, String tag, String message, Throwable t) {
185+
L.log(priority, tag, message, t);
186+
}
187+
});
188+
```
189+

README_PopupWindow.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<img align="right" src='https://github.com/ayvytr/EasyAndroid/blob/master/photos/popupwindow/pic.png' width='90' height='160'/>
2+
3+
<img align="right" src='https://github.com/ayvytr/EasyAndroid/blob/master/photos/popupwindow/pic1.png' width='90' height='160'/>
4+
5+
## [点击返回](https://github.com/Ayvytr/EasyAndroid)
6+
7+
# PopupWindows
8+
自定义封装的Android PopupWindow,简化创建使用PopupWindow的过程
9+
10+
## BasePopupWindow
11+
封装PopupWindow的基类,包含必要的属性
12+
13+
## AlphaPopupWindow
14+
打开PopupWindow时,窗口其他区域变半透明的PopupWindow
15+
16+
## TopPopupWindow
17+
在界面顶部显示的PopupWindow
18+
19+

app/src/main/AndroidManifest.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
<category android:name="android.intent.category.LAUNCHER"/>
1717
</intent-filter>
1818
</activity>
19+
<activity android:name=".PopupWindowActivity"/>
1920
</application>
2021

2122
</manifest>

app/src/main/java/com/ayvytr/easyandroid/MainActivity.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package com.ayvytr.easyandroid;
22

3+
import android.content.Intent;
34
import android.os.Bundle;
45
import android.support.v7.app.AppCompatActivity;
56
import android.view.View;
@@ -42,4 +43,9 @@ public void onGetAppName(View view)
4243
String string = ResTool.getString(R.string.app_name);
4344
ToastTool.show("获取到Res中APP名称:" + string);
4445
}
46+
47+
public void onSeePopupWindow(View view)
48+
{
49+
startActivity(new Intent(this, PopupWindowActivity.class));
50+
}
4551
}

0 commit comments

Comments
 (0)