improved media label style

This commit is contained in:
Mariotaku Lee 2016-05-29 13:12:13 +08:00
parent e111e258ba
commit bac33d85b8
2 changed files with 45 additions and 12 deletions

View File

@ -172,15 +172,18 @@ public class StatusViewHolder extends ViewHolder implements Constants, IStatusVi
final boolean showCardActions = isCardActionsShown();
if (adapter.isMediaPreviewEnabled()) {
mediaPreview.setVisibility(View.VISIBLE);
mediaLabel.setVisibility(View.GONE);
if (textMediaSpace != null) {
textMediaSpace.setVisibility(View.GONE);
}
} else {
mediaPreview.setVisibility(View.GONE);
mediaLabel.setVisibility(View.VISIBLE);
if (textMediaSpace != null) {
textMediaSpace.setVisibility(showCardActions ? View.GONE : View.VISIBLE);
}
}
quoteMediaLabel.setVisibility(View.GONE);
actionButtons.setVisibility(showCardActions ? View.VISIBLE : View.GONE);
itemMenu.setVisibility(showCardActions ? View.VISIBLE : View.GONE);
if (statusContentLowerSpace != null) {

View File

@ -172,7 +172,7 @@
tools:text="@string/sample_status_text"
tools:visibility="visible"/>
<org.mariotaku.twidere.view.ActionIconThemedTextView
<LinearLayout
android:id="@+id/media_label"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@ -182,12 +182,27 @@
android:layout_alignStart="@+id/text"
android:layout_below="@+id/text"
android:layout_marginTop="@dimen/element_spacing_xsmall"
android:drawableLeft="@drawable/ic_action_gallery"
android:drawableStart="@drawable/ic_action_gallery"
android:gravity="center_vertical"
android:text="@string/media"
android:textAppearance="?android:textAppearanceSmall"
android:textStyle="bold"/>
android:orientation="horizontal">
<org.mariotaku.twidere.view.IconActionView
android:layout_width="@dimen/element_size_small"
android:layout_height="@dimen/element_size_small"
android:layout_weight="0"
android:color="?android:textColorSecondary"
android:scaleType="centerInside"
android:src="@drawable/ic_action_gallery"
tools:tint="?android:textColorSecondary"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/media"
android:textAppearance="?android:textAppearanceSmall"
android:textStyle="bold"/>
</LinearLayout>
<org.mariotaku.twidere.view.CardMediaContainer
android:id="@+id/media_preview"
@ -253,7 +268,7 @@
tools:text="@string/sample_status_text"
tools:visibility="visible"/>
<org.mariotaku.twidere.view.ActionIconThemedTextView
<LinearLayout
android:id="@+id/quoted_media_label"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@ -261,12 +276,27 @@
android:layout_marginTop="@dimen/element_spacing_xsmall"
android:layout_toEndOf="@+id/quote_indicator"
android:layout_toRightOf="@+id/quote_indicator"
android:drawableLeft="@drawable/ic_action_gallery"
android:drawableStart="@drawable/ic_action_gallery"
android:gravity="center_vertical"
android:text="@string/media"
android:textAppearance="?android:textAppearanceSmall"
android:textStyle="bold"/>
android:orientation="horizontal">
<org.mariotaku.twidere.view.IconActionView
android:layout_width="@dimen/element_size_small"
android:layout_height="@dimen/element_size_small"
android:layout_weight="0"
android:color="?android:textColorSecondary"
android:scaleType="centerInside"
android:src="@drawable/ic_action_gallery"
tools:tint="?android:textColorSecondary"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/media"
android:textAppearance="?android:textAppearanceSmall"
android:textStyle="bold"/>
</LinearLayout>
<org.mariotaku.twidere.view.CardMediaContainer
android:id="@+id/quoted_media_preview"