Files
ClashForAndroid/design/src/main/res/layout/design_logs.xml
2021-05-15 00:51:08 +08:00

89 lines
4.2 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<data>
<variable
name="self"
type="com.github.kr328.clash.design.LogsDesign" />
<import type="com.github.kr328.clash.design.LogsDesign.Request" />
</data>
<androidx.coordinatorlayout.widget.CoordinatorLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingStart="@{self.surface.insets.start}"
android:paddingEnd="@{self.surface.insets.end}">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<com.github.kr328.clash.design.view.ActivityBarLayout
android:id="@+id/activity_bar_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="@{self.surface.insets.top}">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingEnd="@dimen/item_tailing_margin">
<include
layout="@layout/common_activity_bar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentStart="true"
android:layout_centerVertical="true"
android:layout_toStartOf="@id/delete_view" />
<ImageView
android:id="@+id/delete_view"
android:layout_width="@dimen/item_tailing_component_size"
android:layout_height="@dimen/item_tailing_component_size"
android:layout_alignParentEnd="true"
android:layout_centerVertical="true"
android:layout_gravity="end|center_vertical"
android:layout_marginStart="@dimen/item_tailing_margin"
android:background="?attr/selectableItemBackgroundBorderless"
android:clickable="true"
android:contentDescription="@string/delete_all_logs"
android:focusable="true"
android:onClick="@{() -> self.requests.offer(Request.DeleteAll.INSTANCE)}"
android:padding="@dimen/toolbar_image_action_padding"
android:src="@drawable/ic_baseline_clear_all" />
</RelativeLayout>
</com.github.kr328.clash.design.view.ActivityBarLayout>
<com.github.kr328.clash.design.view.ActionLabel
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:onClick="@{() -> self.requests.offer(Request.StartLogcat.INSTANCE)}"
app:icon="@drawable/ic_baseline_adb"
app:subtext="@string/tap_to_start"
app:text="@string/clash_logcat" />
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="?attr/colorControlHighlight" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingVertical="@dimen/item_padding_vertical"
android:paddingStart="@{@dimen/item_header_component_size + @dimen/item_header_margin * 2}"
android:paddingEnd="@dimen/item_tailing_margin"
android:text="@string/history"
android:textColor="?attr/colorControlActivated" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recycler_list"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clipToPadding="false"
android:paddingBottom="@{self.surface.insets.bottom}" />
</LinearLayout>
</androidx.coordinatorlayout.widget.CoordinatorLayout>
</layout>