ui: use M3 styles everywhere

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
This commit is contained in:
Harsh Shandilya 2023-03-27 21:13:24 +05:30
parent b37006ce2f
commit 76423ce868
No known key found for this signature in database
14 changed files with 40 additions and 52 deletions

View File

@ -8,7 +8,7 @@
<com.google.android.material.button.MaterialButton <com.google.android.material.button.MaterialButton
android:id="@+id/create_from_file" android:id="@+id/create_from_file"
style="@style/Widget.MaterialComponents.Button.TextButton.Icon" style="@style/Widget.Material3.Button.TextButton.Icon"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/bottom_sheet_item_height" android:layout_height="@dimen/bottom_sheet_item_height"
android:layout_marginStart="@dimen/normal_margin" android:layout_marginStart="@dimen/normal_margin"
@ -31,7 +31,7 @@
<com.google.android.material.button.MaterialButton <com.google.android.material.button.MaterialButton
android:id="@+id/create_from_qrcode" android:id="@+id/create_from_qrcode"
style="@style/Widget.MaterialComponents.Button.TextButton.Icon" style="@style/Widget.Material3.Button.TextButton.Icon"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/bottom_sheet_item_height" android:layout_height="@dimen/bottom_sheet_item_height"
android:layout_marginStart="@dimen/normal_margin" android:layout_marginStart="@dimen/normal_margin"
@ -55,7 +55,7 @@
<com.google.android.material.button.MaterialButton <com.google.android.material.button.MaterialButton
android:id="@+id/create_empty" android:id="@+id/create_empty"
style="@style/Widget.MaterialComponents.Button.TextButton.Icon" style="@style/Widget.Material3.Button.TextButton.Icon"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/bottom_sheet_item_height" android:layout_height="@dimen/bottom_sheet_item_height"
android:layout_marginStart="@dimen/normal_margin" android:layout_marginStart="@dimen/normal_margin"

View File

@ -25,7 +25,7 @@
<com.google.android.material.tabs.TabLayout <com.google.android.material.tabs.TabLayout
android:id="@+id/tabs" android:id="@+id/tabs"
style="@style/Widget.MaterialComponents.TabLayout.Colored" style="@style/Widget.Material3.TabLayout.OnSurface"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"> android:layout_height="wrap_content">

View File

@ -39,7 +39,6 @@
<TextView <TextView
android:id="@+id/app_name" android:id="@+id/app_name"
style="?android:attr/textAppearanceMedium"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="16dp" android:layout_marginStart="16dp"
@ -48,6 +47,7 @@
android:ellipsize="end" android:ellipsize="end"
android:maxLines="1" android:maxLines="1"
android:text="@{key}" android:text="@{key}"
android:textAppearance="?attr/textAppearanceBodyLarge"
tools:text="@tools:sample/full_names" /> tools:text="@tools:sample/full_names" />
<CheckBox <CheckBox

View File

@ -12,9 +12,9 @@
<com.google.android.material.textview.MaterialTextView <com.google.android.material.textview.MaterialTextView
android:id="@+id/log_date" android:id="@+id/log_date"
style="@style/TextAppearance.MaterialComponents.Caption"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textAppearance="?attr/textAppearanceBodySmall"
android:textColor="?android:attr/textColorPrimary" android:textColor="?android:attr/textColorPrimary"
android:textSize="10sp" android:textSize="10sp"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
@ -23,9 +23,9 @@
<com.google.android.material.textview.MaterialTextView <com.google.android.material.textview.MaterialTextView
android:id="@+id/log_msg" android:id="@+id/log_msg"
style="@style/TextAppearance.MaterialComponents.Caption"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textAppearance="?attr/textAppearanceBodySmall"
android:textColor="?android:attr/textColorPrimary" android:textColor="?android:attr/textColorPrimary"
app:layout_constraintTop_toBottomOf="@id/log_date" app:layout_constraintTop_toBottomOf="@id/log_date"
tools:text="FATAL EXCEPTION: Thread-2" /> tools:text="FATAL EXCEPTION: Thread-2" />

View File

