parent
94ad1a659c
commit
80f75f8521
|
@ -25,7 +25,6 @@ import android.support.v4.app.FragmentActivity;
|
|||
import android.support.v4.util.Pair;
|
||||
import android.support.v4.widget.Space;
|
||||
import android.support.v7.widget.CardView;
|
||||
import android.support.v7.widget.RecyclerView;
|
||||
import android.support.v7.widget.RecyclerView.ViewHolder;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
|
@ -55,8 +54,6 @@ import org.mariotaku.twidere.view.holder.StatusViewHolder;
|
|||
import org.mariotaku.twidere.view.holder.StatusViewHolder.DummyStatusHolderAdapter;
|
||||
import org.mariotaku.twidere.view.holder.iface.IStatusViewHolder;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
/**
|
||||
* Created by mariotaku on 15/1/3.
|
||||
*/
|
||||
|
@ -202,14 +199,13 @@ public abstract class AbsActivitiesAdapter<Data> extends LoadMoreSupportAdapter<
|
|||
}
|
||||
case ITEM_VIEW_TYPE_TITLE_SUMMARY: {
|
||||
final View view;
|
||||
// if (mCompactCards) {
|
||||
view = mInflater.inflate(R.layout.card_item_activity_summary_compact, parent, false);
|
||||
// } else {
|
||||
// view = mInflater.inflate(R.layout.card_item_activity_summary, parent, false);
|
||||
// final CardView cardView = (CardView) view.findViewById(R.id.card);
|
||||
// cardView.setCardBackgroundColor(mCardBackgroundColor);
|
||||
// }
|
||||
final ActivityTitleSummaryViewHolder holder = new ActivityTitleSummaryViewHolder(this, view);
|
||||
if (mCompactCards) {
|
||||
view = mInflater.inflate(R.layout.card_item_activity_summary_common, parent, false);
|
||||
} else {
|
||||
view = mInflater.inflate(R.layout.card_item_activity_summary, parent, false);
|
||||
}
|
||||
final ActivityTitleSummaryViewHolder holder = new ActivityTitleSummaryViewHolder(this,
|
||||
view, mCompactCards);
|
||||
holder.setOnClickListeners();
|
||||
holder.setTextSize(getTextSize());
|
||||
return holder;
|
||||
|
|
|
@ -68,6 +68,11 @@ public class NameView extends ThemedTextView {
|
|||
mSecondaryTextStyle = new StyleSpan(a.getInt(R.styleable.NameView_nv_secondaryTextStyle, 0));
|
||||
a.recycle();
|
||||
setNameFirst(true);
|
||||
if (isInEditMode()) {
|
||||
setName("Name");
|
||||
setScreenName("@screenname");
|
||||
updateText();
|
||||
}
|
||||
}
|
||||
|
||||
public void setPrimaryTextColor(final int color) {
|
||||
|
@ -95,13 +100,12 @@ public class NameView extends ThemedTextView {
|
|||
}
|
||||
|
||||
public void updateText(@Nullable BidiFormatter formatter) {
|
||||
if (isInEditMode()) return;
|
||||
final SpannableStringBuilder sb = new SpannableStringBuilder();
|
||||
final String primaryText = mNameFirst ? mName : mScreenName;
|
||||
final String secondaryText = mNameFirst ? mScreenName : mName;
|
||||
if (primaryText != null) {
|
||||
int start = sb.length();
|
||||
if (formatter != null) {
|
||||
if (formatter != null && !isInEditMode()) {
|
||||
sb.append(formatter.unicodeWrap(primaryText));
|
||||
} else {
|
||||
sb.append(primaryText);
|
||||
|
@ -114,7 +118,7 @@ public class NameView extends ThemedTextView {
|
|||
sb.append(" ");
|
||||
if (secondaryText != null) {
|
||||
int start = sb.length();
|
||||
if (formatter != null) {
|
||||
if (formatter != null && !isInEditMode()) {
|
||||
sb.append(formatter.unicodeWrap(secondaryText));
|
||||
} else {
|
||||
sb.append(secondaryText);
|
||||
|
|
|
@ -20,7 +20,9 @@
|
|||
package org.mariotaku.twidere.view.holder;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.res.Resources;
|
||||
import android.graphics.PorterDuff;
|
||||
import android.support.v4.view.MarginLayoutParamsCompat;
|
||||
import android.support.v7.widget.RecyclerView.ViewHolder;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
@ -52,9 +54,11 @@ public class ActivityTitleSummaryViewHolder extends ViewHolder implements View.O
|
|||
private final ViewGroup profileImagesContainer;
|
||||
private final BadgeView profileImageMoreNumber;
|
||||
private final ImageView[] profileImageViews;
|
||||
private final View profileImageSpace;
|
||||
|
||||
private ActivityClickListener activityClickListener;
|
||||
|
||||
public ActivityTitleSummaryViewHolder(AbsActivitiesAdapter adapter, View itemView) {
|
||||
public ActivityTitleSummaryViewHolder(AbsActivitiesAdapter adapter, View itemView, boolean isCompact) {
|
||||
super(itemView);
|
||||
this.adapter = adapter;
|
||||
|
||||
|
@ -62,7 +66,17 @@ public class ActivityTitleSummaryViewHolder extends ViewHolder implements View.O
|
|||
|
||||
activityTypeView = (ActionIconView) itemView.findViewById(R.id.activity_type);
|
||||
titleView = (TextView) itemView.findViewById(R.id.title);
|
||||
|
||||
if (isCompact) {
|
||||
final Resources resources = adapter.getContext().getResources();
|
||||
final ViewGroup.MarginLayoutParams lp = (ViewGroup.MarginLayoutParams) titleView.getLayoutParams();
|
||||
final int spacing = resources.getDimensionPixelSize(R.dimen.element_spacing_small);
|
||||
lp.leftMargin = spacing;
|
||||
MarginLayoutParamsCompat.setMarginStart(lp, spacing);
|
||||
}
|
||||
|
||||
summaryView = (TextView) itemView.findViewById(R.id.summary);
|
||||
profileImageSpace = itemView.findViewById(R.id.profile_image_space);
|
||||
|
||||
profileImagesContainer = (ViewGroup) itemView.findViewById(R.id.profile_images_container);
|
||||
profileImageViews = new ImageView[5];
|
||||
|
@ -102,6 +116,10 @@ public class ActivityTitleSummaryViewHolder extends ViewHolder implements View.O
|
|||
}
|
||||
|
||||
private void displayUserProfileImages(final ParcelableUser[] statuses) {
|
||||
final boolean shouldDisplayImages = adapter.isProfileImageEnabled();
|
||||
profileImagesContainer.setVisibility(shouldDisplayImages ? View.VISIBLE : View.GONE);
|
||||
profileImageSpace.setVisibility(shouldDisplayImages ? View.VISIBLE : View.GONE);
|
||||
if (!shouldDisplayImages) return;
|
||||
final MediaLoaderWrapper imageLoader = adapter.getMediaLoader();
|
||||
if (statuses == null) {
|
||||
for (final ImageView view : profileImageViews) {
|
||||
|
@ -111,9 +129,6 @@ public class ActivityTitleSummaryViewHolder extends ViewHolder implements View.O
|
|||
return;
|
||||
}
|
||||
final int length = Math.min(profileImageViews.length, statuses.length);
|
||||
final boolean shouldDisplayImages = adapter.isProfileImageEnabled();
|
||||
profileImagesContainer.setVisibility(shouldDisplayImages ? View.VISIBLE : View.GONE);
|
||||
if (!shouldDisplayImages) return;
|
||||
for (int i = 0, j = profileImageViews.length; i < j; i++) {
|
||||
final ImageView view = profileImageViews[i];
|
||||
view.setImageDrawable(null);
|
||||
|
|
|
@ -75,6 +75,8 @@ public class StatusViewHolder extends ViewHolder implements Constants, OnClickLi
|
|||
private final ForegroundColorView quoteIndicator;
|
||||
private final View actionButtons;
|
||||
private final View itemMenu;
|
||||
private final View profileImageSpace;
|
||||
private final View statusInfoSpace;
|
||||
|
||||
private StatusClickListener statusClickListener;
|
||||
|
||||
|
@ -92,6 +94,8 @@ public class StatusViewHolder extends ViewHolder implements Constants, OnClickLi
|
|||
statusInfoIcon = (ImageView) itemView.findViewById(R.id.status_info_icon);
|
||||
statusInfoLabel = (TextView) itemView.findViewById(R.id.status_info_label);
|
||||
timeView = (ShortTimeView) itemView.findViewById(R.id.time);
|
||||
profileImageSpace = itemView.findViewById(R.id.profile_image_space);
|
||||
statusInfoSpace = itemView.findViewById(R.id.status_info_space);
|
||||
|
||||
mediaPreview = (CardMediaContainer) itemView.findViewById(R.id.media_preview);
|
||||
|
||||
|
@ -113,6 +117,12 @@ public class StatusViewHolder extends ViewHolder implements Constants, OnClickLi
|
|||
|
||||
public void displaySampleStatus() {
|
||||
profileImageView.setVisibility(adapter.isProfileImageEnabled() ? View.VISIBLE : View.GONE);
|
||||
if (profileImageSpace != null) {
|
||||
profileImageSpace.setVisibility(adapter.isProfileImageEnabled() ? View.VISIBLE : View.GONE);
|
||||
}
|
||||
if (statusInfoSpace != null) {
|
||||
statusInfoSpace.setVisibility(adapter.isProfileImageEnabled() ? View.VISIBLE : View.GONE);
|
||||
}
|
||||
profileImageView.setImageResource(R.mipmap.ic_launcher);
|
||||
nameView.setName(TWIDERE_PREVIEW_NAME);
|
||||
nameView.setScreenName("@" + TWIDERE_PREVIEW_SCREEN_NAME);
|
||||
|
@ -222,6 +232,12 @@ public class StatusViewHolder extends ViewHolder implements Constants, OnClickLi
|
|||
|
||||
if (adapter.isProfileImageEnabled()) {
|
||||
profileImageView.setVisibility(View.VISIBLE);
|
||||
if (profileImageSpace != null) {
|
||||
profileImageSpace.setVisibility(View.VISIBLE);
|
||||
}
|
||||
if (statusInfoSpace != null) {
|
||||
statusInfoSpace.setVisibility(View.VISIBLE);
|
||||
}
|
||||
final String user_profile_image_url = status.user_profile_image_url;
|
||||
|
||||
loader.displayProfileImage(profileImageView, user_profile_image_url);
|
||||
|
@ -231,6 +247,12 @@ public class StatusViewHolder extends ViewHolder implements Constants, OnClickLi
|
|||
} else {
|
||||
profileTypeView.setVisibility(View.GONE);
|
||||
profileImageView.setVisibility(View.GONE);
|
||||
if (profileImageSpace != null) {
|
||||
profileImageSpace.setVisibility(View.GONE);
|
||||
}
|
||||
if (statusInfoSpace != null) {
|
||||
statusInfoSpace.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
loader.cancelDisplayTask(profileImageView);
|
||||
|
||||
|
|
|
@ -1,150 +1,9 @@
|
|||
<?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/>.
|
||||
-->
|
||||
<android.support.v7.widget.CardView
|
||||
android:id="@+id/card"
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout
|
||||
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"
|
||||
android:layout_marginBottom="@dimen/element_spacing_small"
|
||||
android:layout_marginLeft="@dimen/element_spacing_normal"
|
||||
android:layout_marginRight="@dimen/element_spacing_normal"
|
||||
android:layout_marginTop="@dimen/element_spacing_small"
|
||||
android:focusable="false"
|
||||
app:cardBackgroundColor="?cardItemBackgroundColor"
|
||||
app:cardCornerRadius="2dp"
|
||||
app:cardElevation="2dp">
|
||||
android:padding="@dimen/element_spacing_normal">
|
||||
|
||||
<org.mariotaku.twidere.view.ColorLabelRelativeLayout
|
||||
android:id="@+id/item_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?selectableItemBackground"
|
||||
android:focusable="true"
|
||||
android:focusableInTouchMode="false"
|
||||
android:orientation="horizontal"
|
||||
android:padding="@dimen/element_spacing_normal">
|
||||
|
||||
<org.mariotaku.twidere.view.ActionIconView
|
||||
android:id="@+id/activity_type"
|
||||
android:layout_width="@dimen/icon_size_activity_type"
|
||||
android:layout_height="@dimen/icon_size_activity_type"
|
||||
android:layout_alignEnd="@+id/profile_image_space"
|
||||
android:layout_alignRight="@+id/profile_image_space"
|
||||
android:layout_alignTop="@+id/profile_images_container"
|
||||
android:scaleType="centerInside"
|
||||
tools:src="@drawable/ic_indicator_retweet"/>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/profile_images_container"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="@dimen/element_spacing_normal"
|
||||
android:layout_marginStart="@dimen/element_spacing_normal"
|
||||
android:layout_toEndOf="@+id/profile_image_space"
|
||||
android:layout_toRightOf="@+id/profile_image_space"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<org.mariotaku.twidere.view.ShapedImageView
|
||||
android:id="@+id/activity_profile_image_0"
|
||||
style="?profileImageStyle"
|
||||
android:layout_width="@dimen/profile_image_size_activity_small"
|
||||
android:layout_height="@dimen/profile_image_size_activity_small"
|
||||
android:layout_margin="2dp"
|
||||
android:contentDescription="@string/profile_image"/>
|
||||
|
||||
<org.mariotaku.twidere.view.ShapedImageView
|
||||
android:id="@+id/activity_profile_image_1"
|
||||
style="?profileImageStyle"
|
||||
android:layout_width="@dimen/profile_image_size_activity_small"
|
||||
android:layout_height="@dimen/profile_image_size_activity_small"
|
||||
android:layout_margin="2dp"
|
||||
android:contentDescription="@string/profile_image"/>
|
||||
|
||||
<org.mariotaku.twidere.view.ShapedImageView
|
||||
android:id="@+id/activity_profile_image_2"
|
||||
style="?profileImageStyle"
|
||||
android:layout_width="@dimen/profile_image_size_activity_small"
|
||||
android:layout_height="@dimen/profile_image_size_activity_small"
|
||||
android:layout_margin="2dp"
|
||||
android:contentDescription="@string/profile_image"/>
|
||||
|
||||
<org.mariotaku.twidere.view.ShapedImageView
|
||||
android:id="@+id/activity_profile_image_3"
|
||||
style="?profileImageStyle"
|
||||
android:layout_width="@dimen/profile_image_size_activity_small"
|
||||
android:layout_height="@dimen/profile_image_size_activity_small"
|
||||
android:layout_margin="2dp"
|
||||
android:contentDescription="@string/profile_image"/>
|
||||
|
||||
<org.mariotaku.twidere.view.ShapedImageView
|
||||
android:id="@+id/activity_profile_image_4"
|
||||
style="?profileImageStyle"
|
||||
android:layout_width="@dimen/profile_image_size_activity_small"
|
||||
android:layout_height="@dimen/profile_image_size_activity_small"
|
||||
android:layout_margin="2dp"
|
||||
android:contentDescription="@string/profile_image"/>
|
||||
|
||||
<org.mariotaku.twidere.view.BadgeView
|
||||
android:id="@+id/activity_profile_image_more_number"
|
||||
style="?profileImageStyle"
|
||||
android:layout_width="@dimen/profile_image_size_activity_small"
|
||||
android:layout_height="@dimen/profile_image_size_activity_small"
|
||||
android:layout_margin="2dp"
|
||||
android:gravity="center"
|
||||
android:textColor="?android:attr/textColorPrimary"
|
||||
tools:text="11"/>
|
||||
</LinearLayout>
|
||||
|
||||
<Space
|
||||
android:id="@+id/profile_image_space"
|
||||
android:layout_width="@dimen/icon_size_status_profile_image"
|
||||
android:layout_height="0dp"
|
||||
android:layout_alignWithParentIfMissing="true"
|
||||
android:layout_below="@+id/profile_images_container"/>
|
||||
|
||||
<org.mariotaku.twidere.view.themed.ThemedTextView
|
||||
android:id="@+id/title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignLeft="@+id/profile_images_container"
|
||||
android:layout_alignStart="@+id/profile_images_container"
|
||||
android:layout_below="@+id/profile_images_container"
|
||||
android:singleLine="false"
|
||||
android:textAppearance="?android:textAppearanceSmall"
|
||||
android:textColor="?android:textColorPrimary"
|
||||
tools:text="User and 15 others favorited your tweet."/>
|
||||
|
||||
<org.mariotaku.twidere.view.themed.ThemedTextView
|
||||
android:id="@+id/summary"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignLeft="@+id/profile_images_container"
|
||||
android:layout_alignStart="@+id/profile_images_container"
|
||||
android:layout_below="@+id/title"
|
||||
android:singleLine="false"
|
||||
android:textAppearance="?android:textAppearanceSmall"
|
||||
android:textColor="?android:textColorSecondary"
|
||||
tools:text="@string/sample_status_text"
|
||||
tools:textSize="12sp"/>
|
||||
|
||||
</org.mariotaku.twidere.view.ColorLabelRelativeLayout>
|
||||
</android.support.v7.widget.CardView>
|
||||
<include layout="@layout/card_item_activity_summary_common"/>
|
||||
</FrameLayout>
|
|
@ -31,24 +31,35 @@
|
|||
|
||||
<org.mariotaku.twidere.view.ActionIconView
|
||||
android:id="@+id/activity_type"
|
||||
android:layout_width="@dimen/icon_size_activity_type"
|
||||
android:layout_height="@dimen/icon_size_activity_type"
|
||||
android:layout_width="@dimen/element_size_small"
|
||||
android:layout_height="@dimen/element_size_small"
|
||||
android:layout_alignEnd="@+id/profile_image_space"
|
||||
android:layout_alignRight="@+id/profile_image_space"
|
||||
android:layout_alignTop="@+id/profile_images_container"
|
||||
android:padding="@dimen/element_spacing_small"
|
||||
android:scaleType="centerInside"
|
||||
tools:src="@drawable/ic_indicator_retweet"/>
|
||||
|
||||
<Space
|
||||
android:id="@+id/profile_image_space"
|
||||
android:layout_width="@dimen/icon_size_status_profile_image"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignBottom="@+id/activity_type"
|
||||
android:layout_alignTop="@+id/activity_type"
|
||||
android:layout_below="@+id/profile_images_container"
|
||||
tools:visibility="visible"/>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/profile_images_container"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="@dimen/element_spacing_normal"
|
||||
android:layout_marginStart="@dimen/element_spacing_normal"
|
||||
android:layout_alignLeft="@+id/title"
|
||||
android:layout_alignStart="@+id/title"
|
||||
android:layout_toEndOf="@+id/profile_image_space"
|
||||
android:layout_toRightOf="@+id/profile_image_space"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
android:orientation="horizontal"
|
||||
android:visibility="visible">
|
||||
|
||||
<org.mariotaku.twidere.view.ShapedImageView
|
||||
android:id="@+id/activity_profile_image_0"
|
||||
|
@ -101,20 +112,18 @@
|
|||
tools:text="11"/>
|
||||
</LinearLayout>
|
||||
|
||||
<Space
|
||||
android:id="@+id/profile_image_space"
|
||||
android:layout_width="@dimen/icon_size_status_profile_image"
|
||||
android:layout_height="0dp"
|
||||
android:layout_alignWithParentIfMissing="true"
|
||||
android:layout_below="@+id/profile_images_container"/>
|
||||
|
||||
<org.mariotaku.twidere.view.themed.ThemedTextView
|
||||
android:id="@+id/title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignLeft="@+id/profile_images_container"
|
||||
android:layout_alignStart="@+id/profile_images_container"
|
||||
android:layout_below="@+id/profile_images_container"
|
||||
android:layout_marginLeft="@dimen/element_spacing_normal"
|
||||
android:layout_marginStart="@dimen/element_spacing_normal"
|
||||
android:layout_toEndOf="@+id/activity_type"
|
||||
android:layout_toRightOf="@+id/activity_type"
|
||||
android:gravity="center_vertical"
|
||||
android:minHeight="@dimen/element_size_small"
|
||||
android:singleLine="false"
|
||||
android:textAppearance="?android:textAppearanceSmall"
|
||||
android:textColor="?android:textColorPrimary"
|
||||
|
@ -124,8 +133,8 @@
|
|||
android:id="@+id/summary"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignLeft="@+id/profile_images_container"
|
||||
android:layout_alignStart="@+id/profile_images_container"
|
||||
android:layout_alignLeft="@+id/title"
|
||||
android:layout_alignStart="@+id/title"
|
||||
android:layout_below="@+id/title"
|
||||
android:singleLine="false"
|
||||
android:textAppearance="?android:textAppearanceSmall"
|
|
@ -18,10 +18,10 @@
|
|||
-->
|
||||
|
||||
<merge 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="match_parent">
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<org.mariotaku.twidere.view.ColorLabelRelativeLayout
|
||||
android:id="@+id/item_content"
|
||||
|
@ -33,39 +33,51 @@
|
|||
app:ignorePadding="true">
|
||||
|
||||
<Space
|
||||
android:id="@+id/status_info_space"
|
||||
android:id="@+id/profile_image_space"
|
||||
android:layout_width="@dimen/icon_size_status_profile_image"
|
||||
android:layout_height="@dimen/element_size_small"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_alignTop="@+id/status_info_label"
|
||||
android:layout_marginEnd="@dimen/element_spacing_small"
|
||||
android:layout_marginLeft="@dimen/element_spacing_normal"
|
||||
android:layout_marginRight="@dimen/element_spacing_small"
|
||||
android:layout_marginStart="@dimen/element_spacing_normal" />
|
||||
android:layout_marginStart="@dimen/element_spacing_normal"
|
||||
tools:visibility="visible"/>
|
||||
|
||||
<org.mariotaku.twidere.view.ActionIconView
|
||||
android:id="@+id/status_info_icon"
|
||||
style="?profileImageStyle"
|
||||
android:layout_width="@dimen/element_size_small"
|
||||
android:layout_height="@dimen/element_size_small"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignBottom="@+id/status_info_label"
|
||||
android:layout_alignEnd="@+id/profile_image_space"
|
||||
android:layout_alignRight="@+id/profile_image_space"
|
||||
android:layout_alignTop="@id/status_info_label"
|
||||
android:layout_marginLeft="@dimen/element_spacing_small"
|
||||
android:layout_marginStart="@dimen/element_spacing_small"
|
||||
android:layout_toLeftOf="@+id/status_info_label"
|
||||
android:layout_toStartOf="@+id/status_info_label"
|
||||
android:color="?android:textColorSecondary"
|
||||
android:minHeight="@dimen/element_size_small"
|
||||
android:padding="@dimen/element_spacing_small"
|
||||
android:scaleType="centerInside"
|
||||
android:visibility="gone"
|
||||
tools:src="@drawable/ic_activity_action_retweet"
|
||||
tools:visibility="visible" />
|
||||
tools:visibility="visible"/>
|
||||
|
||||
<android.support.v4.widget.Space
|
||||
android:id="@+id/status_info_space"
|
||||
android:layout_width="@dimen/element_spacing_normal"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignBottom="@+id/status_info_label"
|
||||
android:layout_alignTop="@id/status_info_label"
|
||||
android:layout_toEndOf="@+id/status_info_icon"
|
||||
android:layout_toRightOf="@+id/status_info_icon"
|
||||
tools:visibility="visible"/>
|
||||
|
||||
<org.mariotaku.twidere.view.themed.ThemedTextView
|
||||
android:id="@+id/status_info_label"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="@dimen/element_spacing_normal"
|
||||
android:layout_marginEnd="@dimen/element_spacing_normal"
|
||||
android:layout_marginRight="@dimen/element_spacing_normal"
|
||||
android:layout_toEndOf="@+id/status_info_space"
|
||||
android:layout_toRightOf="@+id/status_info_space"
|
||||
|
@ -76,7 +88,7 @@
|
|||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:visibility="gone"
|
||||
tools:text="Mariotaku and 10 others retweeted"
|
||||
tools:visibility="visible" />
|
||||
tools:visibility="visible"/>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/profile_container"
|
||||
|
@ -96,12 +108,14 @@
|
|||
android:layout_width="@dimen/icon_size_status_profile_image"
|
||||
android:layout_height="@dimen/icon_size_status_profile_image"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginBottom="@dimen/element_spacing_small"
|
||||
android:layout_marginEnd="@dimen/element_spacing_small"
|
||||
android:layout_marginRight="@dimen/element_spacing_small"
|
||||
android:layout_marginTop="@dimen/element_spacing_small"
|
||||
android:layout_marginBottom="@dimen/element_spacing_normal"
|
||||
android:layout_marginEnd="@dimen/element_spacing_normal"
|
||||
android:layout_marginRight="@dimen/element_spacing_normal"
|
||||
android:layout_marginTop="@dimen/element_spacing_normal"
|
||||
android:contentDescription="@string/profile_image"
|
||||
android:scaleType="centerCrop" />
|
||||
android:scaleType="centerCrop"
|
||||
tools:src="@mipmap/ic_launcher"
|
||||
tools:visibility="visible"/>
|
||||
|
||||
<org.mariotaku.twidere.view.BoundsImageView
|
||||
android:id="@+id/profile_type"
|
||||
|
@ -110,14 +124,15 @@
|
|||
android:layout_alignBottom="@id/profile_image"
|
||||
android:layout_alignEnd="@id/profile_image"
|
||||
android:layout_alignRight="@id/profile_image"
|
||||
android:scaleType="fitCenter" />
|
||||
android:scaleType="fitCenter"/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="@dimen/element_spacing_normal"
|
||||
android:layout_marginStart="@dimen/element_spacing_normal"
|
||||
android:layout_marginEnd="@dimen/element_spacing_mlarge"
|
||||
android:layout_marginRight="@dimen/element_spacing_mlarge"
|
||||
android:layout_marginTop="@dimen/element_spacing_normal"
|
||||
android:layout_toEndOf="@id/profile_image"
|
||||
android:layout_toLeftOf="@+id/extra_type"
|
||||
android:layout_toRightOf="@id/profile_image"
|
||||
|
@ -128,23 +143,22 @@
|
|||
android:id="@+id/name"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/element_spacing_small"
|
||||
android:layout_marginRight="@dimen/element_spacing_small"
|
||||
android:orientation="horizontal"
|
||||
app:nv_primaryTextColor="?android:textColorPrimary"
|
||||
app:nv_primaryTextStyle="bold"
|
||||
app:nv_secondaryTextColor="?android:textColorSecondary" />
|
||||
app:nv_secondaryTextColor="?android:textColorSecondary"/>
|
||||
|
||||
<org.mariotaku.twidere.view.ShortTimeView
|
||||
android:id="@+id/time"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingBottom="@dimen/element_spacing_small"
|
||||
android:paddingTop="@dimen/element_spacing_xsmall"
|
||||
android:singleLine="true"
|
||||
android:textAppearance="?android:textAppearanceSmall"
|
||||
tools:text="10 mins ago"
|
||||
tools:textSize="@dimen/text_size_extra_small" />
|
||||
tools:textSize="@dimen/text_size_extra_small"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
@ -160,7 +174,7 @@
|
|||
android:layout_marginRight="@dimen/element_spacing_mlarge"
|
||||
android:layout_marginTop="@dimen/element_spacing_normal"
|
||||
android:color="?android:textColorSecondary"
|
||||
tools:src="@drawable/ic_action_gallery" />
|
||||
tools:src="@drawable/ic_action_gallery"/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
|
@ -171,15 +185,14 @@
|
|||
android:layout_alignLeft="@+id/profile_container"
|
||||
android:layout_alignStart="@+id/profile_container"
|
||||
android:layout_below="@id/profile_container"
|
||||
android:layout_marginBottom="@dimen/element_spacing_small"
|
||||
android:layout_marginTop="@dimen/element_spacing_normal"
|
||||
android:paddingBottom="@dimen/element_spacing_small"
|
||||
android:paddingLeft="@dimen/element_spacing_normal"
|
||||
android:paddingRight="@dimen/element_spacing_normal"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textColor="?android:attr/textColorPrimary"
|
||||
android:visibility="visible"
|
||||
tools:text="@string/sample_status_text"
|
||||
tools:visibility="visible" />
|
||||
tools:visibility="visible"/>
|
||||
|
||||
<org.mariotaku.twidere.view.ForegroundColorView
|
||||
android:id="@+id/quote_indicator"
|
||||
|
@ -191,7 +204,7 @@
|
|||
android:layout_marginStart="@dimen/element_spacing_normal"
|
||||
android:background="?quoteIndicatorBackgroundColor"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible" />
|
||||
tools:visibility="visible"/>
|
||||
|
||||
<org.mariotaku.twidere.view.NameView
|
||||
android:id="@+id/quoted_name"
|
||||
|
@ -201,30 +214,32 @@
|
|||
android:layout_toEndOf="@+id/quote_indicator"
|
||||
android:layout_toRightOf="@+id/quote_indicator"
|
||||
android:orientation="horizontal"
|
||||
android:paddingBottom="@dimen/element_spacing_small"
|
||||
android:paddingLeft="@dimen/element_spacing_normal"
|
||||
android:paddingRight="@dimen/element_spacing_normal"
|
||||
android:paddingTop="@dimen/element_spacing_small"
|
||||
android:visibility="gone"
|
||||
app:nv_primaryTextColor="?android:textColorPrimary"
|
||||
app:nv_primaryTextStyle="bold"
|
||||
app:nv_secondaryTextColor="?android:textColorSecondary"
|
||||
tools:visibility="visible" />
|
||||
tools:visibility="visible"/>
|
||||
|
||||
<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_marginBottom="@dimen/element_spacing_normal"
|
||||
android:layout_marginTop="@dimen/element_spacing_normal"
|
||||
android:layout_toEndOf="@+id/quote_indicator"
|
||||
android:layout_toRightOf="@+id/quote_indicator"
|
||||
android:paddingBottom="@dimen/element_spacing_normal"
|
||||
android:paddingLeft="@dimen/element_spacing_normal"
|
||||
android:paddingRight="@dimen/element_spacing_normal"
|
||||
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"
|
||||
tools:visibility="visible" />
|
||||
tools:visibility="visible"/>
|
||||
|
||||
<org.mariotaku.twidere.view.CardMediaContainer
|
||||
android:id="@+id/media_preview"
|
||||
|
@ -242,14 +257,21 @@
|
|||
|
||||
</org.mariotaku.twidere.view.CardMediaContainer>
|
||||
|
||||
<android.support.v4.widget.Space
|
||||
android:id="@+id/status_content_space"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/element_spacing_msmall"
|
||||
android:layout_below="@+id/media_preview"
|
||||
android:visibility="visible"/>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/action_buttons"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignLeft="@+id/profile_container"
|
||||
android:layout_alignStart="@+id/profile_container"
|
||||
android:layout_below="@+id/media_preview"
|
||||
android:layout_marginTop="@dimen/element_spacing_minus_msmall"
|
||||
android:layout_below="@+id/status_content_space"
|
||||
android:layout_marginTop="@dimen/element_spacing_minus_mlarge"
|
||||
android:gravity="center_vertical|start"
|
||||
android:orientation="horizontal">
|
||||
|
||||
|
@ -266,7 +288,7 @@
|
|||
android:paddingRight="@dimen/element_spacing_normal"
|
||||
android:textAppearance="?android:textAppearanceSmall"
|
||||
app:iabActivatedColor="@color/highlight_reply"
|
||||
app:iabColor="?android:textColorTertiary" />
|
||||
app:iabColor="?android:textColorTertiary"/>
|
||||
|
||||
<org.mariotaku.twidere.view.ActionIconThemedTextView
|
||||
android:id="@+id/retweet_count"
|
||||
|
@ -281,7 +303,7 @@
|
|||
android:paddingRight="@dimen/element_spacing_normal"
|
||||
android:textAppearance="?android:textAppearanceSmall"
|
||||
app:iabActivatedColor="@color/highlight_retweet"
|
||||
app:iabColor="?android:textColorTertiary" />
|
||||
app:iabColor="?android:textColorTertiary"/>
|
||||
|
||||
<org.mariotaku.twidere.view.ActionIconThemedTextView
|
||||
android:id="@+id/favorite_count"
|
||||
|
@ -296,7 +318,7 @@
|
|||
android:paddingRight="@dimen/element_spacing_normal"
|
||||
android:textAppearance="?android:textAppearanceSmall"
|
||||
app:iabActivatedColor="@color/highlight_like"
|
||||
app:iabColor="?android:textColorTertiary" />
|
||||
app:iabColor="?android:textColorTertiary"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
@ -313,7 +335,7 @@
|
|||
android:layout_marginRight="@dimen/element_spacing_normal"
|
||||
android:color="?android:textColorTertiary"
|
||||
android:focusable="false"
|
||||
android:src="@drawable/ic_action_more_vertical" />
|
||||
android:src="@drawable/ic_action_more_vertical"/>
|
||||
|
||||
</org.mariotaku.twidere.view.ColorLabelRelativeLayout>
|
||||
</merge>
|
|
@ -16,13 +16,14 @@
|
|||
~ 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">
|
||||
<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"
|
||||
|
@ -53,11 +54,11 @@
|
|||
android:id="@+id/status_info_label"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="@dimen/element_spacing_minus_small"
|
||||
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:layout_marginLeft="@dimen/element_spacing_small"
|
||||
android:layout_marginBottom="@dimen/element_spacing_minus_small"
|
||||
android:layout_toEndOf="@+id/status_info_icon"
|
||||
android:layout_toRightOf="@+id/status_info_icon"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center_vertical|start"
|
||||
android:minHeight="@dimen/element_size_small"
|
||||
|
@ -83,7 +84,7 @@
|
|||
android:layout_marginRight="@dimen/element_spacing_small"
|
||||
android:contentDescription="@string/profile_image"
|
||||
android:scaleType="centerCrop"
|
||||
tools:visibility="visible"/>
|
||||
tools:visibility="gone"/>
|
||||
|
||||
<org.mariotaku.twidere.view.BoundsImageView
|
||||
android:id="@+id/profile_type"
|
||||
|
|
Loading…
Reference in New Issue