Twidere-App-Android-Twitter.../twidere/src/main/res/layout/header_drawer_account_selec...

222 lines
10 KiB
XML
Raw Normal View History

2015-05-04 08:23:47 +02:00
<?xml version="1.0" encoding="utf-8"?><!--
~ Twidere - Twitter client for Android
~
~ Copyright (C) 2012-2014 Mariotaku Lee <mariotaku.lee@gmail.com>
~
~ 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.
~
~ This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
-->
<org.mariotaku.twidere.view.AccountDashboardHeaderView
2016-03-14 09:17:46 +01:00
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"
2017-08-22 11:10:09 +02:00
android:id="@+id/accountDashboardHeader"
android:layout_width="match_parent"
2015-03-21 15:53:26 +01:00
android:layout_height="wrap_content"
android:descendantFocusability="blocksDescendants"
app:sizeMeasurementId="@+id/profileContainer"
2015-03-21 15:53:26 +01:00
tools:layout_height="160dp"
tools:layout_width="280dp">
2016-03-24 02:27:51 +01:00
<ViewSwitcher
2016-06-29 15:47:52 +02:00
android:id="@+id/accountProfileBanner"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignBottom="@+id/profileContainer"
android:layout_alignTop="@+id/profileContainer"
android:contentDescription="@string/profile_banner"
android:focusable="false"
2015-08-13 05:27:53 +02:00
android:foreground="@color/drawer_banner_foreground"
2016-03-24 02:27:51 +01:00
tools:background="@drawable/nyan_stars_background"/>
<FrameLayout
2016-06-29 15:47:52 +02:00
android:id="@+id/profileContainer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:focusable="false"
android:foreground="?selectableItemBackground">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:focusable="false"
android:paddingBottom="@dimen/element_spacing_normal"
android:paddingTop="@dimen/element_spacing_normal">
2017-03-02 07:59:19 +01:00
<org.mariotaku.twidere.view.ProfileImageView
2016-06-29 15:47:52 +02:00
android:id="@+id/profileImage"
2017-03-02 07:59:19 +01:00
style="?profileImageStyle"
android:layout_width="@dimen/icon_size_profile_image_dashboard_current"
android:layout_height="@dimen/icon_size_profile_image_dashboard_current"
android:layout_marginBottom="@dimen/element_spacing_mlarge"
2016-12-05 08:20:57 +01:00
android:layout_marginLeft="@dimen/element_spacing_large"
android:layout_marginStart="@dimen/element_spacing_large"
android:layout_marginTop="@dimen/element_spacing_mlarge"
android:focusable="false"
2017-03-02 07:59:19 +01:00
app:sivBorder="true"
app:sivBorderWidth="2dp"
2016-12-12 14:03:58 +01:00
tools:src="@drawable/ic_profile_image_twidere"/>
2016-12-05 04:39:22 +01:00
<org.mariotaku.twidere.view.ExtendedViewPager
2016-06-29 15:47:52 +02:00
android:id="@+id/otherAccountsList"
android:layout_width="wrap_content"
android:layout_height="52dp"
2016-06-29 15:47:52 +02:00
android:layout_alignBottom="@id/profileImage"
android:layout_alignTop="@id/profileImage"
android:layout_marginBottom="@dimen/element_spacing_large"
2016-12-05 08:20:57 +01:00
android:layout_toEndOf="@+id/hasPrevAccountIndicator"
android:layout_toLeftOf="@+id/hasNextAccountIndicator"
android:layout_toRightOf="@+id/hasPrevAccountIndicator"
android:layout_toStartOf="@+id/hasNextAccountIndicator"
2015-08-13 05:27:53 +02:00
android:focusable="false"
android:overScrollMode="never"
2016-03-24 02:27:51 +01:00
tools:listitem="@layout/adapter_item_dashboard_account"
tools:paddingStart="@dimen/element_spacing_large"
tools:visibility="visible"/>
2016-12-05 08:20:57 +01:00
<ImageButton
android:id="@+id/hasNextAccountIndicator"
android:layout_width="@dimen/element_spacing_large"
android:layout_height="wrap_content"
android:layout_alignBottom="@+id/otherAccountsList"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_alignTop="@+id/otherAccountsList"
android:background="?selectableItemBackgroundBorderless"
2016-12-06 06:15:22 +01:00
android:contentDescription="@string/next_item"
2016-12-05 08:20:57 +01:00
android:scaleType="centerInside"
android:src="@drawable/ic_indicator_arrow_next"/>
<ImageButton
android:id="@+id/hasPrevAccountIndicator"
android:layout_width="@dimen/element_spacing_large"
android:layout_height="wrap_content"
android:layout_alignBottom="@+id/otherAccountsList"
android:layout_alignTop="@+id/otherAccountsList"
android:layout_toEndOf="@id/profileImage"
android:layout_toRightOf="@id/profileImage"
android:background="?selectableItemBackgroundBorderless"
2016-12-06 06:15:22 +01:00
android:contentDescription="@string/previous_item"
2016-12-05 08:20:57 +01:00
android:scaleType="centerInside"
android:src="@drawable/ic_indicator_arrow_prev"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignParentBottom="true"
2016-06-29 15:47:52 +02:00
android:layout_below="@id/profileImage"
2016-12-05 08:20:57 +01:00
android:layout_marginEnd="@dimen/element_spacing_large"
android:layout_marginLeft="@dimen/element_spacing_large"
android:layout_marginRight="@dimen/element_spacing_large"
android:layout_marginStart="@dimen/element_spacing_large"
android:baselineAligned="false"
android:focusable="false"
android:gravity="center_vertical"
android:orientation="horizontal">
2020-05-15 10:16:02 +02:00
<RelativeLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:focusable="false"
android:orientation="vertical">
<org.mariotaku.twidere.view.FixedTextView
2020-05-15 10:16:02 +02:00
android:layout_alignParentTop="true"
android:layout_alignParentStart="true"
android:id="@+id/name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
2016-12-09 06:53:02 +01:00
android:ellipsize="end"
android:focusable="false"
2016-12-05 08:20:57 +01:00
android:maxLines="1"
android:textAppearance="?android:textAppearanceSmall"
2016-03-14 09:17:46 +01:00
android:textColor="@android:color/white"
android:textStyle="bold"
2016-03-14 09:17:46 +01:00
tools:text="Name"/>
<org.mariotaku.twidere.view.FixedTextView
2020-05-15 10:16:02 +02:00
android:layout_below="@id/name"
android:layout_toEndOf="@id/user_type"
2016-06-29 15:47:52 +02:00
android:id="@+id/screenName"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
2016-12-09 06:53:02 +01:00
android:ellipsize="end"
android:focusable="false"
2016-12-05 08:20:57 +01:00
android:maxLines="1"
android:textAppearance="?android:textAppearanceSmall"
2016-05-17 06:51:35 +02:00
android:textColor="@color/material_grey"
2016-03-14 09:17:46 +01:00
tools:text="\@username"/>
2020-05-15 10:16:02 +02:00
<org.mariotaku.twidere.view.FixedTextView
android:layout_alignParentStart="true"
android:layout_below="@id/name"
android:id="@+id/user_type"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ellipsize="end"
android:focusable="false"
android:maxLines="1"
android:textAppearance="?android:textAppearanceSmall"
android:textColor="@color/material_grey"
tools:text="twidere"/>
</RelativeLayout>
<FrameLayout
android:layout_width="wrap_content"
android:layout_height="@dimen/element_size_normal"
2016-03-24 02:27:51 +01:00
android:focusable="false"
android:foregroundGravity="center"
tools:foreground="@drawable/ic_action_status_compose">
2020-01-26 08:35:15 +01:00
<androidx.appcompat.widget.ActionMenuView
2016-06-29 15:47:52 +02:00
android:id="@+id/accountDashboardMenu"
android:layout_width="match_parent"
android:layout_height="match_parent"
2017-01-31 15:28:26 +01:00
android:focusable="true"/>
</FrameLayout>
</LinearLayout>
</RelativeLayout>
2015-03-21 15:53:26 +01:00
2017-03-02 10:23:34 +01:00
<org.mariotaku.twidere.view.ShapedImageView
2016-06-29 15:47:52 +02:00
android:id="@+id/floatingProfileImageSnapshot"
2015-03-21 15:53:26 +01:00
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:focusable="false"
2015-03-21 15:53:26 +01:00
android:scaleType="fitCenter"
android:visibility="invisible"
2016-03-14 09:17:46 +01:00
tools:ignore="ContentDescription"/>
</FrameLayout>
2015-05-17 18:06:40 +02:00
<FrameLayout
2016-06-29 15:47:52 +02:00
android:id="@+id/noAccountContainer"
2015-05-17 18:06:40 +02:00
android:layout_width="match_parent"
android:layout_height="wrap_content"
2016-06-29 15:47:52 +02:00
android:layout_alignBottom="@+id/profileContainer"
android:layout_alignTop="@+id/profileContainer"
2015-08-13 05:27:53 +02:00
android:clickable="true"
2017-08-22 11:10:09 +02:00
android:focusable="true"
2015-08-13 05:27:53 +02:00
tools:visibility="gone">
2015-05-17 18:06:40 +02:00
<org.mariotaku.twidere.view.FixedTextView
2015-05-17 18:06:40 +02:00
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
2017-01-26 14:28:43 +01:00
android:text="@string/message_toast_no_account"/>
2015-05-17 18:06:40 +02:00
</FrameLayout>
</org.mariotaku.twidere.view.AccountDashboardHeaderView>