fedilab-Android-App/app/src/main/res/layouts/mastodon/layout/activity_admin_account.xml

484 lines
23 KiB
XML

<?xml version="1.0" encoding="utf-8"?><!--
Copyright 2022 Thomas Schneider
This file is a part of Fedilab
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.
Fedilab 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 Fedilab; 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=".mastodon.activities.ProfileActivity">
<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:contentScrim="?colorPrimary"
app:expandedTitleGravity="top"
app:expandedTitleMarginEnd="64dp"
app:expandedTitleMarginStart="48dp"
app:layout_scrollFlags="scroll|exitUntilCollapsed">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="?attr/actionBarSize"
app:layout_collapseMode="parallax">
<com.google.android.material.card.MaterialCardView
android:id="@+id/banner_container"
android:layout_width="match_parent"
android:layout_height="@dimen/layout_height_header"
android:layout_margin="6dp"
app:cardElevation="4dp"
app:layout_constraintTop_toTopOf="parent">
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/banner_pp"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:contentDescription="@string/profile_banner"
android:scaleType="centerCrop"
android:src="@drawable/default_banner"
tools:src="@tools:sample/backgrounds/scenic" />
</com.google.android.material.card.MaterialCardView>
<com.google.android.material.card.MaterialCardView
android:id="@+id/avatar_container"
android:layout_width="108dp"
android:layout_height="108dp"
app:cardElevation="6dp"
app:layout_constraintEnd_toEndOf="@id/banner_container"
app:layout_constraintStart_toStartOf="@id/banner_container"
app:layout_constraintTop_toTopOf="@id/banner_container">
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/account_pp"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="3dp"
android:contentDescription="@string/profile_picture"
android:scaleType="centerCrop"
android:transitionName="@string/activity_porfile_pp"
app:layout_scrollFlags="scroll"
tools:src="@tools:sample/avatars" />
</com.google.android.material.card.MaterialCardView>
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/account_dn"
style="@style/TextAppearance.AppCompat.Headline"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="6dp"
android:elevation="5dp"
android:singleLine="true"
app:layout_constraintEnd_toEndOf="@id/banner_container"
app:layout_constraintStart_toStartOf="@id/banner_container"
app:layout_constraintTop_toBottomOf="@id/avatar_container"
tools:text="@tools:sample/first_names" />
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/account_un"
style="@style/TextAppearance.AppCompat.Caption"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="3dp"
android:elevation="5dp"
android:singleLine="true"
app:layout_constraintEnd_toEndOf="@id/banner_container"
app:layout_constraintStart_toStartOf="@id/banner_container"
app:layout_constraintTop_toBottomOf="@id/account_dn"
tools:text="\@username\@instance.test" />
<LinearLayout
android:id="@+id/main_header_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:orientation="vertical"
android:paddingTop="8dp"
android:paddingBottom="?actionBarSize"
app:layout_collapseMode="parallax"
app:layout_constraintTop_toBottomOf="@id/account_un">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="5dp">
<LinearLayout
android:id="@+id/names_container"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:gravity="center_horizontal"
android:orientation="vertical"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:background="@drawable/red_border"
android:text="Peertube"
android:textColor="?colorError"
android:visibility="gone"
tools:ignore="HardcodedText" />
<TextView
android:id="@+id/account_bot"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:background="@drawable/blue_border"
android:text="@string/bot"
android:textColor="?colorPrimary"
android:visibility="gone" />
<TextView
android:id="@+id/account_moved"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginTop="5dp"
android:drawablePadding="4dp"
android:gravity="center"
android:textSize="16sp"
android:visibility="gone" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
<HorizontalScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="10dp"
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/instance_info"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="3dp"
android:layout_marginEnd="3dp"
android:background="@drawable/blue_border"
android:singleLine="true"
android:textColor="?colorPrimary"
android:visibility="gone" />
<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/blue_border"
android:singleLine="true"
android:textColor="?colorPrimary"
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/green_border"
android:singleLine="true"
android:text="@string/followed_by"
android:textColor="@color/verified_text"
android:visibility="gone" />
<TextView
android:id="@+id/account_follow_request"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="3dp"
android:layout_marginEnd="3dp"
android:background="@drawable/blue_border"
android:singleLine="true"
android:text="@string/request_sent"
android:textColor="?colorPrimary"
android:visibility="gone" />
</LinearLayout>
</HorizontalScrollView>
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
app:layout_collapseMode="pin">
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/profile_picture"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_marginEnd="10dp"
android:contentDescription="@string/profile_picture" />
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/title"
style="@style/TextAppearance.AppCompat.Title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:ellipsize="end"
android:singleLine="true" />
</androidx.appcompat.widget.Toolbar>
</com.google.android.material.appbar.CollapsingToolbarLayout>
</com.google.android.material.appbar.AppBarLayout>
<ScrollView
android:id="@+id/account_info"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/fab_margin"
android:orientation="vertical"
app:layout_behavior="@string/appbar_scrolling_view_behavior">
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:orientation="horizontal">
<androidx.appcompat.widget.AppCompatTextView
android:layout_width="120dp"
android:layout_height="wrap_content"
android:ellipsize="end"
android:lines="1"
android:text="@string/username" />
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/username"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
</androidx.appcompat.widget.LinearLayoutCompat>
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:orientation="horizontal">
<androidx.appcompat.widget.AppCompatTextView
android:layout_width="120dp"
android:layout_height="wrap_content"
android:ellipsize="end"
android:lines="1"
android:text="@string/domain" />
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/domain"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
</androidx.appcompat.widget.LinearLayoutCompat>
<androidx.appcompat.widget.LinearLayoutCompat
android:id="@+id/email_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:orientation="horizontal">
<androidx.appcompat.widget.AppCompatTextView
android:layout_width="120dp"
android:layout_height="wrap_content"
android:ellipsize="end"
android:lines="1"
android:text="@string/email" />
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/email"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
</androidx.appcompat.widget.LinearLayoutCompat>
<androidx.appcompat.widget.LinearLayoutCompat
android:id="@+id/last_active_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:orientation="horizontal">
<androidx.appcompat.widget.AppCompatTextView
android:layout_width="120dp"
android:layout_height="wrap_content"
android:ellipsize="end"
android:lines="1"
android:text="@string/last_active" />
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/last_active"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
</androidx.appcompat.widget.LinearLayoutCompat>
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:orientation="horizontal">
<androidx.appcompat.widget.AppCompatTextView
android:layout_width="120dp"
android:layout_height="wrap_content"
android:ellipsize="end"
android:lines="1"
android:text="@string/approved" />
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/approved"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
<com.google.android.material.button.MaterialButton
android:id="@+id/approve_action"
style="@style/Widget.Material3.Button.OutlinedButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="5dp"
android:text="@string/approve" />
</androidx.appcompat.widget.LinearLayoutCompat>
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:orientation="horizontal">
<androidx.appcompat.widget.AppCompatTextView
android:layout_width="120dp"
android:layout_height="wrap_content"
android:ellipsize="end"
android:lines="1"
android:text="@string/disabled" />
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/disabled"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
<com.google.android.material.button.MaterialButton
android:id="@+id/disable_action"
style="@style/Widget.Material3.Button.OutlinedButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="5dp"
android:text="@string/disable" />
</androidx.appcompat.widget.LinearLayoutCompat>
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:orientation="horizontal">
<androidx.appcompat.widget.AppCompatTextView
android:layout_width="120dp"
android:layout_height="wrap_content"
android:ellipsize="end"
android:lines="1"
android:text="@string/silence" />
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/silenced"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
<com.google.android.material.button.MaterialButton
android:id="@+id/silence_action"
style="@style/Widget.Material3.Button.OutlinedButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="5dp"
android:text="@string/silence" />
</androidx.appcompat.widget.LinearLayoutCompat>
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:orientation="horizontal">
<androidx.appcompat.widget.AppCompatTextView
android:layout_width="120dp"
android:layout_height="wrap_content"
android:ellipsize="end"
android:lines="1"
android:text="@string/suspended" />
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/suspended"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
<com.google.android.material.button.MaterialButton
android:id="@+id/suspend_action"
style="@style/Widget.Material3.Button.OutlinedButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="5dp"
android:text="@string/suspend" />
</androidx.appcompat.widget.LinearLayoutCompat>
</androidx.appcompat.widget.LinearLayoutCompat>
</ScrollView>
</androidx.coordinatorlayout.widget.CoordinatorLayout>