@ -50,10 +50,10 @@
<com.google.android.material.textview.MaterialTextView <com.google.android.material.textview.MaterialTextView
android:id="@+id/interface_title" android:id="@+id/interface_title"
style="@style/SectionText"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/interface_title" android:text="@string/interface_title"
android:textAppearance="?attr/textAppearanceTitleMedium"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />
@ -81,7 +81,6 @@
<TextView <TextView
android:id="@+id/interface_name_text" android:id="@+id/interface_name_text"
style="@style/DetailText"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:contentDescription="@string/name" android:contentDescription="@string/name"
@ -90,6 +89,7 @@
android:nextFocusForward="@id/public_key_text" android:nextFocusForward="@id/public_key_text"
android:onClick="@{ClipboardUtils::copyTextView}" android:onClick="@{ClipboardUtils::copyTextView}"
android:text="@{tunnel.name}" android:text="@{tunnel.name}"
android:textAppearance="?attr/textAppearanceBodyLarge"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/interface_name_label" app:layout_constraintTop_toBottomOf="@+id/interface_name_label"
tools:text="wg0" /> tools:text="wg0" />
@ -106,7 +106,6 @@
<TextView <TextView
android:id="@+id/public_key_text" android:id="@+id/public_key_text"
style="@style/DetailText"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:contentDescription="@string/public_key" android:contentDescription="@string/public_key"
@ -118,6 +117,7 @@
android:onClick="@{ClipboardUtils::copyTextView}" android:onClick="@{ClipboardUtils::copyTextView}"
android:singleLine="true" android:singleLine="true"
android:text="@{config.interface.keyPair.publicKey.toBase64}" android:text="@{config.interface.keyPair.publicKey.toBase64}"
android:textAppearance="?attr/textAppearanceBodyLarge"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/public_key_label" app:layout_constraintTop_toBottomOf="@+id/public_key_label"
tools:text="wOs2eguFEohqIZxlSJ1CAT9584tc6ejj9hfGFsoBVkA=" /> tools:text="wOs2eguFEohqIZxlSJ1CAT9584tc6ejj9hfGFsoBVkA=" />
@ -135,7 +135,6 @@
<TextView <TextView
android:id="@+id/addresses_text" android:id="@+id/addresses_text"
style="@style/DetailText"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:contentDescription="@string/addresses" android:contentDescription="@string/addresses"
@ -144,6 +143,7 @@
android:nextFocusForward="@id/dns_servers_text" android:nextFocusForward="@id/dns_servers_text"
android:onClick="@{ClipboardUtils::copyTextView}" android:onClick="@{ClipboardUtils::copyTextView}"
android:text="@{config.interface.addresses}" android:text="@{config.interface.addresses}"
android:textAppearance="?attr/textAppearanceBodyLarge"
android:visibility="@{config.interface.addresses.isEmpty() ? android.view.View.GONE : android.view.View.VISIBLE}" android:visibility="@{config.interface.addresses.isEmpty() ? android.view.View.GONE : android.view.View.VISIBLE}"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/addresses_label" app:layout_constraintTop_toBottomOf="@+id/addresses_label"
@ -162,7 +162,6 @@
<TextView <TextView
android:id="@+id/dns_servers_text" android:id="@+id/dns_servers_text"
style="@style/DetailText"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:contentDescription="@string/dns_servers" android:contentDescription="@string/dns_servers"
@ -171,6 +170,7 @@
android:nextFocusForward="@id/dns_search_domains_text" android:nextFocusForward="@id/dns_search_domains_text"
android:onClick="@{ClipboardUtils::copyTextView}" android:onClick="@{ClipboardUtils::copyTextView}"
android:text="@{config.interface.dnsServers}" android:text="@{config.interface.dnsServers}"
android:textAppearance="?attr/textAppearanceBodyLarge"
android:visibility="@{config.interface.dnsServers.isEmpty() ? android.view.View.GONE : android.view.View.VISIBLE}" android:visibility="@{config.interface.dnsServers.isEmpty() ? android.view.View.GONE : android.view.View.VISIBLE}"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/dns_servers_label" app:layout_constraintTop_toBottomOf="@+id/dns_servers_label"
@ -189,7 +189,6 @@
<TextView <TextView
android:id="@+id/dns_search_domains_text" android:id="@+id/dns_search_domains_text"
style="@style/DetailText"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:contentDescription="@string/dns_search_domains" android:contentDescription="@string/dns_search_domains"
@ -198,6 +197,7 @@
android:nextFocusForward="@id/listen_port_text" android:nextFocusForward="@id/listen_port_text"
android:onClick="@{ClipboardUtils::copyTextView}" android:onClick="@{ClipboardUtils::copyTextView}"
android:text="@{config.interface.dnsSearchDomains}" android:text="@{config.interface.dnsSearchDomains}"
android:textAppearance="?attr/textAppearanceBodyLarge"
android:visibility="@{config.interface.dnsSearchDomains.isEmpty() ? android.view.View.GONE : android.view.View.VISIBLE}" android:visibility="@{config.interface.dnsSearchDomains.isEmpty() ? android.view.View.GONE : android.view.View.VISIBLE}"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/dns_search_domains_label" app:layout_constraintTop_toBottomOf="@+id/dns_search_domains_label"
@ -218,7 +218,6 @@
<TextView <TextView
android:id="@+id/listen_port_text" android:id="@+id/listen_port_text"
style="@style/DetailText"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:contentDescription="@string/listen_port" android:contentDescription="@string/listen_port"
@ -228,6 +227,7 @@
android:nextFocusForward="@id/mtu_text" android:nextFocusForward="@id/mtu_text"
android:onClick="@{ClipboardUtils::copyTextView}" android:onClick="@{ClipboardUtils::copyTextView}"
android:text="@{config.interface.listenPort}" android:text="@{config.interface.listenPort}"
android:textAppearance="?attr/textAppearanceBodyLarge"
android:visibility="@{!config.interface.listenPort.isPresent() ? android.view.View.GONE : android.view.View.VISIBLE}" android:visibility="@{!config.interface.listenPort.isPresent() ? android.view.View.GONE : android.view.View.VISIBLE}"
app:layout_constraintEnd_toStartOf="@id/mtu_label" app:layout_constraintEnd_toStartOf="@id/mtu_label"
app:layout_constraintHorizontal_weight="0.5" app:layout_constraintHorizontal_weight="0.5"
@ -251,7 +251,6 @@
<TextView <TextView
android:id="@+id/mtu_text" android:id="@+id/mtu_text"
style="@style/DetailText"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:contentDescription="@string/mtu" android:contentDescription="@string/mtu"
@ -260,6 +259,7 @@
android:nextFocusForward="@id/applications_text" android:nextFocusForward="@id/applications_text"
android:onClick="@{ClipboardUtils::copyTextView}" android:onClick="@{ClipboardUtils::copyTextView}"
android:text="@{config.interface.mtu}" android:text="@{config.interface.mtu}"
android:textAppearance="?attr/textAppearanceBodyLarge"
android:visibility="@{!config.interface.mtu.isPresent() ? android.view.View.GONE : android.view.View.VISIBLE}" android:visibility="@{!config.interface.mtu.isPresent() ? android.view.View.GONE : android.view.View.VISIBLE}"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_weight="0.5" app:layout_constraintHorizontal_weight="0.5"
@ -283,12 +283,11 @@
android:labelFor="@+id/applications_text" android:labelFor="@+id/applications_text"
android:text="@string/applications" android:text="@string/applications"
android:visibility="@{config.interface.includedApplications.isEmpty() &amp;&amp; config.interface.excludedApplications.isEmpty() ? android.view.View.GONE : android.view.View.VISIBLE}" android:visibility="@{config.interface.includedApplications.isEmpty() &amp;&amp; config.interface.excludedApplications.isEmpty() ? android.view.View.GONE : android.view.View.VISIBLE}"
app:layout_constraintTop_toBottomOf="@+id/listen_port_mtu_barrier" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintStart_toStartOf="parent" /> app:layout_constraintTop_toBottomOf="@+id/listen_port_mtu_barrier" />
<TextView <TextView
android:id="@+id/applications_text" android:id="@+id/applications_text"
style="@style/DetailText"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:contentDescription="@string/applications" android:contentDescription="@string/applications"
@ -297,9 +296,10 @@
android:nextFocusForward="@id/peers_layout" android:nextFocusForward="@id/peers_layout"
android:onClick="@{ClipboardUtils::copyTextView}" android:onClick="@{ClipboardUtils::copyTextView}"
android:text="@{config.interface.includedApplications.isEmpty() ? @plurals/n_excluded_applications(config.interface.excludedApplications.size(), config.interface.excludedApplications.size()) : @plurals/n_included_applications(config.interface.includedApplications.size(), config.interface.includedApplications.size())}" android:text="@{config.interface.includedApplications.isEmpty() ? @plurals/n_excluded_applications(config.interface.excludedApplications.size(), config.interface.excludedApplications.size()) : @plurals/n_included_applications(config.interface.includedApplications.size(), config.interface.includedApplications.size())}"
android:textAppearance="?attr/textAppearanceBodyLarge"
android:visibility="@{config.interface.includedApplications.isEmpty() &amp;&amp; config.interface.excludedApplications.isEmpty() ? android.view.View.GONE : android.view.View.VISIBLE}" android:visibility="@{config.interface.includedApplications.isEmpty() &amp;&amp; config.interface.excludedApplications.isEmpty() ? android.view.View.GONE : android.view.View.VISIBLE}"
app:layout_constraintTop_toBottomOf="@+id/applications_label"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/applications_label"
tools:text="8 excluded" /> tools:text="8 excluded" />
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
</com.google.android.material.card.MaterialCardView> </com.google.android.material.card.MaterialCardView>

