summaryrefslogtreecommitdiffhomepage
path: root/ui/src/main/res/layout
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2020-04-06 19:08:57 -0600
committerJason A. Donenfeld <Jason@zx2c4.com>2020-04-06 19:08:57 -0600
commit830d0992a7669f2fc20cae98137320a1d1dca5df (patch)
tree595d6f0e69cb8d79ad4b2f1c1b737ef89ffe7021 /ui/src/main/res/layout
parente4192ea1724690d8087a66b97007786224a8198c (diff)
ui: show excluded/included apps in details view
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'ui/src/main/res/layout')
-rw-r--r--ui/src/main/res/layout/tunnel_detail_fragment.xml24
1 files changed, 24 insertions, 0 deletions
diff --git a/ui/src/main/res/layout/tunnel_detail_fragment.xml b/ui/src/main/res/layout/tunnel_detail_fragment.xml
index a47f6b43..43e3e202 100644
--- a/ui/src/main/res/layout/tunnel_detail_fragment.xml
+++ b/ui/src/main/res/layout/tunnel_detail_fragment.xml
@@ -219,6 +219,30 @@
app:layout_constraintStart_toStartOf="@+id/mtu_label"
app:layout_constraintTop_toBottomOf="@+id/mtu_label"
tools:text="1500" />
+
+ <TextView
+ android:id="@+id/applications_label"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginTop="8dp"
+ android:labelFor="@+id/applications_text"
+ android:text="@string/applications"
+ android:visibility="@{config.interface.includedApplications.isEmpty() &amp;&amp; config.interface.excludedApplications.isEmpty() ? android.view.View.GONE : android.view.View.VISIBLE}"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintTop_toBottomOf="@id/listen_port_text" />
+
+ <TextView
+ android:id="@+id/applications_text"
+ style="@style/DetailText"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:contentDescription="@string/dns_servers"
+ 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:visibility="@{config.interface.includedApplications.isEmpty() &amp;&amp; config.interface.excludedApplications.isEmpty() ? android.view.View.GONE : android.view.View.VISIBLE}"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintTop_toBottomOf="@+id/applications_label"
+ tools:text="8 excluded" />
</androidx.constraintlayout.widget.ConstraintLayout>
</com.google.android.material.card.MaterialCardView>