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

451 lines
23 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2017 Thomas Schneider
This file is a part of Mastalab
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.
Mastalab 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 Mastalab; if not,
see <http://www.gnu.org/licenses>.
-->
<android.support.design.widget.CoordinatorLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:fitsSystemWindows="true"
tools:context="fr.gouv.etalab.mastodon.activities.ShowAccountActivity">
<android.support.design.widget.AppBarLayout
android:id="@+id/appBar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fitsSystemWindows="true"
android:theme="@style/AppTheme.AppBarOverlay">
<android.support.design.widget.CollapsingToolbarLayout
android:layout_width="match_parent"
android:id="@+id/collapsingToolbarLayout"
android:layout_height="wrap_content"
android:fitsSystemWindows="true"
app:expandedTitleMarginStart="48dp"
app:expandedTitleMarginEnd="64dp"
app:layout_scrollFlags="scroll">
<RelativeLayout
android:layout_width="match_parent"
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"
android:contentDescription="@string/profile_banner"/>
<ImageView
android:padding="1dp"
android:layout_margin="10dp"
android:id="@+id/account_pp"
android:layout_width="130dp"
android:layout_height="130dp"
app:layout_scrollFlags="scroll"
android:background="@drawable/circle_background_white"
android:layout_centerInParent="true"
android:contentDescription="@string/profile_picture" />
<android.support.design.widget.FloatingActionButton
android:id="@+id/account_follow"
android:visibility="gone"
app:fabSize="mini"
android:textAllCaps="false"
android:layout_toRightOf="@id/account_pp"
android:layout_toEndOf="@id/account_pp"
app:layout_anchorGravity="center_vertical|right"
android:layout_centerVertical="true"
android:layout_marginEnd="10dp"
android:layout_marginRight="10dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
/>
<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="wrap_content"
android:layout_height="wrap_content" />
<ImageButton
android:id="@+id/account_menu"
android:background="?attr/selectableItemBackgroundBorderless"
android:layout_alignParentTop="true"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"
android:src="@drawable/ic_more_vert"
android:layout_marginRight="10dp"
android:layout_marginEnd="10dp"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_marginTop="5dp"
android:contentDescription="@string/open_menu" />
</RelativeLayout>
<LinearLayout
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"
android:orientation="vertical">
<LinearLayout
android:id="@+id/header_container"
android:layout_marginTop="5dp"
android:layout_width="match_parent"
android:gravity="center"
android:orientation="horizontal"
android:layout_height="wrap_content"
android:baselineAligned="false">
<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">
<TextView
android:id="@+id/account_dn"
android:textColor="?colorAccent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:maxLines="1"
android:textSize="16sp"
android:textAppearance="@style/TextAppearance.AppCompat.Body1" />
<TextView
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"
/>
<TextView
android:layout_marginTop="5dp"
android:visibility="gone"
android:textColor="@color/red_1"
android:background="@drawable/red_border"
android:text="Peertube"
android:id="@+id/account_type"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<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" />
<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" />
</LinearLayout>
</LinearLayout>
<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:paddingTop="10dp"
android:paddingBottom="10dp"
android:textSize="16sp"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="match_parent" />
<LinearLayout
android:layout_width="0dp"
android:layout_weight="2"
android:id="@+id/value1BG"
android:layout_height="match_parent"
android:orientation="vertical">
<TextView
android:id="@+id/value1"
android:layout_gravity="center"
android:gravity="center"
android:paddingTop="10dp"
android:paddingBottom="10dp"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</LinearLayout>
</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="10dp"
android:minHeight="20dp"
android:layout_width="0dp"
android:textSize="16sp"
android:paddingTop="5dp"
android:paddingBottom="5dp"
android:layout_gravity="center"
android:gravity="center"
android:layout_weight="1"
android:layout_height="match_parent" />
<LinearLayout
android:layout_width="0dp"
android:layout_weight="2"
android:id="@+id/value2BG"
android:layout_height="match_parent"
android:orientation="vertical">
<TextView
android:id="@+id/value2"
android:layout_gravity="center"
android:gravity="center"
android:paddingTop="10dp"
android:paddingBottom="10dp"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</LinearLayout>
</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="10dp"
android:minHeight="20dp"
android:textSize="16sp"
android:layout_gravity="center"
android:gravity="center"
android:layout_width="0dp"
android:layout_weight="1"
android:paddingTop="5dp"
android:paddingBottom="5dp"
android:layout_height="match_parent" />
<LinearLayout
android:layout_width="0dp"
android:layout_weight="2"
android:layout_height="match_parent"
android:id="@+id/value3BG"
android:orientation="vertical">
<TextView
android:id="@+id/value3"
android:layout_gravity="center"
android:gravity="center"
android:paddingTop="10dp"
android:paddingBottom="10dp"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</LinearLayout>
</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="10dp"
android:minHeight="20dp"
android:textSize="16sp"
android:layout_gravity="center"
android:gravity="center"
android:layout_width="0dp"
android:paddingTop="5dp"
android:paddingBottom="5dp"
android:layout_weight="1"
android:layout_height="match_parent" />
<LinearLayout
android:layout_width="0dp"
android:layout_weight="2"
android:layout_height="match_parent"
android:id="@+id/value4BG"
android:orientation="vertical">
<TextView
android:id="@+id/value4"
android:layout_gravity="center"
android:gravity="center"
android:paddingTop="10dp"
android:paddingBottom="10dp"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
<!-- End Fields container -->
</LinearLayout>
</RelativeLayout>
</android.support.design.widget.CollapsingToolbarLayout>
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="?attr/actionBarSize"
app:layout_collapseMode="pin"
app:theme="@style/ThemeOverlay.AppCompat.Light"
>
<LinearLayout
android:id="@+id/toolbar_content"
android:animationCache="true"
android:visibility="gone"
android:layout_width="match_parent"
android:layout_height="wrap_content"
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"
android:contentDescription="@string/profile_picture" />
<TextView
android:layout_marginLeft="5dp"
android:layout_marginStart="5dp"
android:layout_gravity="center_vertical"
android:id="@+id/show_account_title"
android:maxLines="1"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:textSize="14sp"
android:textColor="?attr/actionBarTextColor"
/>
<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"
android:contentDescription="@string/display_toot_truncate" />
</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" />
</android.support.v7.widget.Toolbar>
<android.support.design.widget.TabLayout
android:id="@+id/account_tabLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:tabSelectedTextColor="?attr/colorAccent"
app:tabTextColor="?attr/textColor"
app:tabMode="fixed"
app:tabGravity="fill"
/>
</android.support.design.widget.AppBarLayout>
<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"
/>
</android.support.design.widget.CoordinatorLayout>