Some of the essential tools and elements to use to develop modern interfaces for our Android apps. Many elements are available to those who want to try their hand at interface design on Android. Various types of layouts, controls, and menus: all have their purpose and respect the rules imposed by the operating system. However, some of these components enrich the application with flexibility and adaptability, two fundamental characteristics of a modern app, especially on Android. The user interface of an application must not base the navigation between its “pages” exclusively on the alternation of Activities. Instead, the building blocks for managing the interaction should be Fragments.
Their main peculiarity is their reusability. They can be placed within an Activity and become part of another, bringing with them all the internal logic of an application screen. Or, as we will see in practice, the same Fragments can be simultaneously part of two different architectures: a tabbed structure and a Viewpager (a container of different panels) navigable by swipe scrolling ). Fragments are mostly logical elements: with their life cycle, they play a “controller” role, a dialogue between the actual logic of the application and the Layout shown. From the point of view of visual elements, a crucial problem immediately comes to mind: the diversity of displays. This aspect must be addressed by distinguishing the two main aspects:
The structure of an application strongly depends on its purpose. This guide will look at some of the more common application architectures. Once the suitable structure has been chosen, the user interface must be built using some fundamental elements:
The menus themselves will be the objects of particular study in the course of this guide. We will see, in particular, the “imperative” role played by its various declinations in elements widely used in applications, such as the NavigationDrawer, the pop-up side menu, and the Contextual Action Bar, a different way to offer the context menu in the form of a temporary ActionBar.
Also Read: Lenovo ThinkVision P27h-20: An Accurate Workmate