Skip to content
Zachary Matthews edited this page Dec 13, 2018 · 11 revisions

💬 The demo App will be completely revised, according to my free time, and published on Play Store after the final Release. It will follow the guidelines and the architecture defined in the project AndroidStarterApp.

Starting activity

Starting Activity is SplashActivity: used only for exit and enter transition with Fade effect, while the Main logo visible at startup is managed by a Style with a Drawable, that is, in absolute, the first thing loaded and remains visible for the time necessary by the device to load the app. If your device is fast you will see it for a fraction of a second.

Main Activity

The Demo application is organized in Fragments with 1 Activity MainActivity implementing most of the methods. Each Fragment shows a different example and can assemble more functionalities at once. The Activity implementation is organized in this order:

  • Activity management
  • Initialization methods
  • Navigation drawer & Fragment management
  • Floating Action Button
  • SearchView
  • Option menu preparation & management
  • Dialog listener implementation (for the example of onItemClick)
  • FlexibleAdapter listeners implementation
  • ActionMode implementation with ActionModeHelper.
  • Extras

Adapters

There are 2 custom implementations of FlexibleAdapter: OverallAdapter and ExampleAdapter.
The former manages items only for the types of examples; The latter manages items for each examples. In both cases, the items are bound with the delegation pattern to the Adapter item classes. Others examples like AsyncFilter and Instagram, instead, use directly FlexibleAdapter.

Items / Models

For the example only, most items extend AbstractModelItem to have basic implementation in common such as, fields, getters and setters. But in the end all extend AbstractFlexibleItem or implement IFlexible interface.

Fragments

The Fragments may use Activity implementations or may override specific behaviors themselves. Fragments have AbstractFragment in common to have some methods reusable.

Database

The database is simulated as a singleton in DatabaseService class. Configuration is made at runtime with DatabaseConfiguration class.

Clone this wiki locally