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

427 lines
19 KiB
XML

<?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/>.
-->
<RelativeLayout
android:id="@+id/headerUserProfile"
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="wrap_content"
tools:showIn="@layout/fragment_user">
<org.mariotaku.twidere.view.ProfileBannerSpace
android:id="@+id/profileBannerSpace"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
<View
android:id="@+id/profileNameBackground"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignBottom="@+id/profileNameContainer"
android:layout_alignTop="@+id/profileNameContainer"/>
<org.mariotaku.twidere.view.ColorLabelRelativeLayout
android:id="@+id/profileNameContainer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignWithParentIfMissing="true"
android:layout_below="@+id/profileBannerSpace"
android:layout_toEndOf="@+id/profileImage"
android:layout_toRightOf="@+id/profileImage"
android:minWidth="48dp"
android:orientation="vertical"
android:paddingBottom="@dimen/element_spacing_xsmall"
android:paddingLeft="@dimen/element_spacing_small"
android:paddingRight="@dimen/element_spacing_small"
android:paddingTop="@dimen/element_spacing_xsmall"
app:ignorePadding="true">
<FrameLayout
android:id="@+id/followContainer"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_centerInParent="true"
android:minHeight="@dimen/element_size_normal"
android:minWidth="@dimen/element_size_normal">
<Button
android:id="@+id/follow"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:visibility="gone"
tools:text="@string/action_follow"
tools:visibility="visible"/>
<ProgressBar
android:id="@+id/followProgress"
style="?android:progressBarStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:visibility="gone"/>
</FrameLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_toLeftOf="@+id/followContainer"
android:layout_toStartOf="@+id/followContainer"
android:gravity="center_vertical"
android:minHeight="@dimen/element_size_normal"
android:orientation="vertical">
<TextView
android:id="@+id/name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ellipsize="end"
android:maxLines="1"
android:textAppearance="?android:textAppearanceMedium"
android:textColor="?android:textColorPrimary"
tools:text="Name"/>
<TextView
android:id="@+id/screenName"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/name"
android:ellipsize="end"
android:maxLines="1"
android:textAppearance="?android:textAppearanceSmall"
android:textColor="?android:textColorPrimary"
tools:text="\@screenname"/>
<TextView
android:id="@+id/followingYouIndicator"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="@+id/screenName"
android:layout_marginLeft="@dimen/element_spacing_small"
android:layout_marginStart="@dimen/element_spacing_small"
android:layout_toEndOf="@+id/screenName"
android:layout_toRightOf="@+id/screenName"
android:ellipsize="end"
android:maxLines="1"
android:text="@string/following_you"
android:textAppearance="?android:textAppearanceSmall"
android:textColor="?android:textColorSecondary"
android:visibility="gone"/>
</RelativeLayout>
</org.mariotaku.twidere.view.ColorLabelRelativeLayout>
<View
android:layout_width="match_parent"
android:layout_height="@dimen/element_spacing_xsmall"
android:layout_above="@+id/profileNameContainer"
android:background="@drawable/shadow_top"/>
<FrameLayout
android:id="@+id/profileDetailsContainer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/profileNameContainer">
<LinearLayout
android:id="@+id/cardContent"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:splitMotionEvents="false">
<LinearLayout
android:id="@+id/descriptionContainer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?selectableItemBackground"
android:clickable="true"
android:orientation="vertical"
android:padding="@dimen/element_spacing_small">
<org.mariotaku.twidere.view.TimelineContentTextView
android:id="@+id/description"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="@dimen/element_spacing_small"
android:paddingRight="@dimen/element_spacing_small"
android:textAppearance="?android:textAppearanceSmall"
android:textColor="?android:textColorPrimary"
tools:text="Line 1\nLine 2\nLine 3"/>
</LinearLayout>
<LinearLayout
android:id="@+id/locationContainer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?selectableItemBackground"
android:clickable="true"
android:gravity="center_vertical"
android:orientation="horizontal"
android:padding="@dimen/element_spacing_small">
<org.mariotaku.twidere.view.IconActionView
android:layout_width="@dimen/element_size_small"
android:layout_height="@dimen/element_size_small"
android:color="?android:textColorPrimary"
android:src="@drawable/ic_action_location"/>
<TextView
android:id="@+id/location"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ellipsize="end"
android:maxLines="1"
android:paddingLeft="@dimen/element_spacing_small"
android:paddingRight="@dimen/element_spacing_small"
android:textAppearance="?android:textAppearanceSmall"
android:textColor="?android:textColorPrimary"
tools:text="Zhengzhou China"/>
</LinearLayout>
<LinearLayout
android:id="@+id/urlContainer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?selectableItemBackground"
android:clickable="true"
android:gravity="center_vertical"
android:orientation="horizontal"
android:padding="@dimen/element_spacing_small">
<org.mariotaku.twidere.view.IconActionView
android:layout_width="@dimen/element_size_small"
android:layout_height="@dimen/element_size_small"
android:color="?android:textColorPrimary"
android:src="@drawable/ic_action_web"/>
<org.mariotaku.twidere.view.TimelineContentTextView
android:id="@+id/url"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:autoLink="web"
android:ellipsize="end"
android:maxLines="1"
android:paddingLeft="@dimen/element_spacing_small"
android:paddingRight="@dimen/element_spacing_small"
android:textAppearance="?android:textAppearanceSmall"
android:textColor="?android:textColorPrimary"
tools:text="mariotaku.org"/>
</LinearLayout>
<LinearLayout
android:id="@+id/createdAtContainer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?selectableItemBackground"
android:clickable="true"
android:gravity="center_vertical"
android:orientation="horizontal"
android:padding="@dimen/element_spacing_small">
<org.mariotaku.twidere.view.IconActionView
android:layout_width="@dimen/element_size_small"
android:layout_height="@dimen/element_size_small"
android:color="?android:textColorPrimary"
android:src="@drawable/ic_action_time"/>
<TextView
android:id="@+id/createdAt"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ellipsize="end"
android:maxLines="1"
android:paddingLeft="@dimen/element_spacing_small"
android:paddingRight="@dimen/element_spacing_small"
android:textAppearance="?android:textAppearanceSmall"
android:textColor="?android:textColorPrimary"
tools:text="July 17, 2009 18:35 (20 tweets per day)"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="@dimen/action_button_size"
android:baselineAligned="false"
android:orientation="horizontal"
android:splitMotionEvents="false">
<LinearLayout
android:id="@+id/followersContainer"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:background="?selectableItemBackground"
android:clickable="true"
android:gravity="center"
android:orientation="vertical"
android:padding="@dimen/element_spacing_small">
<TextView
android:id="@+id/followersCount"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:maxLines="1"
android:textAppearance="?android:textAppearanceMedium"
android:textColor="?android:textColorPrimary"
tools:text="255"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ellipsize="end"
android:maxLines="1"
android:text="@string/followers"
android:textAppearance="?android:textAppearanceSmall"
android:textColor="?android:textColorSecondary"/>
</LinearLayout>
<LinearLayout
android:id="@+id/friendsContainer"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:background="?selectableItemBackground"
android:clickable="true"
android:gravity="center"
android:orientation="vertical"
android:padding="@dimen/element_spacing_small">
<TextView
android:id="@+id/friendsCount"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:maxLines="1"
android:textAppearance="?android:textAppearanceMedium"
android:textColor="?android:textColorPrimary"
tools:text="255"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ellipsize="end"
android:maxLines="1"
android:text="@string/following"
android:textAppearance="?android:textAppearanceSmall"
android:textColor="?android:textColorSecondary"/>
</LinearLayout>
<LinearLayout
android:id="@+id/listedContainer"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:background="?selectableItemBackground"
android:clickable="true"
android:gravity="center"
android:orientation="vertical"
android:padding="@dimen/element_spacing_small">
<TextView
android:id="@+id/listedCount"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:maxLines="1"
android:textAppearance="?android:textAppearanceMedium"
android:textColor="?android:textColorPrimary"
tools:text="255"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ellipsize="end"
android:maxLines="1"
android:text="@string/listed"
android:textAppearance="?android:textAppearanceSmall"
android:textColor="?android:textColorSecondary"/>
</LinearLayout>
<LinearLayout
android:id="@+id/groupsContainer"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:background="?selectableItemBackground"
android:clickable="true"
android:gravity="center"
android:orientation="vertical"
android:padding="@dimen/element_spacing_small">
<TextView
android:id="@+id/groupsCount"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:maxLines="1"
android:textAppearance="?android:textAppearanceMedium"
android:textColor="?android:textColorPrimary"
tools:text="255"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ellipsize="end"
android:maxLines="1"
android:text="@string/groups"
android:textAppearance="?android:textAppearanceSmall"
android:textColor="?android:textColorSecondary"/>
</LinearLayout>
</LinearLayout>
</LinearLayout>
<include layout="@layout/layout_content_fragment_common"/>
</FrameLayout>
<org.mariotaku.twidere.view.ProfileImageView
android:id="@+id/profileImage"
style="?profileImageStyleLarge"
android:layout_width="@dimen/icon_size_user_profile"
android:layout_height="@dimen/icon_size_user_profile"
android:layout_alignBottom="@+id/profileNameContainer"
android:layout_marginLeft="@dimen/element_spacing_normal"
android:layout_marginStart="@dimen/element_spacing_normal"
android:contentDescription="@string/profile_image"
android:visibility="gone"
tools:src="@drawable/ic_profile_image_twidere"
tools:visibility="visible"/>
<org.mariotaku.twidere.view.BoundsImageView
android:id="@+id/profileType"
style="@style/Widget.ProfileType"
android:layout_width="@dimen/icon_size_profile_type_user_profile"
android:layout_height="@dimen/icon_size_profile_type_user_profile"
android:layout_alignBottom="@+id/profileImage"
android:layout_alignEnd="@+id/profileImage"
android:layout_alignRight="@+id/profileImage"
android:layout_marginBottom="@dimen/element_spacing_minus_msmall"
android:layout_marginEnd="@dimen/element_spacing_minus_msmall"
android:layout_marginRight="@dimen/element_spacing_minus_msmall"
android:scaleType="fitCenter"
android:visibility="gone"
tools:visibility="gone"/>
</RelativeLayout>