Posts

Showing posts from May, 2022

How to Use Kotlin Shared Preferences in Android | Simplified Kotlin Shared Preference | No 3rd party

Image
Android Shared Preferences Example Tutorial (CURD) SharedPreference: to Store data in the form of value-key pairs with a simple Kotlin class. var sp = SharedPreference(this); In this tutorial, we’ll use Shared Preferences in our android application to store data in the form of key-value pair

Cards - Android Material UI/UX

Image
Cards contain content and actions that relate to information about a subject. Usage  Use a card to display content and actions on a single topic. Cards should be easy to scan for relevant and actionable information. Elements like text and images should be placed on cards in a way that clearly indicates hierarchy. Example Card containing text and images Cards can display content and actions on a single topic. There are four types of cards: Elevated card Filled card Outlined card Custom Card view Takeaways A card is identifiable as a single, contained unit. A card can hold anything from images to headlines, supporting text, buttons, lists, and other components. A card’s layout and dimensions depend on its contents. There is no one right way to make a card. What's new Color : New color mappings and compatibility with dynamic color Elevation : Lower elevation and no shadow by default Types : Three official card types – elevated, filled, and outlined Eg: Card Checkable Making a card ch...

App Settings - Android Material UI/UX

Image
 App settings let users indicate preferences for how an app should behave Usage  Settings should be well-organized, predictable, and contain a manageable number of options.

Banners - Android Material UI/UX

Image
A banner displays a prominent message and related optional actions. Usage  A banner displays an important, succinct message, and provides actions for users to address (or dismiss the banner). It requires a user action to be dismissed. Banners should be displayed at the top of the screen, below a top app bar. They’re persistent and nonmodal, allowing the user to either ignore them or interact with them at any time. Only one banner should be shown at a time.

Flexbox Layout - Android Material UI/UX

Image
In this layout, items will “flex” to different sizes to fill the space. It helps us to make a responsive UI FlexboxLayout extends the ViewGroup like LinearLayout and RelativeLayout. You can specify the attributes from a layout XML like Read more: official link

Buttons - Android Material UI/UX

Image
Buttons help people initiate actions, from sending an email to sharing a document, to liking a post. Usage  Buttons communicate actions that users can take. They are typically placed throughout your UI, in places like: Dialogs Modal windows Forms Cards Toolbars Example Buttons are just one option for representing actions in a product and shouldn’t be overused. Too many buttons on a screen disrupt the visual hierarchy. There are five types of common buttons: Elevated button Filled button Filled tonal button Outlined button Text button Takeaways Choose the type of button based on the importance of the action. The more important the action is, the more emphasis its button should have. All buttons have fully rounded corners There are four common color mappings for buttons, each with a light and dark theme. What's new Color : New color mappings and compatibility with dynamic color. Icons and labels now share the same color. Icons : Standard size for leading and trailing icons is now 18d...