Coder Social home page Coder Social logo

superheroapi-kotlin's Introduction

Superhero API ๐Ÿฆธ Android App

Technologies Used ๐Ÿ’ป

  • Language: Kotlin
  • Data Architecture: MVP (Model-View-Presenter)
  • Android Frameworks: Android SDK, Android Jetpack
  • UI Components: XML layout with Material Design components
  • RecyclerView: Display of superhero information
  • View Binding: Interaction with UI components
  • Kotlin Coroutines: Handling of asynchronous programming tasks
  • Libraries: Retrofit for API requests, Picasso for image loading and caching
  • Version Control: Git
  • Build Tool: Gradle

Features โš™๏ธ

  • Utilizes the Superhero API to fetch detailed information about superheroes.
  • Search functionality using SearchView and organized results with RecyclerView.
  • Asynchronous programming using Kotlin Coroutines for API data retrieval.
  • Progress Bar for visual feedback during superhero information fetching.
  • ImageView scaleType for optimal and visually appealing display of superhero images.
  • API Service Interface for structured API calls.

Key Components ๐Ÿ› ๏ธ

๐Ÿ”จ Adapters:

SuperheroAdapter

  • Purpose: Manages the display of superhero search results in a RecyclerView.
  • Responsibilities:
    • Inflates superhero item views.
    • Binds superhero data to the item views.

SuperheroViewHolder

  • Purpose: Handles the view representation for individual superheroes within the RecyclerView.
  • Responsibilities:
    • Represents the layout and UI elements for a single superhero item.
    • Provides methods to bind superhero data to the UI.

๐Ÿ”จ Models:

SuperHeroDataResponse

  • Purpose: Represents the response from the Superhero API, including superhero details.
  • Responsibilities:
    • Holds data about the response, such as whether it was successful.
    • Contains a list of superhero items.

SuperHeroDetailResponse

  • Purpose: Represents detailed information about a superhero.
  • Responsibilities:
    • Includes data such as name, powerstats, image, biography, and connections.

๐Ÿ”จ Networking:

ApiService

  • Purpose: Defines the API endpoints for fetching superhero data.
  • Responsibilities:
    • Includes methods for searching superheroes and fetching detailed information about a specific superhero.

๐Ÿ”จ Data:

SuperHeroDataResponse

  • Purpose: Represents the response from the Superhero API, including superhero details.
  • Responsibilities:
    • Holds data about the response, such as whether it was successful.
    • Contains a list of superhero items.

๐Ÿ”จ Contract:

SuperheroContract

  • Purpose: Defines the contract between the View and Presenter.
  • Responsibilities:
    • Specifies the methods that the View and Presenter should implement.

๐Ÿ”จ Presenter:

SuperheroPresenter

  • Purpose: Implements the business logic and handles communication between the View and Model.
  • Responsibilities:
    • Interacts with the SuperheroRepository to fetch and process superhero data.
    • Updates the View based on the results of these operations.

๐Ÿ”จ UI:

MainActivity

  • Purpose: Displays a SearchView, RecyclerView, and handles user interactions for superhero search.
  • Responsibilities:
    • Initiates and manages the UI components, including the SearchView and RecyclerView.
    • Listens for user input and triggers superhero searches.
    • Communicates with the SuperheroAdapter to display search results.

DetailSuperheroActivity

  • Purpose: Displays detailed information about a selected superhero.
  • Responsibilities:
    • Retrieves and displays detailed information about a specific superhero.
    • Utilizes the SuperheroAdapter and SuperheroViewHolder for UI consistency.

Key Features ๐Ÿš€

  • Explore and access a comprehensive database of superheroes through the SuperheroAPI.
  • Visual feedback with a Progress Bar during superhero information retrieval.
  • Utilizes some Android features for a basic user-friendly experience.

Media ๐Ÿ“ท

SuperheroAPI SuperheroScreen

How to Use โœจ

  • Clone the repository.
  • Open the project in Android Studio.
  • Generate your own Token at SuperheroAPI.
  • Add your personal Token to 'ApiService'.
  • Build and run on an Android device or emulator.

Additional Notes ๐Ÿ“

Feel free to contribute, open issues, or use this project as a learning resource for Android development and API integration. The project leverages modern Android development practices and provides insights into using View Binding, Coroutines, Retrofit, and Picasso.

Happy coding ๐Ÿ‘Œ!

superheroapi-kotlin's People

Contributors

jve386 avatar

Watchers

 avatar

superheroapi-kotlin's Issues

Dependency injection

Initialize the ApiService using Dagger and Hilt for dependency injection to ensure that the dependencies are properly maanged.

Make it public

Add feature: toAdd API
Removing mine.
So people can add their own APIs.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.