Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- DEVO PASSARE QUESTO ARRAY IN UN ALTRA ACTIVITY MA NON VA
- activity dove parte
- final Button changeActivity = findViewById(R.id.changeActivity);
- changeActivity.setOnClickListener(new View.OnClickListener() {
- @Override
- public void onClick(View v) {
- Intent i = new Intent(GalleryActivity.this, TestActivity.class);
- startActivity(i);
- Bundle b = new Bundle();
- b.putBooleanArray("ciao", bwImageArray);
- Intent i2 = new Intent(GalleryActivity.this, TestActivity.class);
- i2.putExtras(b);
- }
- });
- activity dove arriva
- @Override
- protected void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- setContentView(R.layout.activity_test);
- Bundle b = this.getIntent().getExtras();
- bwImageArray1 = b.getBooleanArray("ciao");
- final Button testButton = findViewById(R.id.testArrayButton1);
- testButton.setOnClickListener(new View.OnClickListener() {
- public void onClick(View v) {
- testArray(bwImageArray1);
- }
- });
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement