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

284 lines
14 KiB
XML

<?xml version="1.0" encoding="utf-8"?><!--
Copyright 2020 Thomas Schneider
This file is a part of TubeLab
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.
TubeLab 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 TubeLab; if not,
see <http://www.gnu.org/licenses>.
-->
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
tools:context=".ShowAccountActivity">
<com.google.android.material.appbar.AppBarLayout
android:id="@+id/appBar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fitsSystemWindows="true">
<com.google.android.material.appbar.CollapsingToolbarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fitsSystemWindows="true"
app:expandedTitleMarginEnd="64dp"
app:expandedTitleMarginStart="48dp"
app:layout_scrollFlags="scroll">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/top_banner"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ImageView
android:id="@+id/banner_pp"
android:layout_width="match_parent"
android:layout_height="@dimen/layout_height_header"
android:contentDescription="@string/profile_banner"
android:scaleType="centerCrop"
android:src="@drawable/default_banner"
app:layout_collapseMode="parallax"
app:layout_constraintTop_toTopOf="parent" />
<ImageView
android:id="@+id/account_pp"
style="@style/Widget.AppCompat.Button.Colored"
android:layout_width="80dp"
android:layout_height="80dp"
android:layout_margin="10dp"
android:layout_marginTop="10dp"
android:background="@drawable/account_pp_border"
android:contentDescription="@string/profile_picture"
android:padding="2dp"
app:layout_constraintBottom_toBottomOf="@id/banner_pp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/banner_pp"
app:layout_scrollFlags="scroll" />
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="5dp"
android:padding="2dp"
app:layout_constraintBottom_toBottomOf="@id/banner_pp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/account_pp"
app:layout_constraintTop_toBottomOf="@id/banner_pp">
<LinearLayout
android:id="@+id/names_container"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<TextView
android:id="@+id/account_dn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:singleLine="true"
android:textAppearance="@style/TextAppearance.AppCompat.Body1"
android:textColor="@android:color/white"
android:textSize="18sp" />
<TextView
android:id="@+id/account_un"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:singleLine="true"
android:textColor="@android:color/white"
android:textSize="14sp" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
<ImageButton
android:id="@+id/account_follow"
style="@style/Widget.AppCompat.Button.Colored"
android:layout_width="45dp"
android:layout_height="45dp"
android:layout_marginStart="10dp"
android:layout_marginTop="10dp"
android:contentDescription="@string/make_an_action"
android:scaleType="fitCenter"
android:visibility="gone"
app:layout_constraintStart_toEndOf="@id/account_pp"
app:layout_constraintTop_toBottomOf="@id/banner_pp" />
<ImageButton
android:id="@+id/header_edit_profile"
style="@style/Widget.AppCompat.Button.Colored"
android:layout_width="45dp"
android:layout_height="45dp"
android:layout_marginStart="10dp"
android:layout_marginTop="10dp"
android:contentDescription="@string/edit_profile"
android:scaleType="fitCenter"
android:src="@drawable/ic_baseline_edit_24"
android:visibility="gone"
app:layout_constraintStart_toEndOf="@id/account_pp"
app:layout_constraintTop_toBottomOf="@id/banner_pp" />
<View
android:layout_width="match_parent"
android:layout_height="50dp"
android:alpha="0.4"
android:background="@android:color/black"
app:layout_constraintTop_toTopOf="parent" />
<ImageView
android:id="@+id/action_back"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_alignParentStart="true"
android:layout_marginStart="5dp"
android:layout_marginTop="10dp"
android:layout_marginEnd="10dp"
android:contentDescription="@string/go_back"
android:src="@drawable/ic_baseline_arrow_back_24"
android:tint="@android:color/white"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<LinearLayout
android:id="@+id/main_header_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/top_banner"
android:gravity="center"
android:orientation="vertical"
android:paddingTop="8dp"
app:layout_scrollFlags="scroll|enterAlways">
<TextView
android:id="@+id/account_note"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:gravity="center"
android:padding="10dp"
android:textColor="@android:color/white"
android:textIsSelectable="true"
android:visibility="gone" />
<HorizontalScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="2dp"
android:fillViewport="true"
android:scrollbars="none">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:orientation="horizontal">
<TextView
android:id="@+id/account_date"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="3dp"
android:layout_marginEnd="3dp"
android:background="@drawable/colored_border"
android:singleLine="true"
android:textColor="?colorAccent"
android:visibility="gone" />
<TextView
android:id="@+id/account_followed_by"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="3dp"
android:layout_marginEnd="3dp"
android:background="@drawable/colored_border"
android:singleLine="true"
android:text="@string/followed_by"
android:textColor="?colorAccent"
android:visibility="gone" />
</LinearLayout>
</HorizontalScrollView>
</LinearLayout>
</RelativeLayout>
</com.google.android.material.appbar.CollapsingToolbarLayout>
<androidx.appcompat.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:layout_width="match_parent"
android:layout_height="wrap_content"
android:animationCache="true"
android:orientation="horizontal"
android:visibility="gone"
tools:ignore="UseCompoundDrawables">
<ImageView
android:id="@+id/pp_actionBar"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_gravity="center_vertical"
android:layout_marginEnd="10dp"
android:contentDescription="@string/profile_picture"
android:gravity="center_vertical" />
<TextView
android:id="@+id/show_account_title"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginStart="5dp"
android:layout_weight="1"
android:singleLine="true"
android:textColor="@android:color/white"
android:textSize="14sp" />
</LinearLayout>
</androidx.appcompat.widget.Toolbar>
<com.google.android.material.tabs.TabLayout
android:id="@+id/account_tabLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:tabGravity="fill"
app:tabMode="fixed"
app:tabSelectedTextColor="?colorAccent"
app:tabTextColor="@android:color/white" />
</com.google.android.material.appbar.AppBarLayout>
<androidx.viewpager.widget.ViewPager
android:id="@+id/account_viewpager"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
</androidx.coordinatorlayout.widget.CoordinatorLayout>