mirror of
https://github.com/moparisthebest/k-9
synced 2024-11-11 20:15:03 -05:00
For post-2.8 - start at replacing text buttons with image buttons.
better images are desperately needed.
This commit is contained in:
parent
2aac012282
commit
dcd83f243b
BIN
res/drawable/ic_button_close_clear_cancel.png
Normal file
BIN
res/drawable/ic_button_close_clear_cancel.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.5 KiB |
BIN
res/drawable/ic_button_delete.png
Normal file
BIN
res/drawable/ic_button_delete.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.3 KiB |
BIN
res/drawable/ic_button_flag.png
Normal file
BIN
res/drawable/ic_button_flag.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.4 KiB |
BIN
res/drawable/ic_button_mark_read.png
Normal file
BIN
res/drawable/ic_button_mark_read.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.4 KiB |
BIN
res/drawable/ic_button_mark_unread.png
Normal file
BIN
res/drawable/ic_button_mark_unread.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.5 KiB |
BIN
res/drawable/ic_button_unflag.png
Normal file
BIN
res/drawable/ic_button_unflag.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.4 KiB |
@ -15,34 +15,34 @@
|
||||
android:visibility="gone"
|
||||
android:background="#CCCCCC"
|
||||
>
|
||||
<Button
|
||||
<ImageButton
|
||||
android:id="@+id/batch_read_button"
|
||||
android:layout_width="0dip"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:text="@string/message_list_mark_read_action"
|
||||
android:src="@drawable/ic_button_mark_read"
|
||||
/>
|
||||
<Button
|
||||
<ImageButton
|
||||
android:id="@+id/batch_delete_button"
|
||||
android:layout_width="0dip"
|
||||
android:layout_height="fill_parent"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/message_list_delete_action"
|
||||
android:src="@drawable/ic_button_delete"
|
||||
/>
|
||||
<Button
|
||||
<ImageButton
|
||||
android:id="@+id/batch_flag_button"
|
||||
android:layout_width="0dip"
|
||||
android:layout_height="fill_parent"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/message_list_flag_action"
|
||||
android:src="@drawable/ic_button_flag"
|
||||
/>
|
||||
<Button
|
||||
<ImageButton
|
||||
android:id="@+id/batch_done_button"
|
||||
android:layout_width="0dip"
|
||||
android:layout_height="fill_parent"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/done_action"
|
||||
android:src="@drawable/ic_button_close_clear_cancel"
|
||||
/>
|
||||
</LinearLayout>
|
||||
<ListView
|
||||
|
@ -65,10 +65,10 @@
|
||||
android:layout_width="0dip"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<Button
|
||||
<ImageButton
|
||||
android:id="@+id/delete_scrolling"
|
||||
android:text="@string/delete_action"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/ic_button_delete"
|
||||
android:layout_width="0dip"
|
||||
android:layout_weight="1" />
|
||||
<Button
|
||||
@ -99,10 +99,11 @@
|
||||
android:layout_width="0dip"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<Button
|
||||
<ImageButton
|
||||
android:id="@+id/delete"
|
||||
android:text="@string/delete_action"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/ic_button_delete"
|
||||
android:textSize="0dip"
|
||||
android:layout_width="0dip"
|
||||
android:layout_weight="1" />
|
||||
<Button
|
||||
|
@ -118,10 +118,10 @@ public class MessageList
|
||||
private int mSelectedCount = 0;
|
||||
|
||||
private View mBatchButtonArea;
|
||||
private Button mBatchReadButton;
|
||||
private Button mBatchDeleteButton;
|
||||
private Button mBatchFlagButton;
|
||||
private Button mBatchDoneButton;
|
||||
private ImageButton mBatchReadButton;
|
||||
private ImageButton mBatchDeleteButton;
|
||||
private ImageButton mBatchFlagButton;
|
||||
private ImageButton mBatchDoneButton;
|
||||
|
||||
private FontSizes mFontSizes = K9.getFontSizes();
|
||||
|
||||
@ -547,13 +547,13 @@ public class MessageList
|
||||
|
||||
|
||||
mBatchButtonArea = findViewById(R.id.batch_button_area);
|
||||
mBatchReadButton = (Button) findViewById(R.id.batch_read_button);
|
||||
mBatchReadButton = (ImageButton) findViewById(R.id.batch_read_button);
|
||||
mBatchReadButton.setOnClickListener(this);
|
||||
mBatchDeleteButton = (Button) findViewById(R.id.batch_delete_button);
|
||||
mBatchDeleteButton = (ImageButton) findViewById(R.id.batch_delete_button);
|
||||
mBatchDeleteButton.setOnClickListener(this);
|
||||
mBatchFlagButton = (Button) findViewById(R.id.batch_flag_button);
|
||||
mBatchFlagButton = (ImageButton) findViewById(R.id.batch_flag_button);
|
||||
mBatchFlagButton.setOnClickListener(this);
|
||||
mBatchDoneButton = (Button) findViewById(R.id.batch_done_button);
|
||||
mBatchDoneButton = (ImageButton) findViewById(R.id.batch_done_button);
|
||||
|
||||
mBatchDoneButton.setOnClickListener(this);
|
||||
|
||||
@ -2553,13 +2553,13 @@ public class MessageList
|
||||
mSelectedCount = 0;
|
||||
}
|
||||
|
||||
int readButtonStringId;
|
||||
int flagButtonStringId;
|
||||
int readButtonIconId;
|
||||
int flagButtonIconId;
|
||||
|
||||
if (mSelectedCount==0)
|
||||
{
|
||||
readButtonStringId = R.string.message_list_mark_read_action;
|
||||
flagButtonStringId = R.string.message_list_flag_action;
|
||||
readButtonIconId = R.drawable.ic_button_mark_read;
|
||||
flagButtonIconId = R.drawable.ic_button_flag;
|
||||
hideBatchButtons();
|
||||
}
|
||||
else
|
||||
@ -2567,26 +2567,26 @@ public class MessageList
|
||||
boolean newReadState = computeBatchDirection(false);
|
||||
if (newReadState)
|
||||
{
|
||||
readButtonStringId = R.string.message_list_mark_read_action;
|
||||
readButtonIconId = R.drawable.ic_button_mark_read;
|
||||
}
|
||||
else
|
||||
{
|
||||
readButtonStringId = R.string.message_list_mark_unread_action;
|
||||
readButtonIconId = R.drawable.ic_button_mark_unread;
|
||||
}
|
||||
boolean newFlagState = computeBatchDirection(true);
|
||||
if (newFlagState)
|
||||
{
|
||||
flagButtonStringId = R.string.message_list_flag_action;
|
||||
flagButtonIconId = R.drawable.ic_button_flag;
|
||||
}
|
||||
else
|
||||
{
|
||||
flagButtonStringId = R.string.message_list_unflag_action;
|
||||
flagButtonIconId = R.drawable.ic_button_unflag;
|
||||
}
|
||||
showBatchButtons();
|
||||
}
|
||||
|
||||
mBatchReadButton.setText(readButtonStringId);
|
||||
mBatchFlagButton.setText(flagButtonStringId);
|
||||
mBatchReadButton.setImageResource(readButtonIconId);
|
||||
mBatchFlagButton.setImageResource(flagButtonIconId);
|
||||
}
|
||||
|
||||
class FooterViewHolder
|
||||
|
Loading…
Reference in New Issue
Block a user