View File

@ -23,10 +23,10 @@
<com.google.android.material.textview.MaterialTextView <com.google.android.material.textview.MaterialTextView
android:id="@+id/peer_title" android:id="@+id/peer_title"
style="@style/SectionText"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/peer" android:text="@string/peer"
android:textAppearance="?attr/textAppearanceTitleMedium"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />
@ -42,7 +42,6 @@
<TextView <TextView
android:id="@+id/public_key_text" android:id="@+id/public_key_text"
style="@style/DetailText"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:contentDescription="@string/public_key" android:contentDescription="@string/public_key"
@ -53,6 +52,7 @@
android:onClick="@{ClipboardUtils::copyTextView}" android:onClick="@{ClipboardUtils::copyTextView}"
android:singleLine="true" android:singleLine="true"
android:text="@{item.publicKey.toBase64}" android:text="@{item.publicKey.toBase64}"
android:textAppearance="?attr/textAppearanceBodyLarge"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/public_key_label" app:layout_constraintTop_toBottomOf="@+id/public_key_label"
tools:text="wOs2eguFEohqIZxlSJ1CAT9584tc6ejj9hfGFsoBVkA=" /> tools:text="wOs2eguFEohqIZxlSJ1CAT9584tc6ejj9hfGFsoBVkA=" />
@ -70,7 +70,6 @@
<TextView <TextView
android:id="@+id/pre_shared_key_text" android:id="@+id/pre_shared_key_text"
style="@style/DetailText"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:contentDescription="@string/pre_shared_key" android:contentDescription="@string/pre_shared_key"
@ -81,6 +80,7 @@
android:nextFocusForward="@id/allowed_ips_text" android:nextFocusForward="@id/allowed_ips_text"
android:singleLine="true" android:singleLine="true"
android:text="@string/pre_shared_key_enabled" android:text="@string/pre_shared_key_enabled"
android:textAppearance="?attr/textAppearanceBodyLarge"
android:visibility="@{!item.preSharedKey.isPresent() ? android.view.View.GONE : android.view.View.VISIBLE}" android:visibility="@{!item.preSharedKey.isPresent() ? android.view.View.GONE : android.view.View.VISIBLE}"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/pre_shared_key_label" app:layout_constraintTop_toBottomOf="@+id/pre_shared_key_label"
@ -99,7 +99,6 @@
<TextView <TextView
android:id="@+id/allowed_ips_text" android:id="@+id/allowed_ips_text"
style="@style/DetailText"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:contentDescription="@string/allowed_ips" android:contentDescription="@string/allowed_ips"
@ -108,6 +107,7 @@
android:nextFocusForward="@id/endpoint_text" android:nextFocusForward="@id/endpoint_text"
android:onClick="@{ClipboardUtils::copyTextView}" android:onClick="@{ClipboardUtils::copyTextView}"
android:text="@{item.allowedIps}" android:text="@{item.allowedIps}"
android:textAppearance="?attr/textAppearanceBodyLarge"
android:visibility="@{item.allowedIps.isEmpty() ? android.view.View.GONE : android.view.View.VISIBLE}" android:visibility="@{item.allowedIps.isEmpty() ? android.view.View.GONE : android.view.View.VISIBLE}"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/allowed_ips_label" app:layout_constraintTop_toBottomOf="@+id/allowed_ips_label"
@ -126,7 +126,6 @@
<TextView <TextView
android:id="@+id/endpoint_text" android:id="@+id/endpoint_text"
style="@style/DetailText"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:contentDescription="@string/endpoint" android:contentDescription="@string/endpoint"
@ -135,6 +134,7 @@
android:nextFocusForward="@id/persistent_keepalive_text" android:nextFocusForward="@id/persistent_keepalive_text"
android:onClick="@{ClipboardUtils::copyTextView}" android:onClick="@{ClipboardUtils::copyTextView}"
android:text="@{item.endpoint}" android:text="@{item.endpoint}"
android:textAppearance="?attr/textAppearanceBodyLarge"
android:visibility="@{!item.endpoint.isPresent() ? android.view.View.GONE : android.view.View.VISIBLE}" android:visibility="@{!item.endpoint.isPresent() ? android.view.View.GONE : android.view.View.VISIBLE}"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/endpoint_label" app:layout_constraintTop_toBottomOf="@+id/endpoint_label"
@ -153,7 +153,6 @@
<TextView <TextView
android:id="@+id/persistent_keepalive_text" android:id="@+id/persistent_keepalive_text"
style="@style/DetailText"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:contentDescription="@string/persistent_keepalive" android:contentDescription="@string/persistent_keepalive"
@ -162,6 +161,7 @@
android:nextFocusForward="@id/transfer_text" android:nextFocusForward="@id/transfer_text"
android:onClick="@{ClipboardUtils::copyTextView}" android:onClick="@{ClipboardUtils::copyTextView}"
android:text="@{@plurals/persistent_keepalive_seconds_unit(item.persistentKeepalive.orElse(0), item.persistentKeepalive.orElse(0))}" android:text="@{@plurals/persistent_keepalive_seconds_unit(item.persistentKeepalive.orElse(0), item.persistentKeepalive.orElse(0))}"
android:textAppearance="?attr/textAppearanceBodyLarge"
android:visibility="@{!item.persistentKeepalive.isPresent() ? android.view.View.GONE : android.view.View.VISIBLE}" android:visibility="@{!item.persistentKeepalive.isPresent() ? android.view.View.GONE : android.view.View.VISIBLE}"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/persistent_keepalive_label" app:layout_constraintTop_toBottomOf="@+id/persistent_keepalive_label"
@ -182,13 +182,13 @@
<TextView <TextView
android:id="@+id/transfer_text" android:id="@+id/transfer_text"
style="@style/DetailText"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_below="@+id/transfer_label" android:layout_below="@+id/transfer_label"
android:contentDescription="@string/transfer" android:contentDescription="@string/transfer"
android:nextFocusUp="@id/persistent_keepalive_text" android:nextFocusUp="@id/persistent_keepalive_text"
android:onClick="@{ClipboardUtils::copyTextView}" android:onClick="@{ClipboardUtils::copyTextView}"
android:textAppearance="?attr/textAppearanceBodyLarge"
android:visibility="gone" android:visibility="gone"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/transfer_label" app:layout_constraintTop_toBottomOf="@+id/transfer_label"

