The Dinner Decider app is a simple Android application that helps users decide where to go for dinner by randomly selecting a restaurant from a list. Users can also add new restaurants to the list for consideration.
To run the app, you can clone this repository and open it in Android Studio.
- Clone the repository:
- Open the project in Android Studio.
- Build and run the app on an Android device or emulator.
The Dinner Decider app allows users to:
- Randomly select a restaurant from a predefined list.
- Add new restaurants to the list for future selections.
Decide Button: Pressing the "Decide" button randomly selects a restaurant from the list and displays it.Add Food Button: Pressing the "Add Food" button adds a new restaurant to the list.
- Launch the app on your Android device or emulator.
- Press the "Decide" button to randomly select a restaurant.
- Optionally, you can add a new restaurant to the list by typing its name in the text field and pressing the "Add Food" button.
- The selected restaurant will be displayed on the screen.
Screenshots will go here
- MainActivity.kt: Contains the main logic of the app.
- foodList: An array list of restaurants.
- onCreate(): Initializes the app and sets up event listeners for buttons.
- decideBtn.setOnClickListener(): Randomly selects a restaurant from foodList and displays it.
- addFoodBtn.setOnClickListener(): Adds a new restaurant to foodList.