Coder Social home page Coder Social logo

progetto-programmazione-mobile's People

Contributors

massimilianobiancucci avatar simone-viozzi avatar

Stargazers

 avatar

Watchers

 avatar  avatar

progetto-programmazione-mobile's Issues

app base structure

the app most important pages are

--------- name ---------- from where they are reached

  • dashboard ---------- ( navView )
  • add new aggregate ( plus fab )
  • Archive things
  • Archive aggregates ( navView )
  • attachment insertion
  • graphs view -------- ( navView )
  • about page --------- ( option menu )
  • dashboard edit mode ( option menu / long press )

permissions

we will need

  • camera
  • location
  • WRITE_EXTERNAL_STORAGE

android app base structure

right now there are

  • the mainActivity
    • has the configurations to handle the bottom navigation drawer and the fab
    • the navController.addOnDestinationChangedListener method menage all the configurations that need to change when changing destination in the navGraph
      navController.addOnDestinationChangedListener { navController: NavController,
      navDestination: NavDestination,
      bundle: Bundle? ->
      // handle the fab gravity
      binding.bottomAppBar.fabAlignmentMode =
      bundle?.getInt("FabGravity", R.integer.FabGravityCenter)?.let { resources.getInteger(it) }
      ?: BottomAppBar.FAB_ALIGNMENT_MODE_CENTER
      // handle the fab hide / show
      if (bundle?.getBoolean("FabShow", true) != false) binding.fab.show() else binding.fab.hide()
      // set the menu of the appbar TODO we most likely want to change how this work and allow to load arbitrary menu
      binding.bottomAppBar.replaceMenu(
      if (bundle?.getBoolean(
      "MenuShow",
      true
      ) != false
      ) R.menu.bottom_bar_menu else R.menu.bottom_bar_menu_hide
      )
      // Display / hide the hamburger menu TODO the theme doesn't work!
      binding.bottomAppBar.navigationIcon = if (bundle?.getBoolean("NavigationIcon", true) == true)
      ResourcesCompat.getDrawable(resources, R.drawable.ic_baseline_menu_24, theme) else null
      // set the fab icon based on attributes
      binding.fab.setImageResource(
      bundle?.getInt("FabIcon", R.drawable.ic_baseline_add_24) ?: R.drawable.ic_baseline_add_24
      )
      }
  • there are created with skeleton, and at least one route to them, the following fragments ( with corresponding view model )
    • about ( no viewModel )
    • add
    • archive ( navView )
    • graphs (navView )
    • home ( navView )

database structure

Aggregate (1st table)

  • id [int] [key]
  • tag_id [id]
  • date [date]
  • location [string]
  • attachment [string]
  • total_cost [float]

Single item (2nd table)

  • id [int] [key]
  • id_aggregate [int]
  • name [string]
  • num [int]
  • parent_tag [string]
  • tag_id [int]
  • cost [int]

tags (3rd table)

  • id [key]
  • tag_name [string]
  • Aggregate [bool]

"archive fragment" blueprint

what is the purpose of this page?

to display all aggregates in the database in a list

which graphical elements should be used?

  • a recyclerView for the list
  • cardView for every element with:
    • the name of the aggregate
    • the total spent on this
    • how many children this aggregate have
    • a preview of the attachment [?]
    • a star button to "favorite" an element [?]
    • ??

how the bottom bar should behave when the user is in this page?

  • the navView should be accessible
  • the option menu' can contain a star icon to filter the items that are favorites [?] is this useful to an user?
  • the fab should be in gravity: end with a search icon [?]

this page need a top app bar?

no

with what structural component of the app this page need to interact?

  • the db
    • need to load the whole db
    • need to be able to query with a partial string
  • the file system to load the preview of the attachment [ is possible? is useful? ]

how this page is reachable from the rest of the app?

with the navView

"add fragment" blueprint

what is the purpose of this page?

in this page the user should be able to add

  • an aggregate
  • the list of things it contain

which graphical elements should be used?

  • mostly Text fields with suggestion enabled.
  • maybe a scroll view to let the user scroll down while adding the things to the aggregate.

how the bottom bar should behave when the user is in this page?

  • in this page the fab move to gravity: end and change icon to a check, the fab will be used to confirm the insertion and save the content.
  • from this view shouldn't be possible to open the navigation view
  • the option menu is useful ?

this page need an top app bar?

the up button can't appear on the bottom app bar ( by material design guidelines ).
so if we want it we need a top app bar

with what structural component of the app this page need to interact?

  • the db -> to do queries for the autosuggestion and save the aggregate in the end
  • the implicit intent / page that let the user add an attachment to the aggregate

how this page is reachable from the rest of the app?

  • the fab when is in gravity: center and has the plus icon.
    • from the dashboard
    • from the archive ?

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.