Skip to content

Commit f8efc71

Browse files
authored
Merge pull request #157 from AppDevNext/MinorChanges
Minor changes
2 parents 8f347bc + 33b4a7c commit f8efc71

3 files changed

Lines changed: 14 additions & 9 deletions

File tree

LogcatCoreLib/src/main/java/info/hannes/logcat/LogcatFragment.kt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@ class LogcatFragment : LogBaseFragment() {
2626

2727
process.inputStream.bufferedReader().use {
2828
it.readLines().map { line ->
29-
val newLine = line.replace(" W/", " W: ")
30-
.replace(" E/", " E: ")
31-
.replace(" V/", " V: ")
32-
.replace(" I/", " I: ")
33-
.replace(" D/", " D: ")
29+
val newLine = line.replace(" W/", " $WARNING_LINE")
30+
.replace(" E/", " $ERROR_LINE")
31+
.replace(" V/", " $VERBOSE_LINE")
32+
.replace(" I/", " $INFO_LINE")
33+
.replace(" D/", " $DEBUG_LINE")
3434

3535
if (!logList.contains(newLine))
3636
logList.add(newLine)
Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<HorizontalScrollView xmlns:android="http://schemas.android.com/apk/res/android"
3+
xmlns:tools="http://schemas.android.com/tools"
34
android:layout_width="match_parent"
45
android:layout_height="match_parent"
5-
android:layout_margin="8dp"
66
android:layout_weight="1">
77

88
<androidx.recyclerview.widget.RecyclerView
99
android:id="@+id/log_recycler"
10-
android:layout_width="match_parent"
10+
android:layout_width="wrap_content"
1111
android:layout_height="match_parent"
12-
android:scrollbars="vertical" />
12+
android:scrollbars="vertical"
13+
tools:listitem="@layout/item_log" />
1314

1415
</HorizontalScrollView>

LogcatCoreLib/src/main/res/layout/item_log.xml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@
66
android:layout_height="wrap_content"
77
android:fontFamily="monospace"
88
android:lines="1"
9+
android:paddingStart="16dp"
10+
android:paddingLeft="16dp"
11+
android:paddingEnd="16dp"
12+
android:paddingRight="16dp"
913
android:textColor="?android:attr/textColorSecondary"
1014
android:textIsSelectable="true"
11-
tools:text="log content" />
15+
tools:text="@tools:sample/lorem/random" />

0 commit comments

Comments
 (0)