Conflicts UI touch-ups:

1) Fix i18n and layout naming.
2) Error header for message details.
3) Add back button to message details.

// FREEBIE

Closes #2593
pull/1/head
Jake McGinty 9 years ago committed by Moxie Marlinspike
parent 3f93731300
commit ac0a1c0bc1

@ -129,7 +129,10 @@
android:label="Message Details"
android:windowSoftInputMode="stateUnchanged"
android:launchMode="singleTask"
android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"/>
android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"
android:parentActivityName=".ConversationListActivity">
<meta-data android:name="android.support.PARENT_ACTIVITY" android:value=".ConversationListActivity" />
</activity>
<activity android:name=".GroupCreateActivity"
android:windowSoftInputMode="stateVisible"

@ -1,76 +1,93 @@
<?xml version="1.0" encoding="utf-8"?>
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<TableRow android:id="@+id/sent_container"
<TextView android:id="@+id/error_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="@dimen/message_details_table_row_pad">
<TextView android:layout_width="wrap_content"
android:visibility="gone"
android:textColor="#FFF44336"
android:textSize="16sp"
android:padding="5dp"
tools:visibility="visible"
android:text="@string/message_details_header__issues_need_your_attention"
android:textStyle="bold|italic" />
<TableLayout android:id="@+id/metadata_container"
android:layout_width="match_parent"
android:layout_height="match_parent">
<TableRow android:id="@+id/sent_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/message_details_header__sent"
android:gravity="right"
android:textStyle="bold" />
android:padding="@dimen/message_details_table_row_pad">
<TextView android:id="@+id/sent_time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/message_details_table_row_pad"
tools:text="Jan 18, 9:29AM" />
<TextView android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/message_details_header__sent"
android:gravity="right"
android:textStyle="bold" />
</TableRow>
<TextView android:id="@+id/sent_time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/message_details_table_row_pad"
tools:text="Jan 18, 9:29AM" />
<TableRow android:id="@+id/received_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="@dimen/message_details_table_row_pad">
</TableRow>
<TextView android:layout_width="wrap_content"
<TableRow android:id="@+id/received_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/message_details_header__received"
android:gravity="right"
android:textStyle="bold" />
android:padding="@dimen/message_details_table_row_pad">
<TextView android:id="@+id/received_time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/message_details_table_row_pad"
tools:text="Jan 18, 9:31AM" />
<TextView android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/message_details_header__received"
android:gravity="right"
android:textStyle="bold" />
</TableRow>
<TextView android:id="@+id/received_time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/message_details_table_row_pad"
tools:text="Jan 18, 9:31AM" />
<TableRow android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="@dimen/message_details_table_row_pad">
</TableRow>
<TextView android:layout_width="wrap_content"
<TableRow android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/message_details_header__via"
android:gravity="right"
android:textStyle="bold" />
android:padding="@dimen/message_details_table_row_pad">
<TextView android:id="@+id/transport"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/message_details_table_row_pad"
tools:text="Push (TextSecure)" />
<TextView android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/message_details_header__via"
android:gravity="right"
android:textStyle="bold" />
</TableRow>
<TextView android:id="@+id/transport"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/message_details_table_row_pad"
tools:text="Push (TextSecure)" />
<TableRow android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="@dimen/message_details_table_row_pad">
</TableRow>
<TextView android:id="@+id/tofrom"
android:layout_width="wrap_content"
<TableRow android:layout_width="wrap_content"
android:layout_height="wrap_content"
tools:text="@string/message_details_header__to"
android:textStyle="bold" />
android:padding="@dimen/message_details_table_row_pad">
<TextView android:id="@+id/tofrom"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
tools:text="@string/message_details_header__to"
android:textStyle="bold" />
</TableRow>
</TableRow>
</TableLayout>
</TableLayout>
</LinearLayout>