View File

@ -53,12 +53,12 @@
<com.google.android.material.textview.MaterialTextView <com.google.android.material.textview.MaterialTextView
android:id="@+id/interface_title" android:id="@+id/interface_title"
style="@style/SectionText"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_margin="8dp" android:layout_margin="8dp"
android:layout_marginTop="32dp" android:layout_marginTop="32dp"
android:text="@string/interface_title" android:text="@string/interface_title"
android:textAppearance="?attr/textAppearanceTitleMedium"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />
@ -243,7 +243,7 @@
<com.google.android.material.button.MaterialButton <com.google.android.material.button.MaterialButton
android:id="@+id/set_excluded_applications" android:id="@+id/set_excluded_applications"
style="@style/Widget.MaterialComponents.Button.TextButton" style="@style/Widget.Material3.Button.TextButton"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_margin="4dp" android:layout_margin="4dp"
@ -275,7 +275,7 @@
<com.google.android.material.button.MaterialButton <com.google.android.material.button.MaterialButton
android:id="@+id/add_peer_button" android:id="@+id/add_peer_button"
style="@style/Widget.MaterialComponents.Button.TextButton" style="@style/Widget.Material3.Button.TextButton"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="bottom" android:layout_gravity="bottom"

View File

@ -37,11 +37,11 @@
<com.google.android.material.textview.MaterialTextView <com.google.android.material.textview.MaterialTextView
android:id="@+id/peer_title" android:id="@+id/peer_title"
style="@style/SectionText"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_margin="8dp" android:layout_margin="8dp"
android:text="@string/peer" android:text="@string/peer"
android:textAppearance="?attr/textAppearanceTitleMedium"
app:layout_constraintBottom_toTopOf="@+id/public_key_label_layout" app:layout_constraintBottom_toTopOf="@+id/public_key_label_layout"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />

