feat(widget): виджет запуска прокси с dynamic-цветами и потоками
Плитка на домашний экран: статус, активный сервер + потоки, кнопка play/stop через ProxyReceiver. Material You (system_* с фолбэком <31), перерисовка из App-scope collector по isRunning/статистике/серверу.
This commit is contained in:
1 parent
adec486bbb
commit
ea19c091b2
11 files changed
+298
-2
No files matched your search
@@ -0,0 +1,57 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/widget_body"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical"
|
||||
android:background="@drawable/widget_background"
|
||||
android:paddingHorizontal="14dp"
|
||||
android:paddingVertical="10dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/widget_status_icon"
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="36dp"
|
||||
android:src="@drawable/ic_qs_tile_nearby"
|
||||
android:contentDescription="@null" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginStart="12dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/widget_status_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textStyle="bold"
|
||||
android:textSize="15sp"
|
||||
android:textColor="@color/widget_on_surface"
|
||||
android:maxLines="1"
|
||||
android:ellipsize="end"
|
||||
tools:text="Подключение…" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/widget_server_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="13sp"
|
||||
android:textColor="@color/widget_on_surface_variant"
|
||||
android:maxLines="1"
|
||||
android:ellipsize="end"
|
||||
tools:text="Amsterdam #1" />
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/widget_toggle"
|
||||
android:layout_width="44dp"
|
||||
android:layout_height="44dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:padding="8dp"
|
||||
android:src="@drawable/play_arrow_24px"
|
||||
android:contentDescription="@string/widget_action_start" />
|
||||
</LinearLayout>
|
||||
Reference in new issue
Block a user