December 2017
Intermediate to advanced
260 pages
7h 34m
English
The full syntax for declaring a property is:
var <propertyName>[: <PropertyType>] [= <property_initializer>] [<getter>] [<setter>]
The initialization, getter, and setter for the objects are optional. The property type is optional if it can be inferred from the initializer (or from the getter return type, as shown in the following snippet).
In Java:
TwitterSession session = TwitterCore.getInstance().getSessionManager().getActiveSession();
In Kotlin:
TwitterCore.getInstance().sessionManager.activeSession
We have defined getter and setter to deal with the toolbar title. Take a look at the AppToolbar.kt interface:
var toolbarTitle: String get() = toolbar.title.toString() set(value) { toolbar.title = value }
The previous ...
Read now
Unlock full access