View File

@ -39,7 +39,6 @@
<TextView <TextView
android:id="@+id/tunnel_name" android:id="@+id/tunnel_name"
style="?android:attr/textAppearanceMedium"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentStart="true" android:layout_alignParentStart="true"
@ -47,14 +46,15 @@
android:ellipsize="end" android:ellipsize="end"
android:maxLines="1" android:maxLines="1"
android:text="@{key}" android:text="@{key}"
android:textAppearance="?attr/textAppearanceBodyLarge"
tools:text="@sample/interface_names.json/names/names/name" /> tools:text="@sample/interface_names.json/names/names/name" />
<com.wireguard.android.widget.ToggleSwitch <com.wireguard.android.widget.ToggleSwitch
android:id="@+id/tunnel_switch" android:id="@+id/tunnel_switch"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_alignParentEnd="true" android:layout_alignParentEnd="true"
android:layout_centerVertical="true"
android:nextFocusLeft="@+id/tunnel_list_item" android:nextFocusLeft="@+id/tunnel_list_item"
app:checked="@{item.state == State.UP}" app:checked="@{item.state == State.UP}"
app:onBeforeCheckedChanged="@{fragment::setTunnelState}" app:onBeforeCheckedChanged="@{fragment::setTunnelState}"

View File

@ -82,12 +82,12 @@
<TextView <TextView
android:id="@+id/files_root_label" android:id="@+id/files_root_label"
style="@style/TextAppearance.MaterialComponents.Headline5"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_horizontal" android:layout_gravity="center_horizontal"
android:layout_marginStart="8dp" android:layout_marginStart="8dp"
android:text="@{filesRoot}" android:text="@{filesRoot}"
android:textAppearance="?attr/textAppearanceTitleLarge"
android:visibility="@{filesRoot.isEmpty ? View.GONE : View.VISIBLE}" android:visibility="@{filesRoot.isEmpty ? View.GONE : View.VISIBLE}"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/banner_logo" app:layout_constraintTop_toBottomOf="@id/banner_logo"
@ -113,11 +113,11 @@
tools:visibility="gone" /> tools:visibility="gone" />
<TextView <TextView
style="@style/TextAppearance.MaterialComponents.Headline4"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_horizontal" android:layout_gravity="center_horizontal"
android:text="@string/tv_add_tunnel_get_started" android:text="@string/tv_add_tunnel_get_started"
android:textAppearance="?attr/textAppearanceHeadlineSmall"
android:visibility="@{(filesRoot.isEmpty &amp;&amp; tunnels.isEmpty) ? View.VISIBLE : View.GONE}" android:visibility="@{(filesRoot.isEmpty &amp;&amp; tunnels.isEmpty) ? View.VISIBLE : View.GONE}"
app:layout_constraintBottom_toTopOf="@id/delete_button" app:layout_constraintBottom_toTopOf="@id/delete_button"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
@ -127,7 +127,7 @@
<com.google.android.material.button.MaterialButton <com.google.android.material.button.MaterialButton
android:id="@+id/import_button" android:id="@+id/import_button"
style="@style/Widget.MaterialComponents.Button" style="@style/Widget.Material3.Button.IconButton"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_margin="16dp" android:layout_margin="16dp"
@ -141,7 +141,7 @@
<com.google.android.material.button.MaterialButton <com.google.android.material.button.MaterialButton
android:id="@+id/delete_button" android:id="@+id/delete_button"
style="@style/Widget.MaterialComponents.Button" style="@style/Widget.Material3.Button.IconButton"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_margin="16dp" android:layout_margin="16dp"

