Skip to content

Commit

Permalink
see 11/17 log
Browse files Browse the repository at this point in the history
  • Loading branch information
Blankj committed Nov 16, 2016
1 parent f763655 commit d732e54
Show file tree
Hide file tree
Showing 14 changed files with 181 additions and 39 deletions.
5 changes: 5 additions & 0 deletions README-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,11 @@ showSoftInput : 动态显示软键盘
toggleSoftInput : 切换键盘显示与否状态
```

> - **定位相关→[LocationUtils.java][location.java]**
```
```

> - **日志相关→[LogUtils.java][log.java][Test][log.test]**
```
init : 初始化函数
Expand Down
3 changes: 2 additions & 1 deletion app/src/main/java/com/blankj/androidutilcode/App.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* author: Blankj
* blog : http://blankj.com
* time : 2016/10/12
* desc :
* desc : App
* </pre>
*/
public class App extends Application {
Expand All @@ -29,6 +29,7 @@ public static App getInstance() {
@Override
public void onCreate() {
super.onCreate();
// 内存泄露检查工具
if (LeakCanary.isInAnalyzerProcess(this)) {
// This process is dedicated to LeakCanary for heap analysis.
// You should not init your app in this process.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* author: Blankj
* blog : http://blankj.com
* time : 2016/9/27
* desc : Device工具类测试
* desc : Handler工具类测试
* </pre>
*/
public class HandlerActivity extends Activity
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* author: Blankj
* blog : http://blankj.com
* time : 2016/9/26
* desc : 图片工具类测试
* desc : Image工具类测试
* </pre>
*/
public class ImageActivity extends Activity {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@

import android.app.Activity;
import android.content.Context;
import android.inputmethodservice.Keyboard;
import android.os.Bundle;
import android.os.IBinder;
import android.view.MotionEvent;
import android.view.View;
import android.view.inputmethod.InputMethodManager;
Expand All @@ -13,8 +11,15 @@

import com.blankj.androidutilcode.R;
import com.blankj.utilcode.utils.KeyboardUtils;
import com.blankj.utilcode.utils.NetworkUtils;

/**
* <pre>
* author: Blankj
* blog : http://blankj.com
* time : 2016/9/27
* desc : Keyboard工具类测试
* </pre>
*/
public class KeyboardActivity extends Activity
implements View.OnClickListener {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package com.blankj.androidutilcode.activities;

import android.app.Activity;
import android.content.Context;
import android.location.Location;
import android.os.Bundle;
import android.widget.TextView;

Expand All @@ -15,18 +17,38 @@
* desc : Location工具类测试
* </pre>
*/

public class LocationActivity extends Activity {

Context mContext;
TextView tvAboutLocation;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_activity);

TextView tvAboutLocation = (TextView) findViewById(R.id.tv_about_location);
tvAboutLocation = (TextView) findViewById(R.id.tv_about_location);
mContext = this;

LocationUtils.getInstance(mContext).init(1000, 0, new LocationUtils.OnLocationChangeListener() {
@Override
public void onLocationChanged(Location location) {
//得到纬度
double latitude = location.getLatitude();
//得到经度
double longitude = location.getLongitude();
tvAboutLocation.setText("getCountryName:" + LocationUtils.getInstance(mContext).getCountryName(latitude, longitude) +
"\ngetLocality:" + LocationUtils.getInstance(mContext).getLocality(latitude, longitude) +
"\ngetStreet:" + LocationUtils.getInstance(mContext).getStreet(latitude, longitude)
);
}

@Override
public void onStatusChanged(String provider, int status, Bundle extras) {

}
});

LocationUtils.getInstance(this).init(new);

tvAboutLocation.setText("");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* author: Blankj
* blog : http://blankj.com
* time : 2016/9/29
* desc : 吐司工具类测试
* desc : MainActivity
* </pre>
*/
public class MainActivity extends Activity {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,14 @@
import com.blankj.androidutilcode.R;
import com.blankj.utilcode.utils.NetworkUtils;

/**
* <pre>
* author: Blankj
* blog : http://blankj.com
* time : 2016/10/13
* desc : Network工具类测试
* </pre>
*/
public class NetworkActivity extends Activity
implements View.OnClickListener {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,14 @@
import com.blankj.androidutilcode.R;
import com.blankj.utilcode.utils.PhoneUtils;

/**
* <pre>
* author: Blankj
* blog : http://blankj.com
* time : 2016/10/13
* desc : Phone工具类测试
* </pre>
*/
public class PhoneActivity extends Activity implements
View.OnClickListener {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,17 @@
import com.blankj.utilcode.utils.ProcessUtils;
import com.blankj.utilcode.utils.ToastUtils;

/**
* <pre>
* author: Blankj
* blog : http://blankj.com
* time : 2016/10/13
* desc : Process工具类测试
* </pre>
*/
public class ProcessActivity extends Activity
implements View.OnClickListener {


@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* author: Blankj
* blog : http://blankj.com
* time : 2016/9/27
* desc : SD卡工具类测试
* desc : SDCard工具类测试
* </pre>
*/
public class SDCardActivity extends Activity {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* author: Blankj
* blog : http://blankj.com
* time : 2016/9/29
* desc : 吐司测试
* desc : Toast工具类测试
* </pre>
*/
public class ToastActivity extends Activity
Expand Down
2 changes: 1 addition & 1 deletion update_log.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,4 +84,4 @@
#### 16/08/03 修复在onCreate中获取view尺寸的bug,MD5和SHA的Bug修复完成(在此感谢ssyijiu)
#### 16/08/02 wifi设置界面bug修复,注释排版还在修改,获取mac地址增加判空,新增QQ群:74721490,欢迎加入,新增隐藏状态栏,注释更加全面,工具类已封装,写的时候真的是一个一个测试过去的,宝宝心里苦
#### 16/08/01 新增获取SD卡路径,手机和设备进行分类,代码bug修改部分,小修排版,正在封装类,新增目录中显示方法名,新增获取当前App版本Code
#### 16/07/31 新增点击屏幕空白区域隐藏软键盘,未能成功增加本页目录跳转功能(不支持)
#### 16/07/31 新增点击屏幕空白区域隐藏软键盘,未能成功增加本页目录跳转功能(不支持)
Loading

0 comments on commit d732e54

Please sign in to comment.