account: don't set "Unknown" as profile name
"Unknown" is a placeholder to use at
presentation time, not as the actual profile
name that will be transmitted and saved.
This patch prevents setting a "default name"
in a vcard since the vcard can be used
without a name. If no name is available,
no name is set.
In the account list, the account alias is
showed if the profile name is not set.
Change-Id: I48cef23edc139c269fe54cd5ca8cd6de91ea6752
diff --git a/ring-android/app/src/main/res/layout/dialog_profile.xml b/ring-android/app/src/main/res/layout/dialog_profile.xml
index 5104ea2..8f1667b 100644
--- a/ring-android/app/src/main/res/layout/dialog_profile.xml
+++ b/ring-android/app/src/main/res/layout/dialog_profile.xml
@@ -70,7 +70,6 @@
android:inputType="textCapWords"
android:maxLines="1"
android:textAlignment="center"
- android:hint="@string/unknowm_if_empty"
- tools:text="Username" />
+ android:hint="@string/profile_name_hint" />
</LinearLayout>
\ No newline at end of file
diff --git a/ring-android/app/src/main/res/layout/frag_acc_profile_create.xml b/ring-android/app/src/main/res/layout/frag_acc_profile_create.xml
index 6790ad6..329bfc0 100644
--- a/ring-android/app/src/main/res/layout/frag_acc_profile_create.xml
+++ b/ring-android/app/src/main/res/layout/frag_acc_profile_create.xml
@@ -6,7 +6,7 @@
android:layout_height="match_parent"
android:theme="@style/Wizard">
- <RelativeLayout
+ <FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_above="@+id/add_action_panel"
@@ -15,7 +15,7 @@
<cx.ring.views.BoundedScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_centerInParent="true"
+ android:layout_gravity="center"
app:bounded_width="500dp">
<LinearLayout
@@ -76,13 +76,12 @@
app:backgroundTint="@color/light"
app:rippleColor="@android:color/white" />
- <View
+ <Space
android:id="@+id/anchor"
android:layout_width="20dp"
android:layout_height="20dp"
android:layout_alignBottom="@+id/profile_photo"
- android:layout_centerHorizontal="true"
- android:background="@color/zxing_transparent" />
+ android:layout_centerHorizontal="true" />
<android.support.design.widget.FloatingActionButton
android:id="@+id/gallery"
@@ -102,7 +101,7 @@
android:id="@+id/user_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:hint="@string/unknowm_if_empty"
+ android:hint="@string/profile_name_hint"
android:inputType="textCapWords"
android:maxLines="1"
android:paddingBottom="8dp"
@@ -111,13 +110,12 @@
android:paddingTop="16dp"
android:textAlignment="center"
android:textColor="@color/text_color_primary_dark"
- android:textColorHint="@color/text_color_secondary_dark"
- tools:text="Username" />
+ android:textColorHint="@color/text_color_secondary_dark" />
</LinearLayout>
</cx.ring.views.BoundedScrollView>
- </RelativeLayout>
+ </FrameLayout>
<RelativeLayout
android:id="@+id/add_action_panel"
diff --git a/ring-android/app/src/main/res/layout/item_account.xml b/ring-android/app/src/main/res/layout/item_account.xml
index 65bb628..5d5480a 100644
--- a/ring-android/app/src/main/res/layout/item_account.xml
+++ b/ring-android/app/src/main/res/layout/item_account.xml
@@ -1,5 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (c) 2016 Savoir-faire Linux Inc.
+<?xml version="1.0" encoding="utf-8"?><!-- Copyright (c) 2016 Savoir-faire Linux Inc.
Author: Adrien Beraud <adrien.beraud@savoirfairelinux.com>
@@ -32,18 +31,19 @@
android:layout_marginRight="8dp"
tools:src="@drawable/ic_contact_picture" />
- <android.support.v7.widget.AppCompatTextView
+ <TextView
android:id="@+id/account_alias"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_alignParentLeft="false"
- android:layout_alignParentStart="false"
android:layout_alignParentTop="true"
android:layout_toEndOf="@+id/account_photo"
+ android:layout_toLeftOf="@+id/error_indicator"
android:layout_toRightOf="@+id/account_photo"
+ android:layout_toStartOf="@+id/error_indicator"
+ android:ellipsize="end"
android:textAppearance="@style/ListPrimary" />
- <android.support.v7.widget.AppCompatTextView
+ <TextView
android:id="@+id/account_host"
android:layout_width="wrap_content"
android:layout_height="wrap_content"