Skip to content
Davide Steduto edited this page May 1, 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
  • Extras

Adapters

There are 2 custom implementations of Flexible Adapter: OverallAdapter and ExampleAdapter. The former manages the items only for the types of examples and adopts the classic way (METHOD B) to bind the items to the ViewHolders; The latter manages items for each examples and adopts the new way (METHOD A) to bind items with their ViewHolders. Only AsyncFilter and Instagram examples, 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