Merge branch 'profile-edition-design' of https://github.com/daycode/Tusky into daycode-profile-edition-design

This commit is contained in:
Vavassor 2017-05-01 21:52:11 -04:00
commit cfb0219536
7 changed files with 141 additions and 106 deletions

View file

@ -0,0 +1,4 @@
<vector android:height="32dp" android:viewportHeight="24.0"
android:viewportWidth="24.0" android:width="32dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#FFFFFFFF" android:pathData="M3,4L3,1h2v3h3v2L5,6v3L3,9L3,6L0,6L0,4h3zM6,10L6,7h3L9,4h7l1.83,2L21,6c1.1,0 2,0.9 2,2v12c0,1.1 -0.9,2 -2,2L5,22c-1.1,0 -2,-0.9 -2,-2L3,10h3zM13,19c2.76,0 5,-2.24 5,-5s-2.24,-5 -5,-5 -5,2.24 -5,5 2.24,5 5,5zM9.8,14c0,1.77 1.43,3.2 3.2,3.2s3.2,-1.43 3.2,-3.2 -1.43,-3.2 -3.2,-3.2 -3.2,1.43 -3.2,3.2z"/>
</vector>

View file

@ -0,0 +1,4 @@
<vector android:height="32dp" android:viewportHeight="24.0"
android:viewportWidth="24.0" android:width="32dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#FFFFFFFF" android:pathData="M9,16.17L4.83,12l-1.42,1.41L9,19 21,7l-1.41,-1.41z"/>
</vector>

View file

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval">
<solid android:color="#66000000" />
<size
android:width="80dp"
android:height="80dp"/>
</shape>

View file

@ -1,5 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
<android.support.design.widget.CoordinatorLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
@ -14,105 +16,18 @@
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="@android:color/transparent"
android:background="?attr/toolbar_background_color"
android:elevation="4dp" />
<EditText
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/edit_profile_display_name"
android:hint="@string/hint_display_name"
android:maxLength="30"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp" />
<EditText
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/edit_profile_note"
android:hint="@string/hint_note"
android:maxLength="160"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
android:layout_marginBottom="16dp" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingLeft="16dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/label_avatar"
android:labelFor="@+id/edit_profile_avatar"
android:layout_marginRight="8dp" />
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@id/edit_profile_avatar"
android:text="@string/action_photo_pick"
android:textColor="@color/text_color_primary_dark" />
</LinearLayout>
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingLeft="16dp">
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ImageView
android:layout_width="80dp"
android:layout_height="80dp"
android:id="@+id/edit_profile_avatar_preview"
android:contentDescription="@null"
android:visibility="gone" />
<ProgressBar
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/edit_profile_avatar_progress"
android:layout_centerInParent="true"
android:indeterminate="true"
android:visibility="gone" />
</RelativeLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingLeft="16dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/label_header"
android:labelFor="@+id/edit_profile_header"
android:layout_marginRight="8dp" />
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@id/edit_profile_header"
android:text="@string/action_photo_pick"
android:textColor="@color/text_color_primary_dark" />
</LinearLayout>
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingLeft="16dp">
<ImageView
android:layout_width="167.2dp"
android:layout_height="80dp"
android:layout_width="match_parent"
android:layout_height="200dp"
android:id="@+id/edit_profile_header_preview"
android:contentDescription="@null"
android:visibility="gone" />
android:contentDescription="@null" />
<ProgressBar
android:layout_width="wrap_content"
@ -122,8 +37,96 @@
android:indeterminate="true"
android:visibility="gone" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/label_header"
android:labelFor="@+id/edit_profile_header"
android:visibility="gone"/>
<ImageButton
android:layout_width="match_parent"
android:layout_height="200dp"
android:id="@id/edit_profile_header"
app:srcCompat="@drawable/ic_add_a_photo_32dp"
android:text="@string/action_photo_pick"
android:textColor="@color/text_color_primary_dark"
android:background="#66000000"/>
</RelativeLayout>
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingLeft="16dp"
android:layout_marginTop="-40dp">
<com.pkmmte.view.CircularImageView
android:layout_width="80dp"
android:layout_height="80dp"
android:id="@+id/edit_profile_avatar_preview"
android:contentDescription="@null" />
<ProgressBar
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/edit_profile_avatar_progress"
android:layout_centerInParent="true"
android:indeterminate="true"
android:visibility="gone" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/label_avatar"
android:labelFor="@+id/edit_profile_avatar"
android:visibility="gone"/>
<ImageButton
android:layout_width="80dp"
android:layout_height="80dp"
android:id="@id/edit_profile_avatar"
app:srcCompat="@drawable/ic_add_a_photo_32dp"
android:text="@string/action_photo_pick"
android:textColor="@color/text_color_primary_dark"
android:elevation="4dp"
android:background="@drawable/round_button"/>
</RelativeLayout>
<android.support.design.widget.TextInputLayout
android:id="@+id/layout_edit_profile_display_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="30dp">
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/edit_profile_display_name"
android:hint="@string/hint_display_name"
android:maxLength="30"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp" />
</android.support.design.widget.TextInputLayout>
<android.support.design.widget.TextInputLayout
android:id="@+id/layout_edit_profile_note"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="30dp">
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/edit_profile_note"
android:hint="@string/hint_note"
android:maxLength="160"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
android:layout_marginBottom="16dp" />
</android.support.design.widget.TextInputLayout>
</LinearLayout>
<ProgressBar

View file

@ -3,7 +3,7 @@
xmlns:app="http://schemas.android.com/apk/res-auto">
<item
android:id="@+id/action_save"
android:icon="@drawable/ic_check_in_box_24dp"
android:icon="@drawable/ic_check_32dp"
android:title="@string/action_save"
app:showAsAction="always" />
</menu>

View file

@ -31,6 +31,7 @@
<string name="title_mutes">Muted users</string>
<string name="title_blocks">Blocked users</string>
<string name="title_follow_requests">Follow Requests</string>
<string name="title_edit_profile">Edit your profile</string>
<string name="status_username_format">\@%s</string>
<string name="status_boosted_format">%s boosted</string>