mirror of
https://github.com/moparisthebest/k-9
synced 2024-12-24 08:38:51 -05:00
Add "starring" to MessageView
This commit is contained in:
parent
d25811c929
commit
c392e778e6
@ -7,6 +7,15 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="2dip"
|
||||
android:background="@android:color/transparent">
|
||||
<CheckBox
|
||||
android:id="@+id/flagged"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:focusable="false"
|
||||
style="?android:attr/starStyle"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentTop="true"
|
||||
/>
|
||||
<TextView
|
||||
android:id="@+id/from"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
@ -50,15 +59,26 @@
|
||||
android:layout_marginLeft="4dip"
|
||||
android:singleLine="false"
|
||||
android:ellipsize="none" />
|
||||
</LinearLayout>
|
||||
<TextView
|
||||
android:id="@+id/time"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textColor="?android:attr/textColorPrimary"
|
||||
android:textSize="10sp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_below="@id/flagged"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_height="wrap_content" />
|
||||
<TextView
|
||||
android:id="@+id/date"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textSize="10sp"
|
||||
android:textColor="?android:attr/textColorPrimary"
|
||||
android:layout_width="wrap_content"
|
||||
android:gravity="bottom|right"
|
||||
android:layout_below="@id/time"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_height="wrap_content" />
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:id="@+id/cc_container"
|
||||
android:layout_width="fill_parent"
|
||||
@ -85,14 +105,6 @@
|
||||
android:layout_marginLeft="4dip"
|
||||
android:singleLine="false"
|
||||
android:ellipsize="none" />
|
||||
<TextView
|
||||
android:id="@+id/date"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textColor="?android:attr/textColorPrimary"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_height="wrap_content" />
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
|
@ -43,6 +43,7 @@ import android.webkit.WebView;
|
||||
import android.webkit.CacheManager.CacheResult;
|
||||
import android.webkit.PluginData;
|
||||
import android.widget.Button;
|
||||
import android.widget.CheckBox;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
@ -91,6 +92,7 @@ public class MessageView extends K9Activity
|
||||
private TextView mToView;
|
||||
private TextView mCcView;
|
||||
private TextView mSubjectView;
|
||||
private CheckBox mFlagged;
|
||||
private int defaultSubjectColor;
|
||||
private WebView mMessageContentView;
|
||||
private LinearLayout mAttachments;
|
||||
@ -257,11 +259,13 @@ public class MessageView extends K9Activity
|
||||
mCcView.setText(values[5]);
|
||||
mAttachmentIcon.setVisibility(msg.arg1 == 1 ? View.VISIBLE : View.GONE);
|
||||
if ((msg.arg2 & FLAG_FLAGGED) != 0) {
|
||||
|
||||
|
||||
mFlagged.setChecked(true);
|
||||
} else {
|
||||
mFlagged.setChecked(false);
|
||||
}
|
||||
mSubjectView.setTextColor(0xff000000 | defaultSubjectColor );
|
||||
|
||||
|
||||
if ((msg.arg2 & FLAG_ANSWERED) != 0) {
|
||||
Drawable answeredIcon = getResources().getDrawable(
|
||||
R.drawable.ic_mms_answered_small);
|
||||
@ -435,6 +439,14 @@ public class MessageView extends K9Activity
|
||||
mShowPicturesSection = findViewById(R.id.show_pictures_section);
|
||||
|
||||
|
||||
mFlagged = (CheckBox)findViewById(R.id.flagged);
|
||||
mFlagged.setOnClickListener(new OnClickListener() {
|
||||
public void onClick(View v) { onFlag(); } });
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
mMessageContentView.setVerticalScrollBarEnabled(true);
|
||||
mMessageContentView.setVerticalScrollbarOverlay(true);
|
||||
mMessageContentView.setScrollBarStyle(View.SCROLLBARS_INSIDE_OVERLAY);
|
||||
|
Loading…
Reference in New Issue
Block a user