提交 4108bd70 编写于 作者: B Blankj

see 11/20 log

上级 8bc7bce6
......@@ -42,7 +42,7 @@ public class HandlerActivity extends Activity
public void onClick(View view) {
switch (view.getId()) {
case R.id.btn_send_msg_after_3s:
handlerHolder.sendEmptyMessageDelayed(0, 30000);
handlerHolder.sendEmptyMessageDelayed(0, 3000);
break;
}
}
......
package com.blankj.androidutilcode.activities;
import android.app.Activity;
import android.content.Context;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;
import com.blankj.androidutilcode.App;
import com.blankj.androidutilcode.R;
import com.blankj.utilcode.utils.NetworkUtils;
......@@ -19,7 +21,8 @@ import com.blankj.utilcode.utils.NetworkUtils;
public class NetworkActivity extends Activity
implements View.OnClickListener {
TextView tvAboutNetwork;
private TextView tvAboutNetwork;
private Context mContext;
@Override
protected void onCreate(Bundle savedInstanceState) {
......@@ -27,6 +30,7 @@ public class NetworkActivity extends Activity
setContentView(R.layout.activity_network);
tvAboutNetwork = (TextView) findViewById(R.id.tv_about_network);
mContext = App.getInstance();
findViewById(R.id.btn_open_wireless_settings).setOnClickListener(this);
findViewById(R.id.btn_set_wifi_enabled).setOnClickListener(this);
......@@ -51,15 +55,15 @@ public class NetworkActivity extends Activity
}
private void setAboutNetwork() {
tvAboutNetwork.setText("isConnected: " + NetworkUtils.isConnected(this) +
"\nisAvailableByPing: " + NetworkUtils.isAvailableByPing(this) +
"\ngetDataEnabled: " + NetworkUtils.getDataEnabled(this) +
"\nis4G: " + NetworkUtils.is4G(this) +
"\ngetWifiEnabled: " + NetworkUtils.getWifiEnabled(this) +
"\nisWifiConnected: " + NetworkUtils.isWifiConnected(this) +
"\nisWifiAvailable: " + NetworkUtils.isWifiAvailable(this) +
"\ngetNetworkOperatorName: " + NetworkUtils.getNetworkOperatorName(this) +
"\ngetNetworkTypeName: " + NetworkUtils.getNetworkTypeName(this) +
tvAboutNetwork.setText("isConnected: " + NetworkUtils.isConnected(mContext) +
"\nisAvailableByPing: " + NetworkUtils.isAvailableByPing(mContext) +
"\ngetDataEnabled: " + NetworkUtils.getDataEnabled(mContext) +
"\nis4G: " + NetworkUtils.is4G(mContext) +
"\ngetWifiEnabled: " + NetworkUtils.getWifiEnabled(mContext) +
"\nisWifiConnected: " + NetworkUtils.isWifiConnected(mContext) +
"\nisWifiAvailable: " + NetworkUtils.isWifiAvailable(mContext) +
"\ngetNetworkOperatorName: " + NetworkUtils.getNetworkOperatorName(mContext) +
"\ngetNetworkTypeName: " + NetworkUtils.getNetworkTypeName(mContext) +
"\ngetIPAddress: " + NetworkUtils.getIPAddress(true) +
"\ngetDomainAddress: " + NetworkUtils.getDomainAddress("baidu.com")
);
......
###
#### 16/11/19 SizeUtils
#### 16/11/20 完善LocationUtils
#### 16/11/19 完善SizeUtils
#### 16/11/18 完善LocationUtils
#### 16/11/17 完善LocationUtils
#### 16/11/16 拼音工具类单独拎出来做了整理
......
......@@ -23,7 +23,8 @@ import java.util.Locale;
* desc : 崩溃相关工具类
* </pre>
*/
public class CrashUtils implements Thread.UncaughtExceptionHandler {
public class CrashUtils
implements Thread.UncaughtExceptionHandler {
private volatile static CrashUtils mInstance;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册