Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- xxxxxxxxxxx
- public class BankomatActivityPINSrpski extends Activity {
- private int brojPokusaja;
- @Override
- public void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- setContentView(R.layout.bankomat_pin_srpski);
- brojPokusaja = 0;
- }
- public void proveri(View v){
- EditText txtPin = (EditText) findViewById(R.id.txtPIN);
- if ( txtPin.getText().equals("1111") ) {
- Intent i;
- i = new Intent (getApplicationContext(), BankomatActivitySrpski.class);
- startActivity(i);
- }
- else {
- brojPokusaja++;
- if ( brojPokusaja >=3){
- Intent i;
- i = new Intent (getApplicationContext(), MainBankomatActivity.class);
- startActivity(i);
- Toast.makeText(getApplicationContext(),
- "3 neuspela pokusaja, KARTICA PROGUTANA", Toast.LENGTH_LONG).show();
- }
- else {
- Toast.makeToast("GRESKA pokusajte ponovo).show();
- }
- }
- }
Add Comment
Please, Sign In to add comment