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. 36
      app/src/main/res/layout/activity_edit_profile.xml

@ -7,9 +7,13 @@
android:layout_height="match_parent" android:layout_height="match_parent"
tools:context="com.keylesspalace.tusky.EditProfileActivity"> tools:context="com.keylesspalace.tusky.EditProfileActivity">
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="wrap_content"
android:orientation="vertical"> android:orientation="vertical">
<android.support.v7.widget.Toolbar <android.support.v7.widget.Toolbar
@ -37,21 +41,13 @@
android:indeterminate="true" android:indeterminate="true"
android:visibility="gone" /> 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 <ImageButton
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="200dp" android:layout_height="200dp"
android:id="@id/edit_profile_header" android:id="@+id/edit_profile_header"
app:srcCompat="@drawable/ic_add_a_photo_32dp" app:srcCompat="@drawable/ic_add_a_photo_32dp"
android:text="@string/action_photo_pick" android:background="#66000000"
android:textColor="@color/text_color_primary_dark" android:contentDescription="@string/label_header" />
android:background="#66000000"/>
</RelativeLayout> </RelativeLayout>
<RelativeLayout <RelativeLayout
@ -74,22 +70,14 @@
android:indeterminate="true" android:indeterminate="true"
android:visibility="gone" /> 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 <ImageButton
android:layout_width="80dp" android:layout_width="80dp"
android:layout_height="80dp" android:layout_height="80dp"
android:id="@id/edit_profile_avatar" android:id="@+id/edit_profile_avatar"
app:srcCompat="@drawable/ic_add_a_photo_32dp" 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:elevation="4dp"
android:background="@drawable/round_button"/> android:background="@drawable/round_button"
android:contentDescription="@string/label_avatar" />
</RelativeLayout> </RelativeLayout>
<android.support.design.widget.TextInputLayout <android.support.design.widget.TextInputLayout
@ -129,6 +117,8 @@
</LinearLayout> </LinearLayout>
</ScrollView>
<ProgressBar <ProgressBar
android:id="@+id/edit_profile_save_progress" android:id="@+id/edit_profile_save_progress"
android:layout_width="wrap_content" android:layout_width="wrap_content"

Loading…
Cancel
Save