- Add the API key to your
local.propertiesfile:
apiKey=<value>- Add to the root level of your app-level
build.gradlefile:
| import android.content.Context; | |
| import android.support.v7.widget.RecyclerView; | |
| import android.util.AttributeSet; | |
| import android.view.View; | |
| import org.jetbrains.annotations.NotNull; | |
| import org.jetbrains.annotations.Nullable; | |
| public class EmptyRecyclerView extends RecyclerView { | |
| @Nullable View emptyView; |
| import android.annotation.TargetApi; | |
| import android.content.Context; | |
| import android.graphics.Canvas; | |
| import android.graphics.Paint; | |
| import android.os.Build; | |
| import android.util.AttributeSet; | |
| import android.view.Gravity; | |
| import android.widget.TextView; | |
| /** | |
| * Simple version used in the article: |
| adb devices | |
| adb shell screencap -p /sdcard/screen.png | |
| adb pull -p -a /sdcard/screen.png | |
| adb shell rm /sdcard/screen.png | |
| For /f "tokens=2-4 delims=/ " %%a in ('date /t') do (set mydate=%%c-%%a-%%b) | |
| For /f "tokens=1-3 delims=/:" %%a in ("%TIME%") do (set mytime=%%a-%%b-%%c) | |
| set mytime=%mytime: =% |
| import org.web3j.crypto.Keys; | |
| import org.web3j.crypto.Sign; | |
| import org.web3j.utils.Numeric; | |
| import java.security.SignatureException; | |
| public class SignUtil { | |
| private static final String GETH_SIGN_PREFIX = "\u0019Ethereum Signed Message:\n32"; |
| class ChatRoomsFragment : Fragment() { | |
| override fun onViewCreated(view: View, savedInstanceState: Bundle?) { | |
| super.onViewCreated(view, savedInstanceState) | |
| viewModel = ViewModelProviders.of(this, factory).get(ChatRoomsViewModel::class.java) | |
| subscribeUi() | |
| } | |
| private fun subscribeUi() { |
The git repo of the kata is here: https://github.com/sandromancuso/cleancoders_openchat/
The "starting-point" branch is where both implementations began: https://github.com/sandromancuso/cleancoders_openchat/tree/starting-point
"openchat-outside-in" branch captures the tomato by tomato history of the London approach."openchat-unclebob" branch captures the tomato by tomato history of the Chicago approach.| @BindingAdapter("uiState") | |
| fun setUiStateForLoading(progressView: ProgressBar, uiState: UIState) { | |
| progressView.visibility = when (uiState) { | |
| Loading -> View.VISIBLE | |
| else -> View.GONE | |
| } | |
| } | |
| @BindingAdapter("uiState") | |
| fun setUiStateForLoadedContent(view: View, uiState: UIState) { |
| package com.fortyseven.fptraining | |
| import arrow.core.Either | |
| import arrow.core.right | |
| import arrow.effects.IO | |
| import arrow.effects.extensions.io.fx.fx | |
| data class Account(val balance: Int) | |
| data class AccountEntity(val balance: Int) |