
Media queries allow the page to use different CSS style rules based on characteristics of the device the site is being displayed on, e.g. Flexible images are also sized in relative units, so as to prevent them from displaying outside their containing element. The fluid grid concept calls for page element sizing to be in relative units like percentages, rather than absolute units like pixels or points. Ī responsive design adapts the web-page layout to the viewing environment by using techniques such as fluid proportion-based grids, flexible images, and CSS3 media queries, an extension of the rule, in the following ways: Every Kotlin class has as a superclass.Responsive web design ( RWD) or responsive design is an approach to web design that aims to make web pages render well on a variety of devices and window or screen sizes from minimum to maximum display size to ensure usability and satisfaction. AnyĪny in Kotlin is on the top of the hierarchy. Note that Nothing is a subtype of Unit, that's why the first compile but not the last one. Or, if you prefer, is the result value of any statement (for example println()). The Unit type in Kotlin is the equivalent to the void type in Java. We will look in detail at Unit, Nothing, and Any, and compare against their Java corresponding classes.įinally, we also consider null and how types ending with ? fit into these categories. To take full advantage of the Kotlin Type Hierarchy, it is essential to understand how these three special types work. It is also quite close to the Java Type System, so the interoperability is excellent.ĥ Things You Will Like in Kotlin as a Java Developer
One of the reasons is its Type Hierarchy, which is both very easy to work with and extremely powerful. It should be apparent, even to the casual reader of this blog, that I really like Kotlin as a language.
String of pearls How to Take Advantage of Kotlin Special Types