This cookbook is similar to Vue cookbook but contains our custom recipes for some specific cases.
For form validation we use Vuelidate
export default Vue.extend({
...
validations: {| <!-- See: --> | |
| <!-- https://medium.com/omisoft/textinputlayout-styling-8b36a5e0d73c --> | |
| <!-- Style and color must be placed into different files --> | |
| <!-- Style --> | |
| <style name="TextInputLayoutStyle" parent="Widget.MaterialComponents.TextInputLayout.FilledBox"> | |
| <item name="hintTextColor">@color/input_box_color</item> | |
| <item name="passwordToggleTint">@color/input_box_color</item> | |
| <item name="boxStrokeColor">@color/input_box_color</item> |
| class PostRepositoryImplTest { | |
| private lateinit var repository: PostRepositoryImpl | |
| private val mockCacheDataSource: PostCacheDataSource = mock() | |
| private val mockRemoteDataSource: PostRemoteDataSource = mock() | |
| private val postId = post.id | |
| private val cacheItem = post.copy(title = "cache") |
| package com.your.package | |
| import android.app.Dialog | |
| import android.os.Bundle | |
| import com.your.package.R | |
| import com.google.android.material.bottomsheet.BottomSheetDialog | |
| import com.google.android.material.bottomsheet.BottomSheetDialogFragment | |
| /** | |
| * BottomSheetDialog fragment that uses a custom |
This cookbook is similar to Vue cookbook but contains our custom recipes for some specific cases.
For form validation we use Vuelidate
export default Vue.extend({
...
validations: {| package com.airbnb.epoxy | |
| import android.content.Context | |
| import android.graphics.Bitmap | |
| import android.support.annotation.IdRes | |
| import android.support.annotation.Px | |
| import android.support.v7.widget.RecyclerView | |
| import android.view.View | |
| import com.bumptech.glide.Glide | |
| import com.bumptech.glide.RequestBuilder |
| import android.content.Context | |
| import android.content.res.Resources | |
| import android.graphics.drawable.Drawable | |
| import android.support.annotation.AnyRes | |
| import android.support.v4.app.Fragment | |
| import android.support.v4.content.res.ResourcesCompat.* | |
| import android.view.View | |
| val Context.animations | |
| get() = ResourceMapper { resources.getAnimation(it) } |
| package com.nianticlabs.nia.network; | |
| import android.content.Context; | |
| import com.nianticlabs.nia.contextservice.ContextService; | |
| import java.security.KeyStore; | |
| import java.security.KeyStoreException; | |
| import java.security.NoSuchAlgorithmException; | |
| import java.security.cert.CertificateException; | |
| import java.security.cert.X509Certificate; | |
| import javax.net.ssl.TrustManager; |
| <?xml version="1.0" encoding="utf-8"?> | |
| <!-- | |
| Copyright 2016 Google Inc. | |
| 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 |
| import groovyx.net.http.ContentType | |
| import groovyx.net.http.RESTClient | |
| task pushDropbox << { | |
| def outName; | |
| if (System.getenv("GITLAB_CI")) { | |
| outName = "app-debug-${System.getenv("CI_BUILD_REF_NAME")}-SNAPSHOT.apk" | |
| } else { | |
| outName = "app-debug.apk" | |
| } |
| import android.app.Activity; | |
| import android.content.Context; | |
| import android.content.Intent; | |
| import android.content.pm.ResolveInfo; | |
| import android.content.res.AssetFileDescriptor; | |
| import android.database.Cursor; | |
| import android.graphics.Bitmap; | |
| import android.graphics.BitmapFactory; | |
| import android.graphics.Matrix; | |
| import android.media.ExifInterface; |