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

134 lines
6.3 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.ProxyDesign" />
</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}">
<TextView
android:id="@+id/empty_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:text="@string/proxy_empty_tips"
android:textAppearance="@style/TextAppearance.MaterialComponents.Headline6"
android:visibility="gone" />
<androidx.viewpager2.widget.ViewPager2
android:id="@+id/pages_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
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/url_test_layout" />
<FrameLayout
android:id="@+id/url_test_layout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginStart="@dimen/item_tailing_margin"
android:layout_toStartOf="@id/menu_view">
<ImageView
android:id="@+id/url_test_view"
android:layout_width="@dimen/item_tailing_component_size"
android:layout_height="@dimen/item_tailing_component_size"
android:layout_gravity="center"
android:background="?attr/selectableItemBackgroundBorderless"
android:clickable="true"
android:contentDescription="@string/delay_test"
android:focusable="true"
android:onClick="@{() -> self.requestUrlTesting()}"
android:padding="@dimen/toolbar_image_action_padding"
android:src="@drawable/ic_baseline_flash_on" />
<ProgressBar
android:id="@+id/url_test_progress_view"
android:layout_width="@dimen/item_tailing_component_size"
android:layout_height="@dimen/item_tailing_component_size"
android:visibility="gone" />
</FrameLayout>
<ImageView
android:id="@+id/menu_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_marginStart="@dimen/item_tailing_margin"
android:background="?attr/selectableItemBackgroundBorderless"
android:clickable="true"
android:contentDescription="@string/more"
android:focusable="true"
android:padding="@dimen/toolbar_image_action_padding"
android:src="@drawable/ic_baseline_more_vert" />
</RelativeLayout>
</com.github.kr328.clash.design.view.ActivityBarLayout>
<com.google.android.material.tabs.TabLayout
android:id="@+id/tab_layout_view"
android:layout_width="match_parent"
android:layout_height="@dimen/tab_layout_height"
android:alpha="0.96"
android:background="?android:windowBackground"
app:tabBackground="@android:color/transparent"
app:tabMode="scrollable" />
<View
android:id="@+id/elevation_view"
android:layout_width="match_parent"
android:layout_height="@dimen/divider_size"
android:alpha="0.96"
android:background="?android:windowBackground"
android:elevation="@dimen/tab_layout_elevation" />
</LinearLayout>
<FrameLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end|bottom"
android:paddingBottom="@{self.surface.insets.bottom}">
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/url_test_float_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="@dimen/item_tailing_margin"
android:contentDescription="@string/delay_test"
android:onClick="@{() -> self.requestUrlTesting()}"
android:src="@drawable/ic_baseline_flash_on" />
</FrameLayout>
</androidx.coordinatorlayout.widget.CoordinatorLayout>
</layout>