mirror of
https://github.com/CatimaLoyalty/Android.git
synced 2026-03-31 22:02:08 -04:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user