View File

@ -31,10 +31,10 @@
android:layout_height="match_parent"> android:layout_height="match_parent">
<com.google.android.material.textview.MaterialTextView <com.google.android.material.textview.MaterialTextView
style="@style/TextAppearance.MaterialComponents.Headline5"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@{key}" android:text="@{key}"
android:textAppearance="?attr/textAppearanceTitleLarge"
android:textColor="?attr/colorOnPrimary" android:textColor="?attr/colorOnPrimary"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />

View File

@ -45,10 +45,10 @@
<com.google.android.material.textview.MaterialTextView <com.google.android.material.textview.MaterialTextView
android:id="@+id/tunnel_name" android:id="@+id/tunnel_name"
style="@style/TextAppearance.MaterialComponents.Headline5"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@{item.name}" android:text="@{item.name}"
android:textAppearance="?attr/textAppearanceTitleLarge"
android:textColor="?attr/colorOnPrimary" android:textColor="?attr/colorOnPrimary"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent"
@ -56,9 +56,9 @@
<com.google.android.material.textview.MaterialTextView <com.google.android.material.textview.MaterialTextView
android:id="@+id/tunnel_transfer" android:id="@+id/tunnel_transfer"
style="@style/TextAppearance.MaterialComponents.Body1"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textAppearance="?attr/textAppearanceBodyLarge"
android:visibility="@{isDeleting ? View.GONE : View.VISIBLE}" android:visibility="@{isDeleting ? View.GONE : View.VISIBLE}"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"

