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

125 lines
4.8 KiB
XML

<?xml version="1.0" encoding="utf-8"?><!--
Copyright 2017 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>
-->
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/container"
android:layout_width="match_parent"
android:layout_height="@dimen/nav_header_height"
android:background="?colorPrimaryDark">
<ImageView
android:id="@+id/back_ground_image"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignParentTop="true"
android:contentDescription="@string/profile_banner"
android:scaleType="centerCrop" />
<LinearLayout
android:id="@+id/main_header_container"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignParentTop="true"
android:gravity="center_vertical"
android:orientation="vertical"
android:padding="@dimen/activity_horizontal_margin">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:gravity="center_vertical"
android:orientation="horizontal">
<ImageView
android:id="@+id/profilePicture"
android:layout_width="60dp"
android:layout_height="60dp"
android:contentDescription="@string/profile_picture" />
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="20dp"
android:layout_weight="1"
android:orientation="horizontal"
tools:ignore="UselessLeaf" />
<LinearLayout
android:id="@+id/more_account_container"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="20dp"
android:layout_weight="1"
android:orientation="horizontal"
tools:ignore="UselessLeaf" />
<ImageView
android:id="@+id/header_option_menu"
android:layout_width="30dp"
android:layout_height="30dp"
android:contentDescription="@string/display_more_options"
android:gravity="center_vertical|end"
android:src="@drawable/ic_more_vert"
android:tint="?attr/iconColorMenu" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:orientation="horizontal"
tools:ignore="UseCompoundDrawables">
<TextView
android:id="@+id/displayedName"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center_vertical"
android:textSize="18sp" />
<ImageView
android:id="@+id/owner_accounts"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_marginStart="5dp"
android:gravity="center_vertical"
android:src="@drawable/ic_arrow_drop_down"
android:tint="?attr/iconColorMenu"
tools:ignore="ContentDescription" />
</LinearLayout>
<TextView
android:id="@+id/username"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:singleLine="true"
android:textSize="12sp" />
<ImageView
android:id="@+id/header_option_info"
android:layout_width="20dp"
android:layout_height="20dp"
android:layout_gravity="center_vertical|end"
android:contentDescription="@string/information"
android:src="@drawable/ic_info_outline"
android:tint="?attr/iconColorMenu" />
</LinearLayout>
</RelativeLayout>