back soft

مطالب مرتبط با «android running ios» در back soft | نویسنده: استخدام کار

Android - Running next if on second button click

Vote count: 0 as subject says I'm looking for a way to run first if on first click on the button and run next if on click on the button Here is what i tried final Button button = (Button) findViewById(R.id.welcomeButton); final TextView textView = (TextView) findViewById(R.id.welcomeText); button.setOnClickListener(new OnClickListener() { @Override public void onClick(View p1) { int x = 1; if (x == 1) { textView.setText(R.string.step1); button.setText("Next"); // heres increment of the variable x so on next click x will be 2 and the next if will be run instead x++; } if (x == 2) { textView.setText(R.string.step2); button.setText("Next"); } } }); } as you can see theres a increment on first i...

ادامه مطلب

برچسب‌های مرتبط

android running slow | android running app | android running games | android running apps list | android running out of space | android running | android running ios | android running on iphone | android runningtaskinfo | android running games free download