(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.
package com.homeelementsweb.pedidosrecaudosmovilsantander.Controladores.Actividades.Pedido; | |
import android.app.Activity; | |
import android.os.Bundle; | |
import android.util.Log; | |
import android.view.Gravity; | |
import android.view.KeyEvent; | |
import android.view.Menu; | |
import android.view.MenuItem; | |
import android.view.View; |
package com.homeelementsweb.pedidosrecaudosmovilsantander.Controladores.Actividades.Pedido; | |
import android.app.Activity; | |
import android.app.AlertDialog; | |
import android.content.DialogInterface; | |
import android.content.Intent; | |
import android.graphics.Color; | |
import android.os.Bundle; | |
import android.support.v4.view.ViewPager; |
public class MiClase { | |
// ============================================================================================= | |
// CONSTANTES | |
// ============================================================================================= | |
public final String LOG_TAG = getClass().getSimpleName(); | |
private static final int WINDOW_TITLE = R.string.windows_label_mi_clase; | |
/* | |
* Copyright (C) 2014 [email protected] | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
(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 MyAndroidFragment { | |
// ============================================================================================= | |
// CONSTANTS | |
// ============================================================================================= | |
public final String LOG_TAG = getClass().getSimpleName(); | |
private static final int WINDOW_TITLE = R.string.windows_label_mi_clase; | |
private static final String BUNDLE_KEY_SOME_INT = "bk_some_int"; |
package com.javatarts.basketballgm.data; | |
import java.io.File; | |
import java.io.FileOutputStream; | |
import java.io.IOException; | |
import java.io.InputStream; | |
import java.io.OutputStream; | |
import android.content.Context; | |
import android.database.sqlite.SQLiteDatabase; |
#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.
public class AccountAuthenticator extends AbstractAccountAuthenticator { | |
private final Context context; | |
@Inject @ClientId String clientId; | |
@Inject @ClientSecret String clientSecret; | |
@Inject ApiService apiService; | |
public AccountAuthenticator(Context context) { | |
super(context); |
package com.sam016.vsflatomation.service.ble; | |
import java.util.HashMap; | |
import java.util.UUID; | |
public class AllGattCharacteristics { | |
private static HashMap<String, String> attributes = new HashMap(); | |
static { | |
attributes.put("00002a00-0000-1000-8000-00805f9b34fb", "Device Name"); |