Giter Site home page Giter Site logo

ismin-android-2023-tp4's Introduction

Part of Android Development - ISMIN

Course followed by students of Mines St Etienne, ISMIN - M2 Computer Science.

Mines St Etienne

TP4: Fragments

๐Ÿ“ Goal

The goal is to refactor the app by introducing Fragments.

Preparatory work:

  • Copy everything from previous TP (except the README)

Then:

  • Create a BookListFragment fragment
  • Update its attributes and factory method (the one called newInstance) to handle a ArrayList<Book>
  • Move the <RecyclerView> from the layout of MainActivity to the one of BookListFragment
  • Do the same for all RecyclerView related logic

In MainActivity:

  • Add a <ConstraintLayout> in the layout
  • Add some code to create a BookListFragment fragment and display it

Then:

  • Create a CreateBookFragment fragment, if you generate it you can keep only onCreateView function and discard everything else
  • Move code and layout from CreateBookActivity to CreateBookFragment
  • Create an interface BookCreator with a onBookCreated(book: Book)
  • Use onAttach function to save a reference to the activity
  • Implement BookCreator interface in MainActivity

๐Ÿš€ Getting Started

  • Start Android Studio
  • Select Open an existing Android Studio project and pick this directory

That's it! You can code!

๐Ÿ›ฐ Extra

No extra this time!

ismin-android-2023-tp4's People

Contributors

gaetanmaisse avatar

Watchers

 avatar  avatar  avatar

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.