In Gradle, dependencies are declared as closure in
Dependency tree can be displayed via
./gradlew dependencies task. This will display all direct and transitive dependencies.
+--- com.squareup.okhttp3:okhttp:3.9.1 : Direct artifact
\--- com.squareup.okio:okio:1.6.0 : Transitive dependency
All artifacts have a packaging type e.g. jar, aar. Author of the artifact could specify the default packaging type in POM before publishing. If it is not specified in POM, then the default type will be jar for downloading.
Jar (Java Archive): A packaging file format that is used to aggregate and zip java class files.
Aar (Android Archive): Same as jar, additionally includes android resources such as layouts, drawables and AndroidManifest file. …
Shared preferences is a built-in key-value storage.
Following code retrieves the single instance of shared preferences for the given name. The same instance is used across the application whenever it’s retrieved.
val pref = getSharedPreferences("PREF", MODE_PRIVATE)
Each shared preferences will have its own instance based on the preference name.
val pref2 = getSharedPreferences("PREF2", MODE_PRIVATE)
No matter in which context (Activity, fragment, application) it’s called, it’ll always return the same instance for the same name. This guarantees that you will always see the latest changes.
Shared preferences internally has an in-memory storage on top of disk storage. …
One way or another, every developer involves with text and some of us has to go deeper to create some custom drawings. In order to make it right and proper, some terms about text and how the framework provides it, needs to be known.
First and foremost, let’s start with some terms:
Typography is the visual aspect of the text. It uses art and techniques to make the distinction between the same texts.
The word "typography" in English comes from the Greek roots τύπος typos = "impression" and -γραφία -graphia = "writing".
Font is a specific visual representation of the text. …