fedilab-Android-App/app/src/main/res/layout/fragment_settings_profile.xml

139 lines
5.7 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2017 Thomas Schneider
This file is a part of Mastodon Etalab for mastodon.etalab.gouv.fr
This program is free software; you can redistribute it and/or modify it under the terms of the
GNU General Public License as published by the Free Software Foundation; either version 3 of the
License, or (at your option) any later version.
Mastodon Etalab is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
Public License for more details.
You should have received a copy of the GNU General Public License along with Thomas Schneider; if not,
see <http://www.gnu.org/licenses>.
-->
<ScrollView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/swipeContainer"
android:paddingLeft="@dimen/drawer_padding"
android:paddingRight="@dimen/drawer_padding"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:padding="@dimen/fab_margin"
android:orientation="vertical"
tools:ignore="UselessParent">
<!-- Profile SETTINGS -->
<TextView
android:text="@string/settings_title_profile"
style="?attr/shapeBorder"
android:paddingBottom="10dp"
android:layout_width="match_parent"
android:layout_marginBottom="10dp"
android:layout_height="wrap_content" />
<!-- Screen name -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<!-- Profile picture -->
<ImageView
android:layout_gravity="center"
android:id="@+id/set_profile_picture"
android:layout_width="100dp"
android:scaleType="fitXY"
android:layout_height="100dp"
tools:ignore="ContentDescription" />
<LinearLayout
android:layout_marginStart="10dp"
android:layout_marginLeft="10dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<EditText
android:layout_marginTop="10dp"
android:id="@+id/set_profile_name"
android:layout_width="match_parent"
android:maxLines="1"
android:layout_height="wrap_content"
android:inputType="textPersonName" />
<Button
android:layout_marginTop="5dp"
android:id="@+id/set_change_profile_picture"
android:textSize="12sp"
android:textAllCaps="false"
android:text="@string/choose_picture"
style="@style/Base.Widget.AppCompat.Button.Borderless.Colored"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
</LinearLayout>
<!-- Description -->
<EditText
android:layout_marginTop="10dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/set_profile_description"
android:minLines="4"
android:lines="4"
android:maxLines="5"
android:hint="@string/set_profile_description"
/>
<!-- Header picture -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<ImageView
android:scaleType="fitXY"
android:id="@+id/set_header_picture"
android:minHeight="100dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
tools:ignore="ContentDescription" />
<TextView
android:visibility="gone"
android:id="@+id/set_header_picture_overlay"
android:layout_gravity="center"
android:gravity="center"
android:textStyle="italic"
android:textSize="16sp"
android:text="@string/set_header_picture_overlay"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
</LinearLayout>
<Button
android:layout_marginTop="5dp"
android:id="@+id/set_change_header_picture"
android:layout_gravity="center"
android:textSize="12sp"
android:gravity="center"
android:textAllCaps="false"
android:text="@string/choose_picture"
style="@style/Base.Widget.AppCompat.Button.Borderless.Colored"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<Button
android:layout_marginTop="5dp"
android:id="@+id/set_profile_save"
android:layout_gravity="center"
android:gravity="center"
style="@style/Base.Widget.AppCompat.Button.Colored"
android:maxWidth="150dp"
android:text="@string/set_save_changes"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</LinearLayout>
</ScrollView>