Image for post
Image for post

In Gradle, dependencies are declared as closure in dependencies block.

dependencies {
implementation 'com.squareup.okhttp3.okhttp:3.9.1`

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

Packaging type

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. …

Image for post
Image for post

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)
Image for post
Image for post
Retrieves shared preferences instance for the name “PREF”.

Each shared preferences will have its own instance based on the preference name.

val pref2 = getSharedPreferences("PREF2", MODE_PRIVATE)
Image for post
Image for post
Notice that pref and pref2 have their own instance because of the different names

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.

Image for post
Image for post
Notice that pref2 and pref3 uses the same instance because of the same name

Shared preferences internal structure

Shared preferences internally has an in-memory storage on top of disk storage. …

Image for post
Image for post

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. …


Orhan Obut

Mobile Architect @Atlassian

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store