simplify inbox-zero screen and make it more helpful

This commit is contained in:
B. Petersen
2019-04-06 18:46:05 +02:00
parent ee6b90c990
commit 96a5971f3d
4 changed files with 16 additions and 20 deletions
Binary file not shown.

Before

Width:  |  Height:  |  Size: 228 KiB

@@ -6,26 +6,15 @@
android:layout_height="wrap_content"
android:paddingTop="30dp">
<TextView android:layout_width="match_parent"
android:layout_height="match_parent"
android:textSize="25sp"
android:gravity="center"
android:padding="16dp"
android:text="@string/chat_all_done_hint"/>
<ImageView
android:layout_gravity="center"
android:src="@drawable/inbox_zero"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<TextView android:id="@+id/description"
<TextView android:id="@+id/all_archived_text"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:layout_marginTop="16dp"
android:layout_marginBottom="16dp"
android:textSize="20sp"
android:lineSpacingMultiplier="1.3"
android:gravity="center"
android:padding="16dp"
android:text="@string/chat_all_done_explain"/>
android:text="@string/chat_all_archived"/>
</org.thoughtcrime.securesms.ConversationListItemInboxZero>
+4 -2
View File
@@ -209,8 +209,7 @@
<string name="chat_record_slide_to_cancel">Slide to cancel</string>
<string name="chat_record_explain">Tap and hold to record a voice message, release to send</string>
<string name="chat_no_chats_yet_hint">Give your inbox something to write home about. Get started by messaging a friend.</string>
<string name="chat_all_done_hint">Inbox zeeerrro</string>
<string name="chat_all_done_explain">Zip. Zilch. Zero. Nada.\nYou\'re all caught up!</string>
<string name="chat_all_archived">All chats archived.\nPress %1$s to start a new chat.</string>
<string name="chat_share_with_title">Share with</string>
<string name="chat_input_placeholder">Message</string>
<string name="chat_archived_label">Archived</string>
@@ -637,6 +636,9 @@
<string name="qrshow_join_verified_group_title">QR invite code</string>
<!-- see qrshow_join_group_hint -->
<string name="qrshow_join_verified_group_hint">Scan this to join the group \"%1$s\".</string>
<!-- see chat_all_archived -->
<string name="chat_all_done_hint">Inbox zeeerrro</string>
<string name="chat_all_done_explain">Zip. Zilch. Zero. Nada.\nYou\'re all caught up!</string>
</resources>
@@ -8,11 +8,13 @@ import android.support.annotation.Nullable;
import android.support.annotation.RequiresApi;
import android.util.AttributeSet;
import android.widget.LinearLayout;
import android.widget.TextView;
import com.b44t.messenger.DcLot;
import org.thoughtcrime.securesms.database.model.ThreadRecord;
import org.thoughtcrime.securesms.mms.GlideRequests;
import org.thoughtcrime.securesms.util.ViewUtil;
import java.util.Locale;
import java.util.Set;
@@ -42,6 +44,9 @@ public class ConversationListItemInboxZero extends LinearLayout implements Binda
@Override
public void bind(@NonNull ThreadRecord thread, int msgId, @NonNull DcLot dcSummary, @NonNull GlideRequests glideRequests, @NonNull Locale locale, @NonNull Set<Long> selectedThreads, boolean batchMode) {
TextView t = ViewUtil.findById(this, R.id.all_archived_text);
if(t!=null) {
t.setText(getContext().getString(R.string.chat_all_archived, "+"));
}
}
}