(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
public class ObjectWaitNotifyExample { | |
private static final long SLEEP_INTERVAL_MS = 1000; | |
private boolean running = true; | |
private Thread thread; | |
public void start() { | |
print("Inside start()..."); | |
thread = new Thread(new Runnable() { | |
@Override | |
public void run() { |
import android.app.Activity; | |
import android.content.Context; | |
import android.graphics.Rect; | |
import android.view.View; | |
import android.view.inputmethod.InputMethodManager; | |
public class KeyboardUtils { | |
public static void hideKeyboard(Activity activity) { | |
View view = activity.findViewById(android.R.id.content); |
import android.content.Context; | |
import android.util.AttributeSet; | |
import android.view.View; | |
import android.widget.AdapterView; | |
/** | |
* Used this to differentiate between user selected and prorammatically selected | |
* Call {@link Spinner#programmaticallySetPosition} to use this feature. | |
* Created by vedant on 6/1/15. |
<?xml version="1.0" encoding="utf-8"?> | |
<resources> | |
<!-- google's material design colours from | |
http://www.google.com/design/spec/style/color.html#color-ui-color-palette --> | |
<!--reds--> | |
<color name="md_red_50">#FFEBEE</color> | |
<color name="md_red_100">#FFCDD2</color> | |
<color name="md_red_200">#EF9A9A</color> |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
#Intro
Kotlin is a new programming language for the JVM. It produces Java bytecode, supports Android and generates JavaScript. The latest version of the language is Kotlin M5.3
Kotlin project website is at kotlin.jetbrains.org.
All the codes here can be copied and run on Kotlin online editor.
Let's get started.