1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-11-12 12:35:04 -05:00

When we're at the end of the message list, dim the next or prev button instead of making it vanish

This commit is contained in:
Jesse Vincent 2012-09-08 23:16:32 -04:00 committed by Andrew Chen
parent bf531630a4
commit 3ef22ca094

View File

@ -827,8 +827,23 @@ public class MessageView extends K9Activity implements OnClickListener {
menu.findItem(R.id.spam).setVisible(true);
toggleActionsState(menu, true);
menu.findItem(R.id.next_message).setVisible(mNextMessage != null);
menu.findItem(R.id.previous_message).setVisible(mPreviousMessage != null);
if (mNextMessage != null ) {
menu.findItem(R.id.next_message).setEnabled(true);
menu.findItem(R.id.next_message).getIcon().setAlpha(255);
} else {
menu.findItem(R.id.next_message).getIcon().setAlpha(127);
menu.findItem(R.id.next_message).setEnabled(false);
}
if (mPreviousMessage != null ) {
menu.findItem(R.id.previous_message).setEnabled(true);
menu.findItem(R.id.previous_message).getIcon().setAlpha(255);
} else {
menu.findItem(R.id.previous_message).getIcon().setAlpha(127);
menu.findItem(R.id.previous_message).setEnabled(false);
}
// comply with the setting
if (!mAccount.getEnableMoveButtons()) {