Pre-populate card id in Barcode Selector

If a user is attempting to update a card id of an existing card,
before when the Enter Card button was selected the barcode selector
view would be empty. To be more useful, the view will now be
pre-populated with the existing card id.
This commit is contained in:
Branden Archer
2017-02-12 22:37:11 -05:00
parent 596d899449
commit 8660d4e218
2 changed files with 17 additions and 0 deletions

View File

@@ -222,6 +222,15 @@ public class LoyaltyCardViewActivity extends AppCompatActivity
public void onClick(View v)
{
Intent i = new Intent(getApplicationContext(), BarcodeSelectorActivity.class);
String cardId = cardIdFieldEdit.getText().toString();
if(cardId.length() > 0)
{
final Bundle b = new Bundle();
b.putString("initialCardId", cardId);
i.putExtras(b);
}
startActivityForResult(i, SELECT_BARCODE_REQUEST);
}
});