LogcatView
Log capture
When there is no data line, use this to output log
- Simple to use, one line of code
- Click on the link to open it in your browser
- Grab most of what Logcat prints in Android Studio
- Searchable content
- Filter by tag
- Filter by log level (provides hiding methods)
- A All contents
- O System. Out Specifies the output
- W Warning level content
- E Error level content
integration
Step 1. Add the JitPack repository to your build file
Add it in your root build.gradle at the end of repositories:
allprojects {
repositories {
...
maven { url 'https://www.jitpack.io'}}}Copy the code
Step 2. Add the dependency
dependencies {
compile 'com. Making. Huangdali: LogcatView: v1.1.2'
}
Copy the code
use
new LogcatDialog(this).show();
Copy the code
On style
Please skip this step if your activity inherits to AppCompatActivity. If your activity does not inherit to AppCompatActivity, then the style can be ugly and can be set as follows:
1. Define in style.xml
<style name="Translucent_NoTitle" parent="android:style/Theme.Dialog">
<item name="android:background"> #00000000</item> <! -- Set background transparency for custom layout --> <item name="android:windowBackground">@android:color/transparent</item> <! </style>Copy the code
2. Set the theme
LogcatDialog logcatDialog = new LogcatDialog(mContext,R.style.Translucent_NoTitle);
logcatDialog.show();
Copy the code