25 MAR 2020

shared-preferences basic-activity floating-action-button

andy4

Shared Preferences

shared

If you have a relatively small collection of key-values that you’d like to save, you should use the SharedPreferences APIs. A SharedPreferences object points to a file containing key-value pairs and provides simple methods to read and write them. Each SharedPreferences file is managed by the framework and can be private or shared.

… full article

Fragments

frag

A Fragment represents a behavior or a portion of user interface in a FragmentActivity. You can combine multiple fragments in a single activity to build a multi-pane UI and reuse a fragment in multiple activities. You can think of a fragment as a modular section of an activity, which has its own lifecycle, receives its own input events, and which you can add or remove while the activity is running (sort of like a “sub activity” that you can reuse in different activities).

… full article

Basic Activity

basic

This template creates a simple app with an app bar and a floating action button. It acts as a starting point for your project by providing commonly used UI components.

This template includes:

  • AppBar
  • FloatingActionButton
  • Two layout files: one for the activity and one to separate out text content

… full article

Snackbar

The Snackbar widget provides brief feedback about an operation through a message at the bottom of the screen. Snackbars disappear automatically, either after a timeout or after a user interaction elsewhere on the screen, and can also be swiped off the screen.

Snackbars can also offer the ability to perform an action, such as undoing an action that was just taken, or retrying an action that had failed.

… full article

more topics covered:

  • snackbar – undo action
  • read\write data from preferences

Links:

Leave a comment

Design a site like this with WordPress.com
Get started