This commit is contained in:
Koitharu
2023-07-01 16:03:48 +03:00
parent 98b8aa3f2d
commit 39cd199044
5 changed files with 238 additions and 6 deletions

View File

@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<org.koitharu.kotatsu.core.ui.widgets.TipView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:cardBackgroundColor="@color/background_mamimi"
app:shapeAppearance="?shapeAppearanceCornerExtraLarge"
tools:icon="@drawable/ic_notification"
tools:primaryButtonText="@string/settings"
tools:secondaryButtonText="@string/close"
tools:text="Включите их, чтобы ничего не пропускать. Откройте настройки системы и разрешите их отправку."
tools:title="Уведомления отключены" />

View File

@@ -0,0 +1,64 @@
<?xml version="1.0" encoding="utf-8"?>
<merge
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:padding="@dimen/margin_normal"
tools:background="@drawable/bg_appwidget_card"
tools:backgroundTint="?colorBackgroundFloating"
tools:layout_height="wrap_content"
tools:layout_margin="16dp"
tools:layout_width="match_parent"
tools:orientation="vertical"
tools:parentTag="android.widget.LinearLayout">
<TextView
android:id="@+id/textView_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:drawablePadding="10dp"
android:gravity="center_vertical"
android:textAppearance="?textAppearanceTitleMedium"
tools:drawableStartCompat="@drawable/ic_app_update"
tools:text="Уведомления отключены" />
<TextView
android:id="@+id/textView_body"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:textAppearance="?textAppearanceBodyMedium"
tools:text="Включите их, чтобы ничего не пропускать. Откройте настройки системы и разрешите их отправку." />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:layout_weight="2"
android:orientation="horizontal">
<com.google.android.material.button.MaterialButton
android:id="@+id/button_primary"
style="@style/Widget.Material3.Button.UnelevatedButton"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginEnd="4dp"
android:layout_weight="1"
android:paddingHorizontal="8dp"
android:singleLine="true"
tools:text="Открыть настройки" />
<Button
android:id="@+id/button_secondary"
style="@style/Widget.Material3.Button.TonalButton"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="4dp"
android:layout_weight="1"
android:paddingHorizontal="8dp"
android:singleLine="true"
tools:text="Отмена" />
</LinearLayout>
</merge>

View File

@@ -7,12 +7,7 @@
<attr name="themeChooserPreferenceStyle" />
<attr name="listItemTextViewStyle" />
<attr name="fastScrollerStyle" />
<declare-styleable name="Theme">
<attr name="navigationBarDividerColor" format="color" />
<attr name="colorControlLight" format="color" />
<attr name="colorSurfaceSecondary" format="color" />
</declare-styleable>
<attr name="tipViewStyle" />
<!--CoverImageView attrs-->
<declare-styleable name="CoverImageView">
@@ -112,4 +107,18 @@
<attr name="android:entries" />
</declare-styleable>
<declare-styleable name="TipView">
<attr name="icon" />
<attr name="title" />
<attr name="android:text" />
<attr name="primaryButtonText" format="string" />
<attr name="secondaryButtonText" format="string" />
<attr name="shapeAppearance" />
<attr name="shapeAppearanceOverlay" />
<attr name="cardBackgroundColor" />
<attr name="strokeWidth"/>
<attr name="strokeColor" />
<attr name="elevation" />
</declare-styleable>
</resources>