Tutorial by Topics: n

Lambda expressions provide a clear and concise way of implementing a single-method interface using an expression. They allow you to reduce the amount of code you have to create and maintain. While similar to anonymous classes, they have no type information by themselves. Type inference needs to happ...
Generics are a facility of generic programming that extend Java's type system to allow a type or method to operate on objects of various types while providing compile-time type safety. In particular, the Java collections framework supports generics to specify the type of objects stored in a collecti...
Gradle is a JVM-based build system that enables developers to write high-level scripts that can be used to automate the process of compilation and application production. It is a flexible plugin-based system, which allows you to automate various aspects of the build process; including compiling and ...
The NavigationView represents a standard navigation menu for application. The menu contents can be populated by a menu resource file. Before using the NavigationView you must add the design support library dependency in the build.gradle file: dependencies { compile 'com.android.support:de...
An interface is a reference type, similar to a class, which can be declared by using interface keyword. Interfaces can contain only constants, method signatures, default methods, static methods, and nested types. Method bodies exist only for default methods and static methods. Like abstract classes...
An Intent is a small message passed around the Android system. This message may hold information about our intention to perform a task. It is basically a passive data structure holding an abstract description of an action to be performed. Intent Intent() Intent Intent(Intent intent) Intent ...
Object : An object is an unordered set of name/value pairs. An object begins with { (left brace) and ends with } (right brace). Each name is followed by : (colon) and the name/value pairs are separated by , (comma). Array : An array is an ordered collection of values. An array begins with [...
Strings (java.lang.String) are pieces of text stored in your program. Strings are not a primitive data type in Java, however, they are very common in Java programs. In Java, Strings are immutable, meaning that they cannot be changed. (Click here for a more thorough explanation of immutability.) ...
int read(byte[] b) throws IOException Note that most of the time you do NOT use InputStreams directly but use BufferedStreams, or similar. This is because InputStream reads from the source every time the read method is called. This can cause significant CPU usage in context switches into an...
Setup Before using data binding, you must enable the plugin in your build.gradle. android { .... dataBinding { enabled = true } } Note: Data binding was added to the Android Gradle plugin in version 1.5.0 Binding class names The data binding plugin generates a bind...
Objects have states and behaviors. Example: A dog has states - color, name, breed as well as behaviors – wagging the tail, barking, eating. An object is an instance of a class. Class − A class can be defined as a template/blueprint that describes the behavior/state that the object of its type suppo...
Note that a ViewTreeObserver instance associated with a View instance can become invalid while that View is still alive. From the View.getViewTreeObserver javadocs: // The returned ViewTreeObserver observer is not guaranteed to remain // valid for the lifetime of this View. If the caller of this...
ParameterDetailsParamsthe type of the parameters sent to the task upon execution.Progressthe type of the progress units published during the background computationResultthe type of the result of the background computation.
All control structures, unless otherwise noted, make use of block statements. These are denoted by curly braces {}. This differs from normal statements, which do not require curly braces, but also come with a stiff caveat in that only the line immediately following the previous statement would b...
SharedPreferences provide a way to save data to disk in the form of key-value pairs. Context Method public SharedPreferences getSharedPreferences(String name, int mode) Activity Method public SharedPreferences getPreferences() SharedPreferences Methods public SharedPre...
Concurrent computing is a form of computing in which several computations are executed concurrently instead of sequentially. Java language is designed to support concurrent programming through the usage of threads. Objects and resources can be accessed by multiple threads; each thread can potentiall...
Material Design is a comprehensive guide for visual, motion, and interaction design across platforms and devices. Also see the original Android blog post introducing the Design Support Library Official Documentation https://developer.android.com/design/material/index.html Guidelines for Mat...

Page 4 of 329