From 521a711fbc782671f36076a0ebf71e911fce3338 Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Tue, 27 Feb 2018 10:19:07 +0100 Subject: [PATCH] use cards views in about and publish avatar activity --- build.gradle | 1 - .../conversations/ui/widget/ScannerView.java | 8 +- src/main/res/layout/activity_about.xml | 47 +++++--- .../activity_publish_profile_picture.xml | 113 +++++++++--------- src/main/res/values-h360dp/dimens.xml | 4 + src/main/res/values-h640dp/dimens.xml | 4 + src/main/res/values/about.xml | 63 ++++++++++ src/main/res/values/colors.xml | 7 +- src/main/res/values/dimens.xml | 3 + src/main/res/values/strings.xml | 31 ----- 10 files changed, 165 insertions(+), 116 deletions(-) create mode 100644 src/main/res/values-h360dp/dimens.xml create mode 100644 src/main/res/values-h640dp/dimens.xml create mode 100644 src/main/res/values/about.xml diff --git a/build.gradle b/build.gradle index 852ea2891..fe2177017 100644 --- a/build.gradle +++ b/build.gradle @@ -49,7 +49,6 @@ dependencies { implementation 'com.google.zxing:core:3.3.0' implementation 'de.measite.minidns:minidns-hla:0.2.4' implementation 'me.leolin:ShortcutBadger:1.1.21@aar' - implementation 'com.kyleduo.switchbutton:library:1.2.8' implementation 'org.whispersystems:signal-protocol-java:2.6.2' implementation 'com.makeramen:roundedimageview:2.3.0' implementation "com.wefika:flowlayout:0.4.1" diff --git a/src/main/java/eu/siacs/conversations/ui/widget/ScannerView.java b/src/main/java/eu/siacs/conversations/ui/widget/ScannerView.java index f1fe18f2c..4eb25418d 100644 --- a/src/main/java/eu/siacs/conversations/ui/widget/ScannerView.java +++ b/src/main/java/eu/siacs/conversations/ui/widget/ScannerView.java @@ -60,10 +60,10 @@ public class ScannerView extends View { super(context, attrs); final Resources res = getResources(); - maskColor = res.getColor(R.color.scan_mask); - maskResultColor = res.getColor(R.color.scan_result_view); - laserColor = res.getColor(R.color.scan_laser); - dotColor = res.getColor(R.color.scan_dot); + maskColor = res.getColor(R.color.black54); + maskResultColor = res.getColor(R.color.black87); + laserColor = res.getColor(R.color.red500); + dotColor = res.getColor(R.color.orange500); dotResultColor = res.getColor(R.color.scan_result_dots); maskPaint = new Paint(); diff --git a/src/main/res/layout/activity_about.xml b/src/main/res/layout/activity_about.xml index cae60ebbb..e37c00e4c 100644 --- a/src/main/res/layout/activity_about.xml +++ b/src/main/res/layout/activity_about.xml @@ -1,21 +1,32 @@ + xmlns:tools="http://schemas.android.com/tools" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:background="?attr/color_background_secondary" + tools:context="eu.siacs.conversations.ui.AboutActivity"> - + + + + + + + diff --git a/src/main/res/layout/activity_publish_profile_picture.xml b/src/main/res/layout/activity_publish_profile_picture.xml index 9caea6716..4d7294c6d 100644 --- a/src/main/res/layout/activity_publish_profile_picture.xml +++ b/src/main/res/layout/activity_publish_profile_picture.xml @@ -1,42 +1,62 @@ + android:layout_width="match_parent" + android:layout_height="match_parent" + android:background="?attr/color_background_primary"> - + android:layout_marginBottom="@dimen/activity_vertical_margin" + android:layout_marginLeft="@dimen/activity_horizontal_margin" + android:layout_marginRight="@dimen/activity_horizontal_margin" + android:layout_marginTop="@dimen/activity_vertical_margin"> - - + - + - + + + + + + + + + + + + android:layout_alignParentRight="true">