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

310 lines
15 KiB
XML
Raw Normal View History

<?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.ColorLabelFrameLayout
android:id="@+id/item_content"
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:background="?cardItemBackgroundColor">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?selectableItemBackground"
android:clipChildren="false"
android:focusable="true"
android:orientation="horizontal"
android:paddingLeft="@dimen/element_spacing_normal"
android:paddingRight="@dimen/element_spacing_normal">
<org.mariotaku.twidere.view.ActionIconView
2015-12-27 07:48:14 +01:00
android:id="@+id/status_info_icon"
style="?profileImageStyle"
android:layout_width="@dimen/element_size_small"
android:layout_height="@dimen/element_size_small"
2015-12-27 07:48:14 +01:00
android:layout_alignBottom="@id/status_info_label"
android:layout_alignEnd="@id/profile_image"
android:layout_alignRight="@id/profile_image"
2015-12-27 07:48:14 +01:00
android:layout_alignTop="@id/status_info_label"
android:color="?android:textColorSecondary"
2015-01-14 09:47:51 +01:00
android:padding="@dimen/element_spacing_small"
android:scaleType="centerInside"
android:visibility="gone"
tools:src="@drawable/ic_activity_action_retweet"
2015-12-25 10:54:13 +01:00
tools:visibility="visible"/>
2015-01-14 09:47:51 +01:00
<org.mariotaku.twidere.view.ActionIconThemedTextView
2015-12-27 07:48:14 +01:00
android:id="@+id/status_info_label"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/element_spacing_minus_small"
2016-01-28 16:56:41 +01:00
android:layout_marginLeft="@dimen/element_spacing_small"
android:layout_marginStart="@dimen/element_spacing_small"
android:layout_toEndOf="@+id/status_info_icon"
android:layout_toRightOf="@+id/status_info_icon"
android:ellipsize="end"
2015-05-03 08:45:21 +02:00
android:gravity="center_vertical|start"
android:minHeight="@dimen/element_size_small"
android:singleLine="true"
android:textAppearance="?android:attr/textAppearanceSmall"
2015-01-14 09:47:51 +01:00
android:visibility="gone"
tools:text="Retweeted by Mariotaku"
2015-05-12 06:27:54 +02:00
tools:textSize="@dimen/text_size_extra_small"
2015-12-25 10:54:13 +01:00
tools:visibility="visible"/>
2015-06-06 17:15:33 +02:00
<org.mariotaku.twidere.view.ProfileImageView
android:id="@+id/profile_image"
style="?profileImageStyle"
android:layout_width="@dimen/icon_size_status_profile_image"
android:layout_height="@dimen/icon_size_status_profile_image"
2015-01-14 09:47:51 +01:00
android:layout_alignParentLeft="true"
2015-05-03 08:45:21 +02:00
android:layout_alignParentStart="true"
android:layout_alignTop="@+id/status_content"
android:layout_alignWithParentIfMissing="true"
2015-12-27 07:48:14 +01:00
android:layout_below="@+id/status_info_label"
2015-05-29 19:06:25 +02:00
android:layout_marginBottom="@dimen/element_spacing_small"
android:layout_marginEnd="@dimen/element_spacing_small"
android:layout_marginRight="@dimen/element_spacing_small"
android:contentDescription="@string/profile_image"
android:scaleType="centerCrop"
tools:visibility="gone"/>
<org.mariotaku.twidere.view.BoundsImageView
android:id="@+id/profile_type"
android:layout_width="@dimen/icon_size_profile_type"
android:layout_height="@dimen/icon_size_profile_type"
android:layout_alignBottom="@id/profile_image"
2015-05-03 08:45:21 +02:00
android:layout_alignEnd="@id/profile_image"
2015-05-12 06:27:54 +02:00
android:layout_alignRight="@id/profile_image"
android:layout_marginBottom="@dimen/element_spacing_minus_small"
2015-05-03 08:45:21 +02:00
android:layout_marginEnd="@dimen/element_spacing_minus_small"
2015-05-12 06:27:54 +02:00
android:layout_marginRight="@dimen/element_spacing_minus_small"
android:scaleType="fitCenter"
2015-12-25 10:54:13 +01:00
tools:visibility="gone"/>
<RelativeLayout
android:id="@+id/status_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
2015-12-27 07:48:14 +01:00
android:layout_below="@id/status_info_label"
android:layout_marginTop="@dimen/element_spacing_small"
android:layout_toEndOf="@id/profile_image"
android:layout_toRightOf="@id/profile_image"
android:minHeight="@dimen/icon_size_status_profile_image"
android:orientation="vertical">
<LinearLayout
android:id="@+id/profile_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
2015-05-03 08:45:21 +02:00
android:gravity="center_vertical|start"
android:orientation="horizontal">
2015-05-29 19:06:25 +02:00
<org.mariotaku.twidere.view.NameView
android:id="@+id/name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
2015-05-29 19:06:25 +02:00
app:nv_primaryTextColor="?android:textColorPrimary"
app:nv_primaryTextStyle="bold"
2015-12-25 10:54:13 +01:00
app:nv_secondaryTextColor="?android:textColorSecondary"/>
<org.mariotaku.twidere.view.ShortTimeView
android:id="@+id/time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="0"
android:textAppearance="?android:textAppearanceSmall"
tools:text="42 mins ago"
2015-12-25 10:54:13 +01:00
tools:textSize="@dimen/text_size_extra_small"/>
<org.mariotaku.twidere.view.ActionIconView
android:id="@+id/extra_type"
android:layout_width="@dimen/element_size_small"
android:layout_height="@dimen/element_size_small"
android:layout_weight="0"
android:color="?android:textColorSecondary"
2015-12-25 10:54:13 +01:00
tools:src="@drawable/ic_action_gallery"/>
</LinearLayout>
2015-11-20 09:02:35 +01:00
<org.mariotaku.twidere.view.TimelineContentTextView
android:id="@+id/text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignLeft="@+id/profile_container"
2015-05-03 08:45:21 +02:00
android:layout_alignStart="@+id/profile_container"
android:layout_below="@id/profile_container"
android:paddingBottom="@dimen/element_spacing_small"
android:paddingTop="@dimen/element_spacing_small"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="?android:attr/textColorPrimary"
android:visibility="visible"
tools:text="@string/sample_status_text"
2015-12-25 10:54:13 +01:00
tools:visibility="visible"/>
<org.mariotaku.twidere.view.ForegroundColorView
android:id="@+id/quote_indicator"
android:layout_width="@dimen/element_spacing_small"
android:layout_height="wrap_content"
android:layout_above="@+id/status_content_space"
2015-05-29 19:06:25 +02:00
android:layout_alignTop="@+id/quoted_name"
2015-05-03 08:45:21 +02:00
android:layout_marginEnd="@dimen/element_spacing_normal"
2015-05-12 06:27:54 +02:00
android:layout_marginRight="@dimen/element_spacing_normal"
android:background="?quoteIndicatorBackgroundColor"
android:visibility="gone"
2015-12-25 10:54:13 +01:00
tools:visibility="visible"/>
2015-05-29 19:06:25 +02:00
<org.mariotaku.twidere.view.NameView
android:id="@+id/quoted_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/text"
2015-05-03 08:45:21 +02:00
android:layout_toEndOf="@+id/quote_indicator"
2015-05-12 06:27:54 +02:00
android:layout_toRightOf="@+id/quote_indicator"
2015-05-03 08:45:21 +02:00
android:gravity="center_vertical|start"
android:orientation="horizontal"
android:visibility="gone"
2015-05-29 19:06:25 +02:00
app:nv_primaryTextColor="?android:textColorPrimary"
app:nv_primaryTextStyle="bold"
2015-05-29 19:06:25 +02:00
app:nv_secondaryTextColor="?android:textColorSecondary"
2015-12-25 10:54:13 +01:00
tools:visibility="visible"/>
2015-11-20 09:02:35 +01:00
<org.mariotaku.twidere.view.TimelineContentTextView
android:id="@+id/quoted_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/quoted_name"
android:layout_toEndOf="@+id/quote_indicator"
android:layout_toRightOf="@+id/quote_indicator"
android:paddingBottom="@dimen/element_spacing_small"
android:paddingTop="@dimen/element_spacing_small"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="?android:attr/textColorPrimary"
android:visibility="gone"
tools:text="@string/sample_status_text"
2015-12-25 10:54:13 +01:00
tools:visibility="visible"/>
<org.mariotaku.twidere.view.CardMediaContainer
android:id="@+id/media_preview"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/quoted_text"
2016-01-28 16:56:41 +01:00
android:layout_marginTop="@dimen/element_spacing_xsmall"
2015-05-03 08:45:21 +02:00
android:layout_toEndOf="@+id/quote_indicator"
2015-05-12 06:27:54 +02:00
android:layout_toRightOf="@+id/quote_indicator"
2015-03-11 15:15:32 +01:00
android:horizontalSpacing="@dimen/element_spacing_xsmall"
android:verticalSpacing="@dimen/element_spacing_xsmall"
tools:visibility="gone">
<!-- Child views will be inflated if media preview enabled in ViewHolder -->
</org.mariotaku.twidere.view.CardMediaContainer>
<android.support.v4.widget.Space
2016-01-28 16:56:41 +01:00
android:id="@+id/status_content_space"
android:layout_width="match_parent"
android:layout_height="@dimen/element_spacing_small"
2016-01-28 16:56:41 +01:00
android:layout_below="@+id/media_preview"/>
</RelativeLayout>
2015-03-11 15:15:32 +01:00
<LinearLayout
android:id="@+id/action_buttons"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="@id/status_content"
2015-05-03 08:45:21 +02:00
android:layout_alignStart="@id/status_content"
android:layout_below="@+id/status_content"
android:layout_marginTop="@dimen/element_spacing_minus_small"
2015-03-11 15:15:32 +01:00
android:layout_toLeftOf="@+id/item_menu"
2015-05-03 08:45:21 +02:00
android:layout_toStartOf="@+id/item_menu"
android:clipChildren="false"
2015-05-03 08:45:21 +02:00
android:gravity="center_vertical|start"
android:orientation="horizontal"
tools:visibility="visible">
2015-03-11 15:15:32 +01:00
<org.mariotaku.twidere.view.ActionIconThemedTextView
android:id="@+id/reply_count"
style="?cardActionButtonStyle"
android:layout_width="wrap_content"
android:layout_height="@dimen/button_size_content_card_compact"
2015-03-11 15:15:32 +01:00
android:layout_weight="0"
android:drawableLeft="@drawable/ic_action_reply"
2015-05-03 08:45:21 +02:00
android:drawableStart="@drawable/ic_action_reply"
android:focusable="false"
2015-03-11 15:15:32 +01:00
android:gravity="center"
android:paddingLeft="@dimen/element_spacing_msmall"
android:paddingRight="@dimen/element_spacing_msmall"
2015-03-11 15:15:32 +01:00
android:textAppearance="?android:textAppearanceSmall"
app:iabActivatedColor="@color/highlight_reply"
2015-12-25 10:54:13 +01:00
app:iabColor="?android:textColorTertiary"/>
2015-03-11 15:15:32 +01:00
<org.mariotaku.twidere.view.ActionIconThemedTextView
android:id="@+id/retweet_count"
style="?cardActionButtonStyle"
android:layout_width="wrap_content"
android:layout_height="@dimen/button_size_content_card"
android:layout_weight="0"
android:drawableLeft="@drawable/ic_action_retweet"
2015-05-03 08:45:21 +02:00
android:drawableStart="@drawable/ic_action_retweet"
android:focusable="false"
2015-03-11 15:15:32 +01:00
android:gravity="center"
android:paddingLeft="@dimen/element_spacing_msmall"
android:paddingRight="@dimen/element_spacing_msmall"
2015-03-11 15:15:32 +01:00
android:textAppearance="?android:textAppearanceSmall"
app:iabActivatedColor="@color/highlight_retweet"
2015-12-25 10:54:13 +01:00
app:iabColor="?android:textColorTertiary"/>
2015-03-11 15:15:32 +01:00
<org.mariotaku.twidere.view.ActionIconThemedTextView
android:id="@+id/favorite_count"
style="?cardActionButtonStyle"
android:layout_width="wrap_content"
android:layout_height="@dimen/button_size_content_card"
android:layout_weight="0"
android:focusable="false"
2015-03-11 15:15:32 +01:00
android:gravity="center"
android:paddingLeft="@dimen/element_spacing_msmall"
android:paddingRight="@dimen/element_spacing_msmall"
2015-03-11 15:15:32 +01:00
android:textAppearance="?android:textAppearanceSmall"
app:iabActivatedColor="@color/highlight_like"
app:iabColor="?android:textColorTertiary"
tools:drawableLeft="@drawable/ic_action_heart"
tools:drawableStart="@drawable/ic_action_heart"/>
2015-03-11 15:15:32 +01:00
</LinearLayout>
<org.mariotaku.twidere.view.ActionIconButton
android:id="@+id/item_menu"
style="?cardActionButtonStyle"
android:layout_width="@dimen/button_size_content_card_compact"
android:layout_height="wrap_content"
2015-03-11 15:15:32 +01:00
android:layout_alignBottom="@+id/action_buttons"
2015-05-03 08:45:21 +02:00
android:layout_alignParentEnd="true"
2015-05-12 06:27:54 +02:00
android:layout_alignParentRight="true"
2015-04-08 18:33:10 +02:00
android:layout_alignTop="@+id/action_buttons"
android:color="?android:textColorTertiary"
android:focusable="false"
android:src="@drawable/ic_action_more_horizontal"
2015-12-25 10:54:13 +01:00
tools:visibility="visible"/>
</RelativeLayout>
2015-01-14 09:47:51 +01:00
</org.mariotaku.twidere.view.ColorLabelFrameLayout>