Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/aimedidierm/recyclerviewapp

Android Mobile App that fetch data from an API and display it using a RecyclerView. The app support a landscape layout on tablets.
https://github.com/aimedidierm/recyclerviewapp

android-app kotlin-android

Last synced: about 1 month ago
JSON representation

Android Mobile App that fetch data from an API and display it using a RecyclerView. The app support a landscape layout on tablets.

Awesome Lists containing this project

README

        

# ๐Ÿ“ฑ RecyclerViewApp

## Instructions to Run the App

1. ๐Ÿš€ Clone the repository:
```bash
git clone https://github.com/aimedidierm/RecyclerViewApp.git
```
2. ๐Ÿ” Open the project in VS Code or Android Studio.
- If using VS Code, make sure you have the necessary Android SDK and build tools installed.
3. ๐Ÿ› ๏ธ Build the project:
- In Android Studio: Click on `Build` > `Make Project`.
- In VS Code: Use the terminal and run:
```bash
./gradlew build
```
4. ๐Ÿ“ฒ Run the app on an Android device or emulator:
- In Android Studio: Click on the `Run` button or press `Shift + F10`.
- In VS Code: Use the terminal and run:
```bash
./gradlew installDebug
```

## ๐Ÿ“š Additional Libraries Used

- ๐Ÿš€ Retrofit for network requests
- ๐Ÿ“„ Gson for JSON parsing
- ๐Ÿ“œ RecyclerView for displaying lists

## ๐Ÿ“ Assumptions and Design Decisions

- The app fetches data from the provided API endpoint and displays it in a RecyclerView.
- Clicking on an item in the list navigates to a details view that shows more information about the item.
- The app supports a landscape layout for tablets with a horizontal orientation for the RecyclerView.

## ๐Ÿงช Testing the Project

1. ๐Ÿ“ฅ Clone the repository and navigate to the project directory:
```bash
git clone https://github.com/aimedidierm/RecyclerViewApp.git
cd RecyclerViewApp
```
2. ๐Ÿงน Clean the project and run the tests:

```bash
./gradlew clean test
```

This will execute all unit tests defined in the project.

3. ๐Ÿ“ฑ To run instrumented tests on an Android device or emulator:

```bash
./gradlew connectedAndroidTest
```

Make sure an Android device or emulator is connected before running this command.

4. ๐Ÿ” View the test results:
- Unit test results can be found in `app/build/reports/tests/testDebugUnitTest/`
- Instrumented test results can be found in `app/build/reports/androidTests/connected/`

## ๐Ÿ› ๏ธ Project Structure

```plaintext
RecyclerViewApp
โ”œโ”€โ”€ app
โ”‚ โ”œโ”€โ”€ build.gradle.kts
โ”‚ โ”œโ”€โ”€ src
โ”‚ โ”‚ โ”œโ”€โ”€ main
โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ AndroidManifest.xml
โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ java
โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ com
โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ example
โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ recyclerviewapp
โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ MainActivity.kt
โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ ListViewActivity.kt
โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ DetailsViewActivity.kt
โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ res
โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ layout
โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ activity_details_view.xml
โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ activity_list_view.xml
โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ activity_main.xml
โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ item_view.xml
โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ values
โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ xml
โ”‚ โ”œโ”€โ”€ test
โ”‚ โ”‚ โ”œโ”€โ”€ java
โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ com
โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ example
โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ recyclerviewapp
โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ AppTest.kt
โ”‚ โ”œโ”€โ”€ resources
โ”œโ”€โ”€ gradle
โ”‚ โ”œโ”€โ”€ libs.versions.toml
โ”‚ โ””โ”€โ”€ wrapper
โ”‚ โ”œโ”€โ”€ gradle-wrapper.jar
โ”‚ โ””โ”€โ”€ gradle-wrapper.properties
โ”œโ”€โ”€ gradlew
โ”œโ”€โ”€ gradlew.bat
โ””โ”€โ”€ settings.gradle.kts
```