Adds content descriptions to header and avatar buttons in the profile editor and puts the page in a scroll view so it's navigable in landscape mode.

main
Vavassor 8 years ago
parent a383d72ba4
commit c534b7424f
  1. 196
      app/src/main/res/layout/activity_edit_profile.xml

@ -7,127 +7,117 @@
android:layout_height="match_parent" android:layout_height="match_parent"
tools:context="com.keylesspalace.tusky.EditProfileActivity"> tools:context="com.keylesspalace.tusky.EditProfileActivity">
<LinearLayout <ScrollView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent">
android:orientation="vertical">
<android.support.v7.widget.Toolbar <LinearLayout
android:id="@+id/toolbar"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize" android:layout_height="wrap_content"
android:background="?attr/toolbar_background_color" android:orientation="vertical">
android:elevation="4dp" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ImageView <android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="200dp" android:layout_height="?attr/actionBarSize"
android:id="@+id/edit_profile_header_preview" android:background="?attr/toolbar_background_color"
android:contentDescription="@null" /> android:elevation="4dp" />
<ProgressBar
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/edit_profile_header_progress"
android:layout_centerInParent="true"
android:indeterminate="true"
android:visibility="gone" />
<TextView <RelativeLayout
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_width="match_parent"
android:layout_height="200dp" android:layout_height="wrap_content">
android:id="@id/edit_profile_header"
app:srcCompat="@drawable/ic_add_a_photo_32dp" <ImageView
android:text="@string/action_photo_pick" android:layout_width="match_parent"
android:textColor="@color/text_color_primary_dark" android:layout_height="200dp"
android:background="#66000000"/> android:id="@+id/edit_profile_header_preview"
</RelativeLayout> android:contentDescription="@null" />
<RelativeLayout <ProgressBar
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingLeft="16dp" android:id="@+id/edit_profile_header_progress"
android:layout_marginTop="-40dp"> android:layout_centerInParent="true"
android:indeterminate="true"
<com.pkmmte.view.CircularImageView android:visibility="gone" />
android:layout_width="80dp"
android:layout_height="80dp" <ImageButton
android:id="@+id/edit_profile_avatar_preview" android:layout_width="match_parent"
android:contentDescription="@null" /> android:layout_height="200dp"
android:id="@+id/edit_profile_header"
<ProgressBar app:srcCompat="@drawable/ic_add_a_photo_32dp"
android:layout_width="wrap_content" android:background="#66000000"
android:layout_height="wrap_content" android:contentDescription="@string/label_header" />
android:id="@+id/edit_profile_avatar_progress" </RelativeLayout>
android:layout_centerInParent="true"
android:indeterminate="true" <RelativeLayout
android:visibility="gone" />
<TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/label_avatar" android:paddingLeft="16dp"
android:labelFor="@+id/edit_profile_avatar" android:layout_marginTop="-40dp">
android:visibility="gone"/>
<com.pkmmte.view.CircularImageView
<ImageButton android:layout_width="80dp"
android:layout_width="80dp" android:layout_height="80dp"
android:layout_height="80dp" android:id="@+id/edit_profile_avatar_preview"
android:id="@id/edit_profile_avatar" android:contentDescription="@null" />
app:srcCompat="@drawable/ic_add_a_photo_32dp"
android:text="@string/action_photo_pick" <ProgressBar
android:textColor="@color/text_color_primary_dark" android:layout_width="wrap_content"
android:elevation="4dp" android:layout_height="wrap_content"
android:background="@drawable/round_button"/> android:id="@+id/edit_profile_avatar_progress"
</RelativeLayout> android:layout_centerInParent="true"
android:indeterminate="true"
<android.support.design.widget.TextInputLayout android:visibility="gone" />
android:id="@+id/layout_edit_profile_display_name"
android:layout_width="match_parent" <ImageButton
android:layout_height="wrap_content" android:layout_width="80dp"
android:layout_marginTop="30dp"> android:layout_height="80dp"
android:id="@+id/edit_profile_avatar"
<EditText app:srcCompat="@drawable/ic_add_a_photo_32dp"
android:elevation="4dp"
android:background="@drawable/round_button"
android:contentDescription="@string/label_avatar" />
</RelativeLayout>
<android.support.design.widget.TextInputLayout
android:id="@+id/layout_edit_profile_display_name"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:id="@+id/edit_profile_display_name" android:layout_marginTop="30dp">
android:hint="@string/hint_display_name"
android:maxLength="30"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp" />
</android.support.design.widget.TextInputLayout> <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.support.design.widget.TextInputLayout
android:id="@+id/layout_edit_profile_note"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:id="@+id/edit_profile_note" android:layout_marginTop="30dp">
android:hint="@string/hint_note"
android:maxLength="160" <EditText
android:layout_marginStart="16dp" android:layout_width="match_parent"
android:layout_marginEnd="16dp" android:layout_height="wrap_content"
android:layout_marginBottom="16dp" /> 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>
</android.support.design.widget.TextInputLayout> </LinearLayout>
</LinearLayout> </ScrollView>
<ProgressBar <ProgressBar
android:id="@+id/edit_profile_save_progress" android:id="@+id/edit_profile_save_progress"

Loading…
Cancel
Save