This is the source code of one of my blog post. To read the full blog post please click here.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# If your project uses WebView with JS, uncomment the following | |
# and specify the fully qualified class name to the JavaScript interface | |
# class: | |
-keepclassmembers class fqcn.of.javascript.interface.for.webview { | |
public *; | |
} | |
### RxJava, RxAndroid (https://gist.github.com/kosiara/487868792fbd3214f9c9) | |
-keep class rx.schedulers.Schedulers { | |
public static <methods>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.d4vidi | |
import android.content.Context | |
import android.graphics.Rect | |
import android.support.annotation.Px | |
import android.support.v7.widget.RecyclerView | |
import android.view.View | |
/** | |
* A [RecyclerView decorator][RecyclerView.ItemDecoration] which, if applied over a recycler view |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.nezspencer.test | |
import android.os.Bundle | |
import android.support.annotation.NonNull | |
import android.support.v7.app.AppCompatActivity | |
import android.text.Editable | |
import android.text.TextUtils | |
import android.text.TextWatcher | |
import android.widget.EditText | |
import java.text.NumberFormat |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.time.Duration | |
import java.time.Instant | |
object Fibonacci { | |
fun recursive(n: Long): Long = if (n < 2) n else recursive(n - 1) + recursive(n - 2) | |
tailrec fun recursiveTail(n: Long, a: Long, b: Long): Long | |
= if (n < 1) a else recursiveTail(n - 1, b, a + b) | |
fun iterative(n: Long): Long { |