@ -67,7 +67,7 @@
android:paddingBottom="5dp"
android:layout_gravity="center_vertical"
android:drawableLeft="@drawable/ic_error_white_18dp"
android:text="FIX"
android:text="@string/message_recipients_list_item__verify"
android:visibility="gone"/>
<Button android:id="@+id/resend_button"
@ -80,7 +80,7 @@
android:paddingBottom="5dp"
android:layout_gravity="center_vertical"
android:drawableLeft="@drawable/ic_refresh_white_18dp"
android:text="RESEND"
android:text="@string/message_recipients_list_item__resend"
android:visibility="gone"/>

@ -544,6 +544,10 @@
<!-- media_overview_activity -->
<string name="media_overview_activity__no_images">No images</string>
<!-- message_recipients_list_item -->
<string name="message_recipients_list_item__verify">VERIFY</string>
<string name="message_recipients_list_item__resend">RESEND</string>
<!-- MmsPreferencesFragment -->
<string name="MmsPreferencesFragment__manual_mms_settings_are_required">Manual MMS settings are required for your phone.</string>
<string name="MmsPreferencesFragment__enabled">Enabled</string>
@ -658,6 +662,7 @@
<string name="verify_identity_activity__your_identity_you_read">Your identity (you read):</string>
<!-- message_details_header -->
<string name="message_details_header__issues_need_your_attention">Some issues need your attention.</string>
<string name="message_details_header__sent">Sent</string>
<string name="message_details_header__received">Received</string>
<string name="message_details_header__via">Via</string>

@ -18,6 +18,7 @@ package org.thoughtcrime.securesms;
import android.content.Context;
import android.database.Cursor;
import android.graphics.Paint;
import android.os.AsyncTask;
import android.os.Bundle;
import android.support.v4.app.LoaderManager.LoaderCallbacks;
@ -62,6 +63,8 @@ public class MessageDetailsActivity extends PassphraseRequiredActionBarActivity
private boolean isPushGroup;
private ConversationItem conversationItem;
private ViewGroup itemParent;
private View metadataContainer;
private TextView errorText;
private TextView sentDate;
private TextView receivedDate;
private View receivedContainer;
@ -88,6 +91,8 @@ public class MessageDetailsActivity extends PassphraseRequiredActionBarActivity
isPushGroup = getIntent().getBooleanExtra(IS_PUSH_GROUP_EXTRA, false);
itemParent = (ViewGroup) findViewById(R.id.item_container );
recipientsList = (ListView ) findViewById(R.id.recipients_list);
metadataContainer = header.findViewById(R.id.metadata_container);
errorText = (TextView ) header.findViewById(R.id.error_text);
sentDate = (TextView ) header.findViewById(R.id.sent_time);
receivedContainer = header.findViewById(R.id.received_container);
receivedDate = (TextView ) header.findViewById(R.id.received_time);
@ -250,8 +255,15 @@ public class MessageDetailsActivity extends PassphraseRequiredActionBarActivity
inflateMessageViewIfAbsent(messageRecord);
updateRecipients(messageRecord, recipients);
updateTransport(messageRecord);
updateTime(messageRecord);
if (messageRecord.isFailed()) {
errorText.setVisibility(View.VISIBLE);
metadataContainer.setVisibility(View.GONE);
} else {
updateTransport(messageRecord);
updateTime(messageRecord);
errorText.setVisibility(View.GONE);
metadataContainer.setVisibility(View.VISIBLE);
}
}
}

@ -49,7 +49,7 @@ public class MessageDetailsRecipientAdapter extends BaseAdapter implements AbsLi
@Override
public View getView(int position, View convertView, ViewGroup parent) {
if (convertView == null) {
convertView = LayoutInflater.from(context).inflate(R.layout.message_details_recipient, parent, false);
convertView = LayoutInflater.from(context).inflate(R.layout.message_recipient_list_item, parent, false);
}
Recipient recipient = recipients.getRecipientsList().get(position);

Loading…
Cancel
Save