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

403 lines
21 KiB
XML
Raw Normal View History

2017-05-05 16:36:04 +02:00
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2017 Thomas Schneider
2017-07-10 10:33:24 +02:00
This file is a part of Mastalab
2017-05-05 16:36:04 +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.
2017-07-10 10:33:24 +02:00
Mastalab is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
2017-05-05 16:36:04 +02:00
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
Public License for more details.
2017-08-04 11:11:27 +02:00
You should have received a copy of the GNU General Public License along with Mastalab; if not,
2017-05-05 16:36:04 +02:00
see <http://www.gnu.org/licenses>.
-->
2017-08-23 09:56:42 +02:00
<android.support.design.widget.CoordinatorLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
2017-05-05 16:36:04 +02:00
android:layout_width="match_parent"
android:layout_height="match_parent"
2017-10-14 10:14:55 +02:00
xmlns:app="http://schemas.android.com/apk/res-auto"
2017-08-23 09:56:42 +02:00
android:fitsSystemWindows="true"
tools:context="fr.gouv.etalab.mastodon.activities.ShowAccountActivity">
<android.support.design.widget.AppBarLayout
android:id="@+id/appBar"
2017-05-05 16:36:04 +02:00
android:layout_width="match_parent"
2017-05-26 17:20:36 +02:00
android:layout_height="wrap_content"
2017-08-23 09:56:42 +02:00
android:fitsSystemWindows="true"
android:theme="@style/AppTheme.AppBarOverlay">
<android.support.design.widget.CollapsingToolbarLayout
2017-07-31 19:29:14 +02:00
android:layout_width="match_parent"
2017-10-13 19:38:36 +02:00
android:id="@+id/collapsingToolbarLayout"
2017-10-15 15:09:09 +02:00
android:layout_height="wrap_content"
2017-08-23 09:56:42 +02:00
android:fitsSystemWindows="true"
2017-10-14 10:14:55 +02:00
app:expandedTitleMarginStart="48dp"
app:expandedTitleMarginEnd="64dp"
app:layout_scrollFlags="scroll">
2017-10-15 15:09:09 +02:00
<RelativeLayout
2017-08-23 09:56:42 +02:00
android:layout_width="match_parent"
2017-10-15 15:09:09 +02:00
android:layout_height="wrap_content">
<RelativeLayout
android:id="@+id/top_banner"
android:layout_width="match_parent"
android:layout_height="@dimen/layout_height_header">
<ImageView
android:id="@+id/banner_pp"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="centerCrop"
app:layout_collapseMode="parallax"
tools:ignore="ContentDescription" />
2017-12-02 12:23:38 +01:00
<ImageView
2017-12-09 12:14:36 +01:00
android:padding="1dp"
android:layout_margin="10dp"
2017-11-03 19:12:34 +01:00
android:id="@+id/account_pp"
2017-12-09 12:14:36 +01:00
android:layout_width="130dp"
android:layout_height="130dp"
2017-11-03 19:12:34 +01:00
app:layout_scrollFlags="scroll"
2017-12-09 12:14:36 +01:00
android:background="@drawable/circle_background_white"
2017-11-03 19:12:34 +01:00
android:layout_centerInParent="true"
2017-12-02 12:23:38 +01:00
tools:ignore="ContentDescription" />
2017-10-15 15:09:09 +02:00
<android.support.design.widget.FloatingActionButton
2017-11-03 19:12:34 +01:00
android:id="@+id/account_follow"
2017-10-15 15:09:09 +02:00
android:visibility="gone"
app:fabSize="mini"
android:textAllCaps="false"
2017-11-03 19:12:34 +01:00
android:layout_toRightOf="@id/account_pp"
android:layout_toEndOf="@id/account_pp"
app:layout_anchorGravity="center_vertical|right"
android:layout_centerVertical="true"
2017-10-15 15:09:09 +02:00
android:layout_marginEnd="10dp"
2017-11-03 19:12:34 +01:00
android:layout_marginRight="10dp"
2017-10-15 15:09:09 +02:00
android:layout_width="40dp"
android:layout_height="40dp"
/>
2017-11-03 19:12:34 +01:00
<android.support.design.widget.FloatingActionButton
android:id="@+id/header_edit_profile"
android:visibility="gone"
app:fabSize="mini"
android:textAllCaps="false"
android:src="@drawable/ic_edit"
android:layout_marginStart="-50dp"
android:layout_marginLeft="-50dp"
android:layout_marginTop="90dp"
android:layout_toRightOf="@id/account_pp"
android:layout_toEndOf="@id/account_pp"
android:layout_alignTop="@+id/account_pp"
android:layout_width="40dp"
android:layout_height="40dp" />
2017-10-15 15:09:09 +02:00
<ImageButton
android:id="@+id/account_menu"
android:background="?attr/selectableItemBackgroundBorderless"
android:layout_alignParentTop="true"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"
2017-10-28 17:59:50 +02:00
android:src="@drawable/ic_more_vert"
2017-10-15 15:09:09 +02:00
android:layout_marginRight="10dp"
android:layout_marginEnd="10dp"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_marginTop="5dp"
tools:ignore="ContentDescription" />
2017-10-15 15:09:09 +02:00
</RelativeLayout>
2017-07-31 20:18:14 +02:00
<LinearLayout
2017-10-15 15:09:09 +02:00
android:layout_below="@+id/top_banner"
android:id="@+id/main_header_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="8dp"
android:gravity="center"
app:layout_scrollFlags="scroll|enterAlways"
2017-10-15 15:09:09 +02:00
android:orientation="vertical">
2017-08-23 09:56:42 +02:00
<LinearLayout
2017-10-15 15:09:09 +02:00
android:id="@+id/header_container"
android:layout_marginTop="5dp"
2017-08-23 09:56:42 +02:00
android:layout_width="match_parent"
2017-10-15 15:09:09 +02:00
android:gravity="center"
android:orientation="horizontal"
2017-08-23 09:56:42 +02:00
android:layout_height="wrap_content"
android:baselineAligned="false">
2017-10-15 15:09:09 +02:00
<LinearLayout
android:layout_width="0dp"
android:layout_weight="1"
android:orientation="vertical"
android:layout_gravity="center_horizontal"
android:gravity="center_horizontal"
android:layout_height="wrap_content"
tools:ignore="UselessParent">
2017-10-15 15:09:09 +02:00
<TextView
android:id="@+id/account_dn"
2018-05-11 15:55:54 +02:00
android:textColor="?colorAccent"
2017-10-15 15:09:09 +02:00
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:maxLines="1"
android:textSize="16sp"
android:textAppearance="@style/TextAppearance.AppCompat.Body1" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:layout_marginLeft="10dp"
android:layout_marginStart="10dp"
android:textColor="?attr/color_in_account_header"
android:id="@+id/account_un"
android:maxLines="1"
android:layout_width="wrap_content"
android:textSize="14sp"
android:layout_height="wrap_content"
/>
</LinearLayout>
<TextView
android:id="@+id/temp_mute"
android:visibility="gone"
android:gravity="center"
android:textColor="@color/red"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
2017-10-15 15:09:09 +02:00
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:layout_marginStart="10dp"
android:layout_marginLeft="10dp"
android:visibility="gone"
android:id="@+id/account_followed_by"
android:layout_gravity="center"
android:gravity="center"
android:textColor="?attr/colorAccent"
android:text="@string/followed_by"
android:maxLines="1"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<TextView
android:id="@+id/account_follow_request"
android:layout_marginStart="10dp"
android:layout_marginLeft="10dp"
android:visibility="gone"
android:layout_gravity="center"
android:gravity="center"
android:textColor="?attr/colorAccent"
android:text="@string/request_sent"
android:maxLines="1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
/>
</LinearLayout>
<TextView
android:layout_marginTop="5dp"
android:textSize="16sp"
android:visibility="gone"
android:drawablePadding="4dp"
android:id="@+id/account_moved"
android:gravity="center"
android:layout_gravity="center"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
2017-10-15 15:09:09 +02:00
</LinearLayout>
2017-08-23 09:56:42 +02:00
</LinearLayout>
2017-10-15 15:09:09 +02:00
<TextView
android:id="@+id/account_note"
android:padding="10dp"
android:layout_marginTop="5dp"
android:gravity="center"
android:textColor="?attr/color_in_account_header"
android:layout_width="match_parent"
android:autoLink="web"
android:layout_height="wrap_content" />
<!-- Fields container -->
<LinearLayout
android:visibility="gone"
android:id="@+id/fields_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<!-- Fields 1 to 4 -->
<LinearLayout
android:id="@+id/field1"
android:visibility="gone"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:id="@+id/label1"
android:padding="5dp"
android:minHeight="20dp"
android:layout_gravity="center"
android:gravity="center"
android:textSize="16sp"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="match_parent" />
<TextView
android:id="@+id/value1"
android:layout_width="0dp"
android:layout_gravity="center"
android:gravity="center"
android:layout_weight="2"
android:layout_height="match_parent" />
</LinearLayout>
<LinearLayout
android:id="@+id/field2"
android:visibility="gone"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:id="@+id/label2"
android:padding="5dp"
android:minHeight="20dp"
android:layout_width="0dp"
android:textSize="16sp"
android:layout_gravity="center"
android:gravity="center"
android:layout_weight="1"
android:layout_height="match_parent" />
<TextView
android:id="@+id/value2"
android:layout_width="0dp"
android:layout_gravity="center"
android:gravity="center"
android:layout_weight="2"
android:layout_height="match_parent" />
</LinearLayout>
<LinearLayout
android:id="@+id/field3"
android:visibility="gone"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:id="@+id/label3"
android:padding="5dp"
android:minHeight="20dp"
android:textSize="16sp"
android:layout_gravity="center"
android:gravity="center"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="match_parent" />
<TextView
android:id="@+id/value3"
android:layout_gravity="center"
android:gravity="center"
android:layout_width="0dp"
android:layout_weight="2"
android:layout_height="match_parent" />
</LinearLayout>
<LinearLayout
android:id="@+id/field4"
android:visibility="gone"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:id="@+id/label4"
android:padding="5dp"
android:minHeight="20dp"
android:textSize="16sp"
android:layout_gravity="center"
android:gravity="center"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="match_parent" />
<TextView
android:id="@+id/value4"
android:layout_gravity="center"
android:gravity="center"
android:layout_width="0dp"
android:layout_weight="2"
android:layout_height="match_parent" />
</LinearLayout>
</LinearLayout>
<!-- End Fields container -->
2017-07-31 20:18:14 +02:00
</LinearLayout>
2017-10-15 15:09:09 +02:00
</RelativeLayout>
2017-10-14 10:14:55 +02:00
2017-10-15 15:09:09 +02:00
</android.support.design.widget.CollapsingToolbarLayout>
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
2017-10-14 11:09:12 +02:00
android:layout_width="match_parent"
android:layout_height="wrap_content"
2017-10-15 15:09:09 +02:00
android:minHeight="?attr/actionBarSize"
app:layout_collapseMode="pin"
app:theme="@style/ThemeOverlay.AppCompat.Light"
>
<LinearLayout
android:id="@+id/toolbar_content"
android:animationCache="true"
2017-11-09 19:09:00 +01:00
android:visibility="gone"
2017-10-14 11:09:12 +02:00
android:layout_width="match_parent"
android:layout_height="wrap_content"
2017-10-15 15:09:09 +02:00
android:orientation="horizontal">
<ImageView
android:id="@+id/pp_actionBar"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_gravity="center_vertical"
android:gravity="center_vertical"
android:layout_marginEnd="10dp"
android:layout_marginRight="10dp"
tools:ignore="ContentDescription" />
<TextView
android:layout_marginLeft="5dp"
android:layout_marginStart="5dp"
android:layout_gravity="center_vertical"
android:id="@+id/show_account_title"
android:maxLines="1"
2017-10-30 13:26:22 +01:00
android:layout_width="0dp"
android:layout_weight="1"
2017-10-15 15:09:09 +02:00
android:layout_height="wrap_content"
android:textSize="14sp"
android:textColor="?attr/actionBarTextColor"
/>
2017-10-30 13:26:22 +01:00
<ImageButton
android:background="?attr/selectableItemBackgroundBorderless"
android:id="@+id/action_more"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_gravity="center"
android:src="@drawable/ic_more_vert"
android:layout_marginEnd="10dp"
android:layout_marginRight="10dp"
android:gravity="center"
tools:ignore="ContentDescription" />
2017-10-15 15:09:09 +02:00
</LinearLayout>
<TextView
android:id="@+id/warning_message"
android:visibility="gone"
android:gravity="center"
android:layout_gravity="center"
android:textColor="@color/dark_text"
android:text="@string/disclaimer_full"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
2017-10-15 15:09:09 +02:00
</android.support.v7.widget.Toolbar>
2017-10-14 10:14:55 +02:00
<android.support.design.widget.TabLayout
android:id="@+id/account_tabLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:tabTextAppearance="@android:style/TextAppearance.Widget.TabWidget"
app:tabMode="fixed"
app:tabGravity="fill"
/>
2017-05-05 16:36:04 +02:00
</android.support.design.widget.AppBarLayout>
2017-10-14 11:09:12 +02:00
2017-08-23 09:56:42 +02:00
<android.support.v4.view.ViewPager
android:id="@+id/account_viewpager"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
/>
2017-11-03 19:12:34 +01:00
2017-08-23 09:56:42 +02:00
</android.support.design.widget.CoordinatorLayout>