Fixes issue #346 - Change layout of the focused toot by adding full date
This commit is contained in:
parent
5fad8fb809
commit
3e832e7c4a
|
@ -19,6 +19,7 @@ import android.content.ClipboardManager;
|
|||
import android.graphics.Bitmap;
|
||||
import android.os.CountDownTimer;
|
||||
import android.os.Handler;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.v7.app.AlertDialog;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
|
@ -107,13 +108,14 @@ public class NotificationsListAdapter extends RecyclerView.Adapter implements On
|
|||
|
||||
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
|
||||
public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
return new ViewHolder(layoutInflater.inflate(R.layout.drawer_notification, parent, false));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(RecyclerView.ViewHolder viewHolder, int position) {
|
||||
public void onBindViewHolder(@NonNull RecyclerView.ViewHolder viewHolder, int position) {
|
||||
|
||||
final NotificationsListAdapter.ViewHolder holder = (NotificationsListAdapter.ViewHolder) viewHolder;
|
||||
final Notification notification = notifications.get(position);
|
||||
|
@ -673,6 +675,8 @@ public class NotificationsListAdapter extends RecyclerView.Adapter implements On
|
|||
file.delete ();
|
||||
try {
|
||||
FileOutputStream out = new FileOutputStream(file);
|
||||
assert bitmap != null;
|
||||
assert bitmap != null;
|
||||
bitmap.compress(Bitmap.CompressFormat.JPEG, 90, out);
|
||||
out.flush();
|
||||
out.close();
|
||||
|
@ -1011,7 +1015,7 @@ public class NotificationsListAdapter extends RecyclerView.Adapter implements On
|
|||
}
|
||||
|
||||
@Override
|
||||
public void onViewAttachedToWindow(RecyclerView.ViewHolder holder) {
|
||||
public void onViewAttachedToWindow(@NonNull RecyclerView.ViewHolder holder) {
|
||||
super.onViewAttachedToWindow(holder);
|
||||
final NotificationsListAdapter.ViewHolder viewHolder = (NotificationsListAdapter.ViewHolder) holder;
|
||||
// Bug workaround for losing text selection ability, see:
|
||||
|
|
|
@ -19,6 +19,7 @@ import android.app.Activity;
|
|||
import android.database.sqlite.SQLiteDatabase;
|
||||
import android.graphics.Bitmap;
|
||||
import android.os.Handler;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.design.widget.FloatingActionButton;
|
||||
import android.support.v7.app.AlertDialog;
|
||||
import android.content.ClipData;
|
||||
|
@ -43,7 +44,6 @@ import android.text.SpannableString;
|
|||
import android.text.Spanned;
|
||||
import android.text.method.LinkMovementMethod;
|
||||
import android.text.style.ForegroundColorSpan;
|
||||
import android.util.Log;
|
||||
import android.util.TypedValue;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.MenuItem;
|
||||
|
@ -90,7 +90,6 @@ import fr.gouv.etalab.mastodon.activities.ShowAccountActivity;
|
|||
import fr.gouv.etalab.mastodon.activities.ShowConversationActivity;
|
||||
import fr.gouv.etalab.mastodon.activities.TootActivity;
|
||||
import fr.gouv.etalab.mastodon.asynctasks.PostActionAsyncTask;
|
||||
import fr.gouv.etalab.mastodon.asynctasks.RetrieveCardAsyncTask;
|
||||
import fr.gouv.etalab.mastodon.asynctasks.RetrieveFeedsAsyncTask;
|
||||
import fr.gouv.etalab.mastodon.asynctasks.RetrieveRepliesAsyncTask;
|
||||
import fr.gouv.etalab.mastodon.client.API;
|
||||
|
@ -136,9 +135,9 @@ public class StatusListAdapter extends RecyclerView.Adapter implements OnPostAct
|
|||
private RetrieveFeedsAsyncTask.Type type;
|
||||
private String targetedId;
|
||||
private final int DISPLAYED_STATUS = 1;
|
||||
private final int FOCUSED_STATUS = 2;
|
||||
private int conversationPosition;
|
||||
private List<String> timedMute;
|
||||
private int oldPosition;
|
||||
|
||||
|
||||
|
||||
|
@ -354,6 +353,8 @@ public class StatusListAdapter extends RecyclerView.Adapter implements OnPostAct
|
|||
String filter;
|
||||
if( type == RetrieveFeedsAsyncTask.Type.CACHE_BOOKMARKS)
|
||||
return DISPLAYED_STATUS;
|
||||
else if( type == RetrieveFeedsAsyncTask.Type.CONTEXT && position == conversationPosition)
|
||||
return FOCUSED_STATUS;
|
||||
else if( type == RetrieveFeedsAsyncTask.Type.HOME)
|
||||
filter = sharedpreferences.getString(Helper.SET_FILTER_REGEX_HOME, null);
|
||||
else if( type == RetrieveFeedsAsyncTask.Type.LOCAL)
|
||||
|
@ -402,10 +403,13 @@ public class StatusListAdapter extends RecyclerView.Adapter implements OnPostAct
|
|||
}
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
|
||||
public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
if( viewType == DISPLAYED_STATUS)
|
||||
return new ViewHolder(layoutInflater.inflate(R.layout.drawer_status, parent, false));
|
||||
else if(viewType == FOCUSED_STATUS)
|
||||
return new ViewHolder(layoutInflater.inflate(R.layout.drawer_status_focused, parent, false));
|
||||
else
|
||||
return new ViewHolderEmpty(layoutInflater.inflate(R.layout.drawer_empty, parent, false));
|
||||
}
|
||||
|
@ -413,9 +417,9 @@ public class StatusListAdapter extends RecyclerView.Adapter implements OnPostAct
|
|||
|
||||
@SuppressLint("SetJavaScriptEnabled")
|
||||
@Override
|
||||
public void onBindViewHolder(final RecyclerView.ViewHolder viewHolder, int position) {
|
||||
public void onBindViewHolder(@NonNull final RecyclerView.ViewHolder viewHolder, int position) {
|
||||
|
||||
if( viewHolder.getItemViewType() == DISPLAYED_STATUS){
|
||||
if( viewHolder.getItemViewType() == DISPLAYED_STATUS || viewHolder.getItemViewType() == FOCUSED_STATUS){
|
||||
final ViewHolder holder = (ViewHolder) viewHolder;
|
||||
final Status status = statuses.get(position);
|
||||
|
||||
|
@ -504,12 +508,22 @@ public class StatusListAdapter extends RecyclerView.Adapter implements OnPostAct
|
|||
holder.status_more.getLayoutParams().width = (int) Helper.convertDpToPixel((20*iconSizePercent/100), context);
|
||||
holder.status_privacy.getLayoutParams().height = (int) Helper.convertDpToPixel((20*iconSizePercent/100), context);
|
||||
holder.status_privacy.getLayoutParams().width = (int) Helper.convertDpToPixel((20*iconSizePercent/100), context);
|
||||
holder.status_content.setTextSize(TypedValue.COMPLEX_UNIT_SP, 14*textSizePercent/100);
|
||||
holder.status_account_displayname.setTextSize(TypedValue.COMPLEX_UNIT_SP, 14*textSizePercent/100);
|
||||
holder.status_account_username.setTextSize(TypedValue.COMPLEX_UNIT_SP, 12*textSizePercent/100);
|
||||
holder.status_toot_date.setTextSize(TypedValue.COMPLEX_UNIT_SP, 12*textSizePercent/100);
|
||||
|
||||
if( getItemViewType(position) == FOCUSED_STATUS ) {
|
||||
holder.status_content.setTextSize(TypedValue.COMPLEX_UNIT_SP, 16*textSizePercent/100);
|
||||
holder.status_account_displayname.setTextSize(TypedValue.COMPLEX_UNIT_SP, 16 * textSizePercent / 100);
|
||||
holder.status_account_username.setTextSize(TypedValue.COMPLEX_UNIT_SP, 14 * textSizePercent / 100);
|
||||
holder.status_toot_date.setTextSize(TypedValue.COMPLEX_UNIT_SP, 14*textSizePercent/100);
|
||||
holder.status_content_translated.setTextSize(TypedValue.COMPLEX_UNIT_SP, 16*textSizePercent/100);
|
||||
}else {
|
||||
holder.status_account_displayname.setTextSize(TypedValue.COMPLEX_UNIT_SP, 14 * textSizePercent / 100);
|
||||
holder.status_account_username.setTextSize(TypedValue.COMPLEX_UNIT_SP, 12 * textSizePercent / 100);
|
||||
holder.status_content.setTextSize(TypedValue.COMPLEX_UNIT_SP, 14*textSizePercent/100);
|
||||
holder.status_toot_date.setTextSize(TypedValue.COMPLEX_UNIT_SP, 12*textSizePercent/100);
|
||||
holder.status_content_translated.setTextSize(TypedValue.COMPLEX_UNIT_SP, 14*textSizePercent/100);
|
||||
}
|
||||
holder.status_spoiler.setTextSize(TypedValue.COMPLEX_UNIT_SP, 14*textSizePercent/100);
|
||||
holder.status_content_translated.setTextSize(TypedValue.COMPLEX_UNIT_SP, 14*textSizePercent/100);
|
||||
|
||||
switch (translator) {
|
||||
case Helper.TRANS_NONE:
|
||||
holder.yandex_translate.setVisibility(View.GONE);
|
||||
|
@ -538,7 +552,8 @@ public class StatusListAdapter extends RecyclerView.Adapter implements OnPostAct
|
|||
holder.status_favorite_count.setTextColor(ContextCompat.getColor(context, R.color.dark_icon));
|
||||
holder.status_reblog_count.setTextColor(ContextCompat.getColor(context, R.color.dark_icon));
|
||||
holder.status_reply.setTextColor(ContextCompat.getColor(context, R.color.dark_icon));
|
||||
holder.status_toot_date.setTextColor(ContextCompat.getColor(context, R.color.dark_icon));
|
||||
if( type != RetrieveFeedsAsyncTask.Type.CONTEXT)
|
||||
holder.status_toot_date.setTextColor(ContextCompat.getColor(context, R.color.dark_icon));
|
||||
holder.status_account_displayname.setTextColor(ContextCompat.getColor(context, R.color.dark_icon));
|
||||
}else {
|
||||
changeDrawableColor(context, R.drawable.ic_reply,R.color.black);
|
||||
|
@ -728,7 +743,12 @@ public class StatusListAdapter extends RecyclerView.Adapter implements OnPostAct
|
|||
else
|
||||
holder.status_reblog_count.setText(String.valueOf(status.getReblog().getReblogs_count()));
|
||||
}
|
||||
holder.status_toot_date.setText(Helper.dateDiff(context, status.getCreated_at()));
|
||||
if( type == RetrieveFeedsAsyncTask.Type.CONTEXT) {
|
||||
String fullDate_tmp = Helper.dateDiffFull(status.getCreated_at());
|
||||
String fullDate = fullDate_tmp.substring(0,1).toUpperCase() + fullDate_tmp.substring(1);
|
||||
holder.status_toot_date.setText(fullDate);
|
||||
}else
|
||||
holder.status_toot_date.setText(Helper.dateDiff(context, status.getCreated_at()));
|
||||
|
||||
Helper.absoluteDateTimeReveal(context, holder.status_toot_date, status.getCreated_at());
|
||||
|
||||
|
@ -1611,8 +1631,6 @@ public class StatusListAdapter extends RecyclerView.Adapter implements OnPostAct
|
|||
public void onRetrieveAccount(Card card) {
|
||||
if( conversationPosition < this.statuses.size() && card != null)
|
||||
this.statuses.get(conversationPosition).setCard(card);
|
||||
if( oldPosition < this.statuses.size())
|
||||
statusListAdapter.notifyItemChanged(oldPosition);
|
||||
if( conversationPosition < this.statuses.size())
|
||||
statusListAdapter.notifyItemChanged(conversationPosition);
|
||||
}
|
||||
|
|
|
@ -608,6 +608,11 @@ public class Helper {
|
|||
}
|
||||
|
||||
|
||||
public static String dateDiffFull(Date dateToot){
|
||||
SimpleDateFormat df = (SimpleDateFormat) DateFormat.getDateTimeInstance(DateFormat.FULL, DateFormat.MEDIUM, Locale.getDefault());
|
||||
return df.format(dateToot);
|
||||
}
|
||||
|
||||
/***
|
||||
* Returns a String depending of the date
|
||||
* @param context Context
|
||||
|
|
|
@ -0,0 +1,548 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright 2017 Thomas Schneider
|
||||
|
||||
This file is a part of Mastalab
|
||||
|
||||
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.
|
||||
|
||||
Mastalab 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 Mastalab; if not,
|
||||
see <http://www.gnu.org/licenses>.
|
||||
-->
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/main_container"
|
||||
android:divider="?android:dividerHorizontal"
|
||||
android:showDividers="end"
|
||||
android:paddingTop="5dp"
|
||||
android:orientation="vertical">
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="5dp"
|
||||
android:layout_marginRight="5dp"
|
||||
android:orientation="horizontal"
|
||||
android:baselineAligned="false">
|
||||
<LinearLayout
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="60dp"
|
||||
android:orientation="vertical"
|
||||
>
|
||||
<RelativeLayout
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="match_parent"
|
||||
>
|
||||
<ImageView
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="50dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:id="@+id/status_account_profile"
|
||||
tools:ignore="ContentDescription" />
|
||||
<ImageView
|
||||
android:layout_width="45dp"
|
||||
android:layout_height="45dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:layout_marginStart="5dp"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:visibility="gone"
|
||||
android:id="@+id/status_account_profile_boost"
|
||||
tools:ignore="ContentDescription" />
|
||||
<ImageView
|
||||
android:id="@+id/status_account_profile_boost_by"
|
||||
android:layout_height="30dp"
|
||||
android:layout_width="30dp"
|
||||
android:layout_marginTop="25dp"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_alignParentRight="true"
|
||||
style="?attr/shapeBorder"
|
||||
android:visibility="gone"
|
||||
tools:ignore="ContentDescription" />
|
||||
</RelativeLayout>
|
||||
|
||||
<ImageView
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="5dp"
|
||||
android:id="@+id/new_element"
|
||||
android:visibility="gone"
|
||||
android:src="@drawable/ic_fiber_new"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
tools:ignore="ContentDescription" />
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:layout_marginStart="5dp"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
<TextView
|
||||
android:id="@+id/status_account_displayname"
|
||||
android:visibility="gone"
|
||||
android:maxLines="1"
|
||||
android:drawablePadding="2dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
<LinearLayout
|
||||
android:orientation="horizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
<TextView
|
||||
android:textSize="12sp"
|
||||
android:maxLines="1"
|
||||
android:ellipsize="end"
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="1"
|
||||
android:id="@+id/status_account_username"
|
||||
android:layout_height="wrap_content" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:layout_marginEnd="10dp">
|
||||
<android.support.design.widget.FloatingActionButton
|
||||
android:visibility="gone"
|
||||
android:id="@+id/status_translate"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
app:fabSize="mini"
|
||||
android:layout_marginTop="10dp"
|
||||
android:src="@drawable/ic_translate" />
|
||||
<android.support.design.widget.FloatingActionButton
|
||||
android:id="@+id/status_bookmark"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
app:fabSize="mini"
|
||||
android:layout_marginTop="10dp"
|
||||
android:src="@drawable/ic_bookmark_border" />
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:id="@+id/status_spoiler_container"
|
||||
android:layout_width="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:visibility="gone"
|
||||
android:layout_height="wrap_content">
|
||||
<TextView
|
||||
android:id="@+id/status_spoiler"
|
||||
android:layout_marginTop="10dp"
|
||||
android:textIsSelectable="true"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
<Button
|
||||
android:id="@+id/status_spoiler_button"
|
||||
android:textAllCaps="false"
|
||||
android:drawableLeft="@drawable/ic_remove_red_eye"
|
||||
android:drawableStart="@drawable/ic_remove_red_eye"
|
||||
android:gravity="center"
|
||||
android:drawablePadding="5dp"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingStart="10dp"
|
||||
android:paddingRight="10dp"
|
||||
android:paddingEnd="10dp"
|
||||
android:paddingTop="5dp"
|
||||
android:paddingBottom="5dp"
|
||||
android:maxLines="1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/Base.Widget.AppCompat.Button.Borderless"
|
||||
android:text="@string/load_attachment_spoiler" />
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:id="@+id/status_content_container"
|
||||
android:layout_width="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:layout_height="wrap_content">
|
||||
<TextView
|
||||
android:id="@+id/status_content"
|
||||
android:textIsSelectable="true"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
<LinearLayout
|
||||
android:id="@+id/status_content_translated_container"
|
||||
android:visibility="gone"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
<TextView
|
||||
android:id="@+id/status_content_translated"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
<TextView
|
||||
android:id="@+id/yandex_translate"
|
||||
android:layout_width="match_parent"
|
||||
android:padding="2dp"
|
||||
android:gravity="end"
|
||||
android:text="Powered by Yandex.Translate"
|
||||
android:layout_height="wrap_content"
|
||||
tools:ignore="HardcodedText" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/status_cardview"
|
||||
android:padding="5dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginBottom="5dp"
|
||||
android:visibility="gone"
|
||||
android:background="@drawable/card_border"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
<ImageView
|
||||
android:layout_gravity="center"
|
||||
android:id="@+id/status_cardview_image"
|
||||
android:layout_width="80dp"
|
||||
android:gravity="center"
|
||||
android:layout_height="80dp"
|
||||
tools:ignore="ContentDescription" />
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
android:layout_width="0dp"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:layout_marginStart="2dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_height="wrap_content">
|
||||
<TextView
|
||||
android:textSize="14sp"
|
||||
android:maxLines="1"
|
||||
android:textStyle="bold"
|
||||
android:id="@+id/status_cardview_title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
<TextView
|
||||
android:layout_marginTop="5dp"
|
||||
android:id="@+id/status_cardview_content"
|
||||
android:layout_width="match_parent"
|
||||
android:textSize="12sp"
|
||||
android:maxLines="4"
|
||||
android:layout_height="wrap_content" />
|
||||
<TextView
|
||||
android:id="@+id/status_cardview_url"
|
||||
android:layout_marginTop="5dp"
|
||||
android:textSize="12sp"
|
||||
android:textStyle="italic"
|
||||
android:maxLines="1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
<FrameLayout
|
||||
android:visibility="gone"
|
||||
android:layout_gravity="center"
|
||||
android:id="@+id/status_cardview_video"
|
||||
android:layout_width="300dp"
|
||||
android:layout_height="220dp"
|
||||
>
|
||||
<WebView
|
||||
android:id="@+id/status_cardview_webview"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"/>
|
||||
</FrameLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:visibility="gone"
|
||||
android:id="@+id/status_document_container"
|
||||
android:orientation="horizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="200dp"
|
||||
android:baselineAligned="false">
|
||||
<RelativeLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_height="match_parent"
|
||||
>
|
||||
<ImageView
|
||||
android:id="@+id/status_prev1"
|
||||
android:layout_width="match_parent"
|
||||
android:scaleType="centerCrop"
|
||||
android:layout_height="match_parent"
|
||||
tools:ignore="ContentDescription" />
|
||||
<ImageView
|
||||
android:id="@+id/status_prev1_play"
|
||||
android:visibility="gone"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_width="20dp"
|
||||
android:src="@drawable/ic_play_arrow"
|
||||
android:layout_height="20dp"
|
||||
tools:ignore="ContentDescription" />
|
||||
<ImageView
|
||||
android:id="@+id/hide_preview"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_width="wrap_content"
|
||||
android:src="@drawable/ic_remove_red_eye"
|
||||
android:layout_height="wrap_content"
|
||||
tools:ignore="ContentDescription" />
|
||||
</RelativeLayout>
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
android:layout_width="0dp"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:layout_marginStart="2dp"
|
||||
android:id="@+id/status_container2"
|
||||
android:layout_weight="1"
|
||||
android:layout_height="match_parent">
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:scaleType="centerCrop"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1">
|
||||
<ImageView
|
||||
android:id="@+id/status_prev2"
|
||||
android:layout_width="match_parent"
|
||||
android:scaleType="centerCrop"
|
||||
android:layout_height="match_parent"
|
||||
tools:ignore="ContentDescription" />
|
||||
<ImageView
|
||||
android:visibility="gone"
|
||||
android:id="@+id/status_prev2_play"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_width="20dp"
|
||||
android:src="@drawable/ic_play_arrow"
|
||||
android:layout_height="20dp"
|
||||
tools:ignore="ContentDescription" />
|
||||
</RelativeLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_weight="1"
|
||||
android:layout_width="match_parent"
|
||||
android:orientation="horizontal"
|
||||
android:layout_marginTop="2dp"
|
||||
android:id="@+id/status_container3"
|
||||
android:layout_height="0dp"
|
||||
android:baselineAligned="false">
|
||||
<RelativeLayout
|
||||
android:layout_weight="1"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content">
|
||||
<ImageView
|
||||
android:id="@+id/status_prev3"
|
||||
android:layout_width="match_parent"
|
||||
android:scaleType="centerCrop"
|
||||
android:layout_height="match_parent"
|
||||
tools:ignore="ContentDescription" />
|
||||
<ImageView
|
||||
android:id="@+id/status_prev3_play"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_width="20dp"
|
||||
android:src="@drawable/ic_play_arrow"
|
||||
android:visibility="gone"
|
||||
android:layout_height="20dp"
|
||||
tools:ignore="ContentDescription" />
|
||||
</RelativeLayout>
|
||||
<RelativeLayout
|
||||
android:layout_marginLeft="2dp"
|
||||
android:layout_marginStart="2dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_width="0dp"
|
||||
android:id="@+id/status_prev4_container"
|
||||
android:layout_height="wrap_content">
|
||||
<ImageView
|
||||
android:id="@+id/status_prev4"
|
||||
android:layout_width="match_parent"
|
||||
android:scaleType="centerCrop"
|
||||
android:layout_height="match_parent"
|
||||
tools:ignore="ContentDescription" />
|
||||
<ImageView
|
||||
android:id="@+id/status_prev4_play"
|
||||
android:layout_centerInParent="true"
|
||||
android:visibility="gone"
|
||||
android:layout_width="20dp"
|
||||
android:src="@drawable/ic_play_arrow"
|
||||
android:layout_height="20dp"
|
||||
tools:ignore="ContentDescription" />
|
||||
</RelativeLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
<Button
|
||||
android:id="@+id/status_show_more"
|
||||
android:visibility="gone"
|
||||
android:textAllCaps="false"
|
||||
android:drawableLeft="@drawable/ic_photo"
|
||||
android:drawableStart="@drawable/ic_photo"
|
||||
android:gravity="center"
|
||||
android:drawablePadding="5dp"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingStart="10dp"
|
||||
android:paddingRight="10dp"
|
||||
android:paddingEnd="10dp"
|
||||
android:paddingTop="5dp"
|
||||
android:paddingBottom="5dp"
|
||||
android:maxLines="1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/Base.Widget.AppCompat.Button.Borderless"
|
||||
android:text="@string/load_attachment" />
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:id="@+id/status_spoiler_mention_container"
|
||||
android:layout_width="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:visibility="gone"
|
||||
android:layout_height="wrap_content">
|
||||
<TextView
|
||||
android:id="@+id/status_mention_spoiler"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
</LinearLayout>
|
||||
<TextView
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:id="@+id/status_toot_date"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:maxLines="1"
|
||||
android:layout_marginTop="10dp"
|
||||
android:textStyle="italic"
|
||||
/>
|
||||
<LinearLayout
|
||||
android:id="@+id/status_action_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginBottom="5dp"
|
||||
android:padding="@dimen/drawer_padding"
|
||||
android:layout_marginStart="@dimen/activity_vertical_margin"
|
||||
android:layout_marginLeft="@dimen/activity_vertical_margin"
|
||||
android:layout_marginEnd="@dimen/activity_vertical_margin"
|
||||
android:layout_marginRight="@dimen/activity_vertical_margin"
|
||||
android:orientation="horizontal">
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
<TextView
|
||||
android:drawablePadding="2dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:gravity="center_vertical"
|
||||
android:id="@+id/status_reply"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
<ProgressBar
|
||||
android:id="@+id/loader_replies"
|
||||
android:visibility="gone"
|
||||
android:layout_gravity="center"
|
||||
android:gravity="center"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginStart="10dp"
|
||||
android:indeterminate="true"
|
||||
android:layout_width="15dp"
|
||||
android:layout_height="15dp" />
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_marginStart="20dp"
|
||||
android:drawablePadding="2dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:gravity="center_vertical"
|
||||
android:id="@+id/status_reblog_count"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
<TextView
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_marginStart="20dp"
|
||||
android:drawablePadding="2dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:gravity="center_vertical"
|
||||
android:id="@+id/status_favorite_count"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<ImageView
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_marginStart="20dp"
|
||||
android:id="@+id/status_pin"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:src="@drawable/ic_pin_drop"/>
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_gravity="end"
|
||||
android:gravity="end"
|
||||
android:paddingRight="10dp"
|
||||
android:paddingLeft="10dp"
|
||||
android:layout_height="wrap_content">
|
||||
<ImageView
|
||||
android:layout_marginRight="20dp"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:id="@+id/status_privacy"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_width="25dp"
|
||||
android:layout_height="25dp"
|
||||
tools:ignore="ContentDescription" />
|
||||
<ImageView
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_marginStart="20dp"
|
||||
android:id="@+id/status_more"
|
||||
android:layout_width="25dp"
|
||||
android:layout_height="25dp"
|
||||
android:src="@drawable/ic_more_horiz"
|
||||
tools:ignore="ContentDescription" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:visibility="gone"
|
||||
android:layout_marginBottom="5dp"
|
||||
android:layout_marginStart="@dimen/activity_vertical_margin"
|
||||
android:layout_marginLeft="@dimen/activity_vertical_margin"
|
||||
android:layout_marginEnd="@dimen/activity_vertical_margin"
|
||||
android:layout_marginRight="@dimen/activity_vertical_margin"
|
||||
android:id="@+id/status_replies"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:baselineAligned="false">
|
||||
<LinearLayout
|
||||
android:orientation="horizontal"
|
||||
android:id="@+id/status_replies_profile_pictures"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"/>
|
||||
</LinearLayout>
|
||||
<Button
|
||||
android:id="@+id/fetch_more"
|
||||
android:visibility="gone"
|
||||
android:textAllCaps="false"
|
||||
android:drawableLeft="@drawable/ic_expand_more"
|
||||
android:drawableStart="@drawable/ic_expand_more"
|
||||
android:gravity="center"
|
||||
android:layout_gravity="center"
|
||||
android:drawablePadding="5dp"
|
||||
android:textStyle="bold"
|
||||
android:textSize="16sp"
|
||||
android:maxLines="1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/Base.Widget.AppCompat.Button.Borderless"
|
||||
android:text="@string/fetch_more_toots" />
|
||||
</LinearLayout>
|
Loading…
Reference in New Issue