This file contains hidden or 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.text.SimpleDateFormat | |
| import java.util.* | |
| /** | |
| * Pattern: yyyy-MM-dd HH:mm:ss | |
| */ | |
| fun Date.formatToServerDateTimeDefaults(): String{ | |
| val sdf= SimpleDateFormat("yyyy-MM-dd HH:mm:ss", Locale.getDefault()) | |
| return sdf.format(this) | |
| } |
This file contains hidden or 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 android.support.annotation.StringDef | |
| import android.text.Editable | |
| import android.text.TextWatcher | |
| import android.widget.EditText | |
| @StringDef(PHONE_9_MASK, PHONE_8_MASK, CPF_MASK, ZIP_CODE_PT_BR, MONTH_YEAR, CREDIT_CARD) | |
| @Retention(AnnotationRetention.SOURCE) | |
| annotation class MaskType | |
| const val PHONE_9_MASK = "(##) #####-####" |
This file contains hidden or 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 android.annotation.SuppressLint | |
| import okhttp3.OkHttpClient | |
| import java.security.cert.CertificateException | |
| import javax.net.ssl.SSLContext | |
| import javax.net.ssl.TrustManager | |
| import javax.net.ssl.X509TrustManager | |
| object UnsafeOkHttpClient { | |
| fun Builder(): OkHttpClient.Builder { | |
| try { |
This file contains hidden or 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 android.content.ComponentName | |
| import android.content.Context | |
| import android.content.CursorLoader | |
| import android.content.pm.PackageManager | |
| import android.net.ConnectivityManager | |
| import android.net.Uri | |
| import android.os.Looper | |
| import android.provider.MediaStore | |
| import android.support.annotation.ColorRes | |
| import android.support.annotation.StringRes |
This file contains hidden or 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 android.support.design.widget.Snackbar | |
| import android.view.View | |
| import com.github.clans.fab.FloatingActionMenu | |
| fun View.visible(){ | |
| this.visibility = View.VISIBLE | |
| } | |
| fun View.visible(visible : Boolean){ | |
| if(visible){ | |
| visible() |
This file contains hidden or 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
| android:clickable="true" | |
| android:focusable="true" | |
| android:foreground="?android:attr/selectableItemBackground" |
This file contains hidden or 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 android.support.v7.widget.RecyclerView | |
| import android.view.LayoutInflater | |
| import android.view.View | |
| import android.view.ViewGroup | |
| import kotlinx.android.synthetic.main.item_container.view.* | |
| import rx.Observable | |
| import rx.subjects.PublishSubject | |
| import javax.inject.Inject | |
| class RecyclerViewAdapter |
NewerOlder