View File

@ -37,8 +37,4 @@
<item name="android:windowEnterAnimation">@android:anim/fade_in</item> <item name="android:windowEnterAnimation">@android:anim/fade_in</item>
<item name="android:windowExitAnimation">@android:anim/fade_out</item> <item name="android:windowExitAnimation">@android:anim/fade_out</item>
</style> </style>
<style name="DetailText" parent="TextAppearance.MaterialComponents.Body1" />
<style name="SectionText" parent="TextAppearance.MaterialComponents.Subtitle1" />
</resources> </resources>

View File

@ -17,23 +17,15 @@
<item name="android:windowBackground">@color/tv_primary_color</item> <item name="android:windowBackground">@color/tv_primary_color</item>
<item name="alertDialogTheme">@style/TvTheme.Dialog</item> <item name="alertDialogTheme">@style/TvTheme.Dialog</item>
<item name="materialAlertDialogTheme">@style/TvTheme.Dialog</item> <item name="materialAlertDialogTheme">@style/TvTheme.Dialog</item>
<item name="textInputStyle">@style/TextInputLayoutBase</item>
<item name="materialCardViewStyle">@style/TvTheme.MaterialCardView</item> <item name="materialCardViewStyle">@style/TvTheme.MaterialCardView</item>
</style> </style>
<style name="TextInputLayoutBase" parent="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox">
<item name="boxStrokeColor">?attr/colorSecondary</item>
<item name="hintTextColor">?attr/colorOnPrimary</item>
</style>
<style name="TvTheme.Dialog" parent="Theme.MaterialComponents.DayNight.Dialog.Alert"> <style name="TvTheme.Dialog" parent="Theme.MaterialComponents.DayNight.Dialog.Alert">
<item name="android:windowBackground">?attr/colorSurface</item> <item name="android:windowBackground">?attr/colorSurface</item>
</style> </style>
<style name="TvTheme.MaterialCardView" parent="Widget.MaterialComponents.CardView"> <style name="TvTheme.MaterialCardView" parent="Widget.Material3.CardView.Elevated">
<item name="cornerRadius">4dp</item> <item name="cornerRadius">4dp</item>
<item name="cardElevation">8dp</item>
<item name="contentPadding">8dp</item> <item name="contentPadding">8dp</item>
<item name="cardBackgroundColor">?attr/elevationOverlayColor</item>
</style> </style>
</resources> </resources>