Instead of the verbose setOnClickListener
:
RxView.clicks(submitButton).subscribe(o -> log("submit button clicked!"));
Observable
.just(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)
textWatcher(object : TextWatcher { | |
private val mArray_pos: IntArray = intArrayOf(3) | |
private var mBeforeTextChanged: CharSequence = "" | |
private val mAppentText: String = "-" | |
override fun afterTextChanged(s: Editable) { | |
for (i in mArray_pos.indices) { | |
if (mBeforeTextChanged.length - mAppentText.length * i == mArray_pos[i] - 1 && s.length - mAppentText.length * i == mArray_pos[i]) { | |
s.append(mAppentText) |
package com.test.myapplication | |
import android.os.Bundle | |
import android.support.v7.app.AppCompatActivity | |
import android.util.Log | |
import kotlinx.android.synthetic.main.activity_main.* | |
class MainActivity : AppCompatActivity() { | |
private val TAG = MainActivity::class.java.simpleName |
[ | |
{ | |
"subno": "50050551", | |
"pastDue": "0.000 KD", | |
"deposit": "0.000 KD", | |
"unbilled": "47.338 KD", | |
"total": "47.338 KD", | |
"totalEx": "47.338" | |
}, | |
{ |
public class Map2 extends AppCompatActivity implements OnMapReadyCallback { | |
private List<LatLng> dataLatlng = new ArrayList<>(); | |
private double a, b; | |
private LatLng data; | |
private int incrementNext = 0; | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.activity_map2); |
curl -L http://bit.ly/10hA8iC | bash |
{ | |
"market": "Pasar Kramat Jati", | |
"data": [{ | |
"name": "Bawang merah", | |
"price": "75300", | |
"status": "down", | |
"unit": "kg" | |
}, { | |
"name": "Cabe keriting merah", | |
"price": "15300", |
package dummy.protophonto.utilAndHelper; | |
/** | |
* Created on : January 20, 2016 | |
* Author : mnafian | |
* Name : M. Nafian | |
* Email : [email protected] | |
* GitHub : https://github.com/mnafian | |
* LinkedIn : https://id.linkedin.com/in/mnafian | |
* Company : Inagata Technosmith |
package dummy.protophonto.utilAndHelper; | |
/** | |
* Created on : January 20, 2016 | |
* Author : mnafian | |
* Name : M. Nafian | |
* Email : [email protected] | |
* GitHub : https://github.com/mnafian | |
* LinkedIn : https://id.linkedin.com/in/mnafian | |
* Company : Inagata Technosmith |
public class unzip extends Activity { | |
/** Called when the activity is first created. */ | |
static final int BUFFER = 2048; | |
TextView textView; | |
@Override | |
public void onCreate(Bundle savedInstanceState) { | |
textView = new TextView(this); |