Update "Enter card" button if card id exists

If someone is editing an existing card, or is adding a card
and wants to change the value, update the name of the button
from "Enter card" to "Edit card", to give the impression that
a new card id need not by typed from scratch.
This commit is contained in:
Branden Archer committed 2017-06-11 15:06:10 -04:00
1 parent c173012955
commit 0a9124c834
8 files changed
+16

No files matched your search

@@ -235,6 +235,15 @@ public class LoyaltyCardViewActivity extends AppCompatActivity
}
});
if(cardIdFieldEdit.getText().length() > 0)
{
enterButton.setText(R.string.editCard);
}
else
{
enterButton.setText(R.string.enterCard);
}
saveButton.setOnClickListener(new View.OnClickListener()
{
@Override