Skip to content
Davide Steduto edited this page Aug 30, 2016 · 11 revisions

Starting activity

Starting Activity is SplashActivity: only for exit and enter transition with Fade effect (not for logo view, there's no View involved). 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 use the classic way (METHOD B) to bind the items to the ViewHolders; The latter manages items for each examples and use the new way (METHOD A) to bind items with their ViewHolders, just AsyncFilter and Instagram examples 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