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

236 lines
9.0 KiB
XML
Raw Normal View History

2019-09-06 17:55:14 +02:00
<?xml version="1.0" encoding="utf-8"?><!--
2017-08-28 09:20:19 +02:00
Copyright 2017 Thomas Schneider
2019-05-18 11:10:30 +02:00
This file is a part of Fedilab
2017-08-28 09:20:19 +02:00
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.
2019-05-18 11:10:30 +02:00
Fedilab is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
2017-08-28 09:20:19 +02:00
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
Public License for more details.
2019-05-18 11:10:30 +02:00
You should have received a copy of the GNU General Public License along with Fedilab; if not,
2017-08-28 09:20:19 +02:00
see <http://www.gnu.org/licenses>.
-->
2019-09-06 17:55:14 +02:00
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
2017-08-28 09:20:19 +02:00
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">
<!-- 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"
2018-12-10 07:34:14 +01:00
android:contentDescription="@string/profile_picture" />
2019-09-06 17:55:14 +02:00
2017-08-28 09:20:19 +02:00
<LinearLayout
android:layout_marginStart="10dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
2019-09-06 17:55:14 +02:00
2017-08-28 09:20:19 +02:00
<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" />
2019-09-06 17:55:14 +02:00
2017-08-28 09:20:19 +02:00
<Button
android:layout_marginTop="5dp"
android:id="@+id/set_change_profile_picture"
android:textSize="12sp"
android:textAllCaps="false"
android:text="@string/choose_picture"
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"
2019-09-06 17:55:14 +02:00
android:hint="@string/set_profile_description" />
2017-08-28 09:20:19 +02:00
<!-- Header picture -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
2019-09-06 17:55:14 +02:00
2017-08-28 09:20:19 +02:00
<ImageView
android:scaleType="fitXY"
android:id="@+id/set_header_picture"
android:minHeight="100dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
2018-12-10 07:34:14 +01:00
android:contentDescription="@string/profile_banner" />
2019-09-06 17:55:14 +02:00
2017-08-28 09:20:19 +02:00
<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"
2019-09-06 17:55:14 +02:00
android:layout_height="match_parent" />
2017-08-28 09:20:19 +02:00
</LinearLayout>
2018-08-18 17:37:53 +02:00
2017-08-28 09:20:19 +02:00
<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"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
2018-08-18 17:37:53 +02:00
<LinearLayout
2019-09-25 11:43:31 +02:00
android:id="@+id/custom_fields_container"
android:visibility="gone"
2018-08-18 17:37:53 +02:00
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
2019-09-06 17:55:14 +02:00
2018-08-18 17:37:53 +02:00
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
2019-09-06 17:55:14 +02:00
2018-08-18 17:37:53 +02:00
<EditText
android:id="@+id/cf_key_1"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:inputType="text" />
2019-09-06 17:55:14 +02:00
2018-08-18 17:37:53 +02:00
<EditText
android:id="@+id/cf_val_1"
android:inputType="text"
android:layout_width="0dp"
android:layout_weight="2"
android:layout_height="wrap_content" />
</LinearLayout>
2019-09-06 17:55:14 +02:00
2018-08-18 17:37:53 +02:00
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
2019-09-06 17:55:14 +02:00
2018-08-18 17:37:53 +02:00
<EditText
android:id="@+id/cf_key_2"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:inputType="text" />
2019-09-06 17:55:14 +02:00
2018-08-18 17:37:53 +02:00
<EditText
android:id="@+id/cf_val_2"
android:inputType="text"
android:layout_width="0dp"
android:layout_weight="2"
android:layout_height="wrap_content" />
</LinearLayout>
2019-09-06 17:55:14 +02:00
2018-08-18 17:37:53 +02:00
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
2019-09-06 17:55:14 +02:00
2018-08-18 17:37:53 +02:00
<EditText
android:id="@+id/cf_key_3"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:inputType="text" />
2019-09-06 17:55:14 +02:00
2018-08-18 17:37:53 +02:00
<EditText
android:id="@+id/cf_val_3"
android:inputType="text"
android:layout_width="0dp"
android:layout_weight="2"
android:layout_height="wrap_content" />
</LinearLayout>
2019-09-06 17:55:14 +02:00
2018-08-18 17:37:53 +02:00
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
2019-09-06 17:55:14 +02:00
2018-08-18 17:37:53 +02:00
<EditText
android:id="@+id/cf_key_4"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:inputType="text" />
2019-09-06 17:55:14 +02:00
2018-08-18 17:37:53 +02:00
<EditText
android:id="@+id/cf_val_4"
android:inputType="text"
android:layout_width="0dp"
android:layout_weight="2"
android:layout_height="wrap_content" />
</LinearLayout>
</LinearLayout>
<!-- Lock the account -->
<CheckBox
android:layout_marginTop="10dp"
android:id="@+id/set_lock_account"
android:layout_width="wrap_content"
android:text="@string/set_lock_account"
android:layout_height="wrap_content" />
<!-- Sensitive content -->
<CheckBox
android:layout_marginTop="10dp"
android:id="@+id/set_sensitive_content"
android:layout_width="wrap_content"
android:text="@string/set_sensitive_content"
android:layout_height="wrap_content" />
2018-08-18 17:37:53 +02:00
2017-08-28 09:20:19 +02:00
<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>