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

111 lines
4.7 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>
-->
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:id="@+id/container"
android:layout_height="@dimen/nav_header_height"
>
<ImageView
android:id="@+id/back_ground_image"
android:layout_alignParentTop="true"
android:scaleType="centerCrop"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:contentDescription="@string/profile_banner" />
<LinearLayout
android:layout_alignParentTop="true"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/main_header_container"
android:gravity="center_vertical"
android:orientation="vertical"
android:padding="@dimen/activity_horizontal_margin"
android:theme="@style/ThemeOverlay.AppCompat.Dark">
<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:id="@+id/more_option_container"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:orientation="horizontal"
tools:ignore="UselessLeaf" >
</LinearLayout>
<ImageView
android:gravity="center_vertical|end"
android:src="@drawable/ic_more_vert"
android:id="@+id/header_option_menu"
android:layout_width="30dp"
android:layout_height="30dp"
android:contentDescription="@string/truncate_long_toots" />
</LinearLayout>
<LinearLayout
android:layout_marginTop="10dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
tools:ignore="UseCompoundDrawables">
<TextView
android:gravity="center_vertical"
android:id="@+id/displayedName"
android:textColor="?attr/textColor"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:textSize="18sp"
android:textAppearance="@style/TextAppearance.AppCompat.Body1" />
<android.support.v7.widget.AppCompatImageView
android:gravity="center_vertical"
android:layout_marginLeft="5dp"
android:layout_marginStart="5dp"
android:id="@+id/owner_accounts"
android:layout_width="30dp"
app:srcCompat="@drawable/ic_arrow_drop_down"
android:layout_height="30dp"
tools:ignore="ContentDescription,VectorDrawableCompat" />
</LinearLayout>
<TextView
android:id="@+id/username"
android:textColor="?attr/textColor"
android:layout_width="wrap_content"
android:textSize="12sp"
android:maxLines="1"
android:layout_height="wrap_content"
/>
<ImageView
android:layout_gravity="center_vertical|end"
android:src="@drawable/ic_info_outline"
android:id="@+id/header_option_info"
android:layout_width="20dp"
android:layout_height="20dp"
android:contentDescription="@string/information"/>
</LinearLayout>
</RelativeLayout>