Show sending status in ViewEmailFragment
This commit is contained in:
@@ -103,6 +103,24 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
</TableRow>
|
||||
|
||||
<TableRow
|
||||
android:id="@+id/email_status_row"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone" >
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginRight="3dp"
|
||||
android:text="@string/email_status" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/email_status"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
</TableRow>
|
||||
</TableLayout>
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
@@ -55,6 +55,7 @@
|
||||
<string name="email_to">To:</string>
|
||||
<string name="email_sent">Sent:</string>
|
||||
<string name="email_received">Received:</string>
|
||||
<string name="email_status">Status:</string>
|
||||
|
||||
<string name="compose">Compose</string>
|
||||
<string name="subject">Subject</string>
|
||||
|
||||
@@ -18,6 +18,7 @@ import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TableRow;
|
||||
import android.widget.TextView;
|
||||
|
||||
public class ViewEmailFragment extends Fragment {
|
||||
@@ -115,5 +116,11 @@ public class ViewEmailFragment extends Fragment {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
if (BoteHelper.isOutbox(mFolderName)) {
|
||||
((TextView) v.findViewById(R.id.email_status)).setText(
|
||||
BoteHelper.getEmailStatusText(getActivity(), email, true));
|
||||
((TableRow) v.findViewById(R.id.email_status_row)).setVisibility(View.VISIBLE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -200,6 +200,10 @@ public class BoteHelper extends GeneralHelper {
|
||||
}
|
||||
|
||||
public static boolean isOutbox(EmailFolder folder) {
|
||||
return "Outbox".equalsIgnoreCase(folder.getName());
|
||||
return isOutbox(folder.getName());
|
||||
}
|
||||
|
||||
public static boolean isOutbox(String folderName) {
|
||||
return "Outbox".equalsIgnoreCase(folderName);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user