From 59aa3035a8581a687efc7a3b4df5952dffdfecfe Mon Sep 17 00:00:00 2001 From: Harsh Shandilya Date: Wed, 2 May 2018 11:33:03 +0530 Subject: [PATCH] ui: Use a proper CardView based layout Signed-off-by: Harsh Shandilya --- app/build.gradle | 1 + .../res/layout/tunnel_detail_fragment.xml | 160 +++++---- .../main/res/layout/tunnel_detail_peer.xml | 127 +++---- .../res/layout/tunnel_editor_fragment.xml | 334 +++++++++--------- .../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 0422b36..ddabbdb 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 971d878..3fa3c75 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 70f376a..04283d8 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"> - - - - - - - - - - -