From 0b098fb2ccacfcd34b65233da3dc96e6c2f3c99a Mon Sep 17 00:00:00 2001 From: Harsh Shandilya Date: Wed, 2 May 2018 11:33:03 +0530 Subject: ui: Use a proper CardView based layout Signed-off-by: Harsh Shandilya --- app/build.gradle | 1 + app/src/main/res/layout/tunnel_detail_fragment.xml | 160 +++++----- app/src/main/res/layout/tunnel_detail_peer.xml | 127 ++++---- app/src/main/res/layout/tunnel_editor_fragment.xml | 334 +++++++++++---------- app/src/main/res/layout/tunnel_editor_peer.xml | 238 ++++++++------- 5 files changed, 443 insertions(+), 417 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 0422b36a..ddabbdb8 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -41,6 +41,7 @@ dependencies { annotationProcessor "com.google.dagger:dagger-compiler:$daggerVersion" implementation "com.android.databinding:library:$databindingVersion" implementation "com.android.support:appcompat-v7:$supportLibsVersion" + implementation "com.android.support:cardview-v7:$supportLibsVersion" implementation "com.android.support:design:$supportLibsVersion" implementation "com.android.support:preference-v14:$supportLibsVersion" implementation "com.android.support:support-annotations:$supportLibsVersion" diff --git a/app/src/main/res/layout/tunnel_detail_fragment.xml b/app/src/main/res/layout/tunnel_detail_fragment.xml index 971d8784..3fa3c757 100644 --- a/app/src/main/res/layout/tunnel_detail_fragment.xml +++ b/app/src/main/res/layout/tunnel_detail_fragment.xml @@ -30,7 +30,7 @@ android:layout_height="wrap_content" android:orientation="vertical"> - - - - - - - - - + app:cardCornerRadius="4dp" + app:cardElevation="2dp" + app:contentPadding="8dp"> - - - - - - - - + android:layout_height="wrap_content"> + + + + + + + + + + + + + + + + + + - + @@ -10,7 +11,7 @@ type="com.wireguard.config.Peer.Observable" /> - + app:cardCornerRadius="4dp" + app:cardElevation="2dp" + app:contentPadding="8dp"> - + android:layout_height="wrap_content"> - + - + - + - + - + - - + + + + + diff --git a/app/src/main/res/layout/tunnel_editor_fragment.xml b/app/src/main/res/layout/tunnel_editor_fragment.xml index 70f376af..04283d88 100644 --- a/app/src/main/res/layout/tunnel_editor_fragment.xml +++ b/app/src/main/res/layout/tunnel_editor_fragment.xml @@ -33,7 +33,7 @@ android:layout_height="wrap_content" android:orientation="vertical"> - + app:cardCornerRadius="4dp" + app:cardElevation="2dp" + app:contentPadding="8dp"> - - - - - - - - - - -