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