Я использую Android Studio и пробую значения пропуска для следующего действия. ⇐ Android
-
Anonymous
Я использую Android Studio и пробую значения пропуска для следующего действия.
We can pass the values from one activity to another using putExtra method.
intent.putExtra("key", value);
I am passing two values using this and the first value is getting retrieved as expected, but not the second
intent.putExtra("Code", Code); intent.putExtra("user", "1"); This is how I am retrieving it:
Code = intent.getStringExtra("Code"); userIntent = intent.getStringExtra("user"); Code is getting retrieved but not userIntent, the value is showing 'null' when debugging.
Источник: https://stackoverflow.com/questions/780 ... t-activity
We can pass the values from one activity to another using putExtra method.
intent.putExtra("key", value);
I am passing two values using this and the first value is getting retrieved as expected, but not the second
intent.putExtra("Code", Code); intent.putExtra("user", "1"); This is how I am retrieving it:
Code = intent.getStringExtra("Code"); userIntent = intent.getStringExtra("user"); Code is getting retrieved but not userIntent, the value is showing 'null' when debugging.
Источник: https://stackoverflow.com/questions/780 ... t-activity
Мобильная версия