0

I am creating an app in Android Studio and I am fairly new to java programming. The main idea is that in the main activity of my project I will have a list of different options, with check-boxes next to them.

A user has to click on check-boxes which interest him and then press the button on the bottom "Search". After that a new activity will show and for example if the user picked "Option A" and "Option D" then in the new activity two images will show which I will assign to these two activities.

I am can't figure out a way to actually show these images as a result of the checkboxes selected by the user.

Can someone give me a tip on how it may be possible to do?

swiftBoy
  • 35,607
  • 26
  • 136
  • 135

2 Answers2

0

You should start learning Java ASAP (also Android basics). I'd recommend learning it, before developing even simplest app.


You can store options in a list. First declare list:

List<String> optionList = new ArrayList<>();

Then, as user checks checkboxes you can add options:

optionList.add("Option A");
// Or whatever the option is

When you start new activity, you can put&send some data:

void openNewActivity() {
    Intent intent = new Intent(this, NewActivity.class);
    intent.putExtra("options", optionList);
    startActivity(intent);
}

From within NewActivity's OnCreate method, you can get data:

List<String> options = getIntent().getSerializableExtra("options");

Voila!


Good luck!

rzaaeeff
  • 850
  • 1
  • 10
  • 18
0

You have to know Inents,Activity,Images,CheckBoxes. Please search on the web, After that it is also hard I will implement for you.But right know I will suggest you next one. 1)Learn Activity and How to pass through multiple activity data. 2)How to use Checkbox and How to set Image to ImageView .

dara
  • 763
  • 7
  • 14