-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
2.暂时去掉侧滑功能 3.添加全局捕捉异常库 4.修复Bugly上的bug
- Loading branch information
hegj
committed
Sep 11, 2019
1 parent
1c321ed
commit 00cee9a
Showing
27 changed files
with
513 additions
and
542 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
[{"outputType":{"type":"APK"},"apkData":{"type":"MAIN","splits":[],"versionCode":3,"versionName":"1.0.3","enabled":true,"outputFile":"app-release.apk","fullName":"release","baseName":"release"},"path":"app-release.apk","properties":{}}] | ||
[{"outputType":{"type":"APK"},"apkData":{"type":"MAIN","splits":[],"versionCode":4,"versionName":"1.0.3","enabled":true,"outputFile":"app-release.apk","fullName":"release","baseName":"release"},"path":"app-release.apk","properties":{}}] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 48 additions & 0 deletions
48
app/src/main/java/me/hegj/wandroid/mvp/ui/activity/error/ErrorActivity.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
package me.hegj.wandroid.mvp.ui.activity.error | ||
|
||
import android.content.ClipData | ||
import android.content.ClipboardManager | ||
import android.content.Context | ||
import android.os.Bundle | ||
import cat.ereza.customactivityoncrash.CustomActivityOnCrash | ||
import com.jess.arms.di.component.AppComponent | ||
import com.jess.arms.mvp.IPresenter | ||
import kotlinx.android.synthetic.main.activity_error.* | ||
import kotlinx.android.synthetic.main.include_toolbar.* | ||
import me.hegj.wandroid.R | ||
import me.hegj.wandroid.app.utils.ShowUtils | ||
import me.hegj.wandroid.mvp.ui.BaseActivity | ||
|
||
|
||
class ErrorActivity : BaseActivity<IPresenter>() { | ||
override fun setupActivityComponent(appComponent: AppComponent) { | ||
} | ||
|
||
override fun initView(savedInstanceState: Bundle?): Int { | ||
return R.layout.activity_error | ||
} | ||
|
||
override fun initData(savedInstanceState: Bundle?) { | ||
toolbar.run { | ||
setSupportActionBar(this) | ||
title = "发生错误" | ||
} | ||
|
||
val config = CustomActivityOnCrash.getConfigFromIntent(intent) | ||
error_restart.setOnClickListener { | ||
config?.run { | ||
CustomActivityOnCrash.restartApplication(this@ErrorActivity, this) | ||
} | ||
} | ||
error_sendError.setOnClickListener { | ||
//获取剪贴板管理器: | ||
val cm = getSystemService(Context.CLIPBOARD_SERVICE) as ClipboardManager | ||
// 创建普通字符型ClipData | ||
val mClipData = ClipData.newPlainText("Label", CustomActivityOnCrash.getStackTraceFromIntent(intent)) | ||
// 将ClipData内容放到系统剪贴板里。 | ||
cm.primaryClip = mClipData | ||
ShowUtils.showToast(this, "已复制错误日志到粘贴板") | ||
ShowUtils.showDialog(this, "扣 扣:824868922\n\n微 信:hgj840\n\n邮 箱:[email protected]", "联系我") | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.