parent
eb7b98b429
commit
da5c5ecd30
@ -0,0 +1,29 @@ |
|||||||
|
package xyz.fycz.myreader.model.third3 |
||||||
|
|
||||||
|
import android.annotation.SuppressLint |
||||||
|
import java.text.SimpleDateFormat |
||||||
|
import java.util.* |
||||||
|
|
||||||
|
/** |
||||||
|
* @author fengyue |
||||||
|
* @date 2022/1/21 10:42 |
||||||
|
*/ |
||||||
|
object Debug { |
||||||
|
var callback: Callback? = null |
||||||
|
@SuppressLint("ConstantLocale") |
||||||
|
private val debugTimeFormat = SimpleDateFormat("[hh:mm:ss.SSS]", Locale.getDefault()) |
||||||
|
|
||||||
|
fun log(msg: String) { |
||||||
|
val time = debugTimeFormat.format(System.currentTimeMillis()) |
||||||
|
callback?.print("$time $msg") |
||||||
|
} |
||||||
|
|
||||||
|
fun log(tag: String, msg: String) { |
||||||
|
val time = debugTimeFormat.format(System.currentTimeMillis()) |
||||||
|
callback?.print("$time $tag:$msg") |
||||||
|
} |
||||||
|
|
||||||
|
interface Callback { |
||||||
|
fun print(msg: String) |
||||||
|
} |
||||||
|
} |
@ -1,70 +1,65 @@ |
|||||||
<?xml version="1.0" encoding="utf-8"?> |
<?xml version="1.0" encoding="utf-8"?> |
||||||
<androidx.core.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android" |
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" |
||||||
xmlns:app="http://schemas.android.com/apk/res-auto" |
xmlns:app="http://schemas.android.com/apk/res-auto" |
||||||
android:layout_width="match_parent" |
android:layout_width="match_parent" |
||||||
android:layout_height="match_parent"> |
android:layout_height="match_parent" |
||||||
|
android:orientation="vertical"> |
||||||
|
|
||||||
|
<include layout="@layout/toolbar" /> |
||||||
|
|
||||||
<LinearLayout |
<TextView |
||||||
|
android:id="@+id/tv_tip" |
||||||
android:layout_width="match_parent" |
android:layout_width="match_parent" |
||||||
android:layout_height="match_parent" |
android:layout_height="wrap_content" |
||||||
android:orientation="vertical"> |
android:background="@color/colorForeground" |
||||||
|
android:padding="10dp" |
||||||
|
android:textColor="@color/textSecondary" |
||||||
|
android:maxLines="6" |
||||||
|
android:textSize="13sp" /> |
||||||
|
|
||||||
<include layout="@layout/toolbar" /> |
<com.google.android.material.tabs.TabLayout |
||||||
|
android:id="@+id/tab_layout" |
||||||
|
android:layout_width="match_parent" |
||||||
|
android:layout_height="36dp" |
||||||
|
android:background="@color/colorForeground" |
||||||
|
android:elevation="3dp" |
||||||
|
app:tabSelectedTextColor="@color/colorAccent"> |
||||||
|
|
||||||
<TextView |
<com.google.android.material.tabs.TabItem |
||||||
android:id="@+id/tv_tip" |
android:layout_width="wrap_content" |
||||||
android:layout_width="match_parent" |
|
||||||
android:layout_height="wrap_content" |
android:layout_height="wrap_content" |
||||||
android:background="@color/colorForeground" |
android:text="@string/parse_result" /> |
||||||
android:padding="10dp" |
|
||||||
android:textColor="@color/textSecondary" |
|
||||||
android:textSize="13sp" /> |
|
||||||
|
|
||||||
<com.google.android.material.tabs.TabLayout |
<com.google.android.material.tabs.TabItem |
||||||
android:id="@+id/tab_layout" |
android:layout_width="wrap_content" |
||||||
android:layout_width="match_parent" |
android:layout_height="wrap_content" |
||||||
android:layout_height="36dp" |
android:text="@string/source_code" /> |
||||||
android:background="@color/colorForeground" |
|
||||||
android:elevation="3dp" |
|
||||||
app:tabSelectedTextColor="@color/colorAccent"> |
|
||||||
|
|
||||||
<com.google.android.material.tabs.TabItem |
|
||||||
android:layout_width="wrap_content" |
|
||||||
android:layout_height="wrap_content" |
|
||||||
android:text="@string/parse_result" /> |
|
||||||
|
|
||||||
<com.google.android.material.tabs.TabItem |
</com.google.android.material.tabs.TabLayout> |
||||||
android:layout_width="wrap_content" |
|
||||||
android:layout_height="wrap_content" |
|
||||||
android:text="@string/source_code" /> |
|
||||||
|
|
||||||
</com.google.android.material.tabs.TabLayout> |
<RelativeLayout |
||||||
|
android:layout_width="match_parent" |
||||||
|
android:layout_height="match_parent" |
||||||
|
android:background="#474949"> |
||||||
|
|
||||||
<RelativeLayout |
<xyz.fycz.myreader.widget.codeview.CodeView |
||||||
|
android:id="@+id/rv_parse_result" |
||||||
android:layout_width="match_parent" |
android:layout_width="match_parent" |
||||||
android:layout_height="match_parent" |
android:layout_height="match_parent" |
||||||
android:background="#474949"> |
android:scrollbars="vertical" |
||||||
|
android:visibility="visible" |
||||||
<xyz.fycz.myreader.widget.codeview.CodeView |
app:cv_font_size="10" |
||||||
android:id="@+id/rv_parse_result" |
app:cv_zoom_enable="true" /> |
||||||
android:layout_width="match_parent" |
|
||||||
android:layout_height="match_parent" |
|
||||||
android:scrollbars="vertical" |
|
||||||
android:visibility="visible" |
|
||||||
app:cv_font_size="10" |
|
||||||
app:cv_zoom_enable="true" /> |
|
||||||
|
|
||||||
<xyz.fycz.myreader.widget.codeview.CodeView |
<xyz.fycz.myreader.widget.codeview.CodeView |
||||||
android:id="@+id/rv_source_code" |
android:id="@+id/rv_source_code" |
||||||
android:layout_width="match_parent" |
android:layout_width="match_parent" |
||||||
android:layout_height="match_parent" |
android:layout_height="match_parent" |
||||||
android:scrollbars="vertical" |
android:scrollbars="vertical" |
||||||
android:visibility="gone" |
android:visibility="gone" |
||||||
app:cv_font_size="10" |
app:cv_font_size="10" |
||||||
app:cv_zoom_enable="true" /> |
app:cv_zoom_enable="true" /> |
||||||
</RelativeLayout> |
</RelativeLayout> |
||||||
|
|
||||||
|
|
||||||
</LinearLayout> |
</LinearLayout> |
||||||
</androidx.core.widget.NestedScrollView> |
|
Loading…
Reference in new issue