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
| JTextView.java: | |
| package com.alex.controls; | |
| import android.content.Context; | |
| import android.content.res.ColorStateList; | |
| import android.content.res.Resources; | |
| import android.content.res.TypedArray; | |
| import android.graphics.Canvas; | |
| import android.graphics.Paint; |
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
| package com.kollway.booktravel.util | |
| import android.graphics.Rect | |
| import android.graphics.drawable.Drawable | |
| import android.graphics.drawable.LayerDrawable | |
| import android.graphics.drawable.ShapeDrawable | |
| import android.graphics.drawable.shapes.RoundRectShape | |
| import android.support.annotation.ColorRes | |
| import android.support.v4.content.ContextCompat | |
| import android.view.Gravity |
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
| Apache License | |
| Version 2.0, January 2004 | |
| http://www.apache.org/licenses/ | |
| TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION | |
| 1. Definitions. | |
| "License" shall mean the terms and conditions for use, reproduction, | |
| and distribution as defined by Sections 1 through 9 of this document. |
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
| /* | |
| * Copyright 2017 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 | |
| * | |
| * Unless required by applicable law or agreed to in writing, software distributed under the | |
| * License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
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
| class App : Application(), HasActivityInjector { | |
| @Inject lateinit var activityInjector: DispatchingAndroidInjector<Activity> | |
| override fun activityInjector(): AndroidInjector<Activity> { | |
| return activityInjector | |
| } | |
| override fun onCreate() { | |
| super.onCreate() |
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
| /** | |
| * Created with Android Studio | |
| * User: electrolobzik electrolobzik@gmail.com | |
| * Date: 27/03/2017 | |
| * Time: 22:05 | |
| * | |
| * Event bus implementation with RxJava and RxRelay (https://github.com/JakeWharton/RxRelay) with API similar to https://github.com/greenrobot/EventBus | |
| */ | |
| class RxBus<T> { | |
| var stickyEvent: T? = null |
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
| package com.zly.widget.behavior; | |
| import android.animation.ValueAnimator; | |
| import android.content.Context; | |
| import android.support.design.widget.AppBarLayout; | |
| import android.support.design.widget.CoordinatorLayout; | |
| import android.support.v4.view.ViewCompat; | |
| import android.util.AttributeSet; | |
| import android.view.View; |
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
| Observable<Boolean> emptyFieldStream = Observable.combineLatest( | |
| RxTextView.textChanges(etEmail) | |
| .map(new Func1<CharSequence, Boolean>() { | |
| @Override | |
| public Boolean call(CharSequence charSequence) { | |
| return TextUtils.isEmpty(charSequence); | |
| } | |
| }), | |
| RxTextView.textChanges(etPassword) | |
| .map(new Func1<CharSequence, Boolean>() { |
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
| /* | |
| * 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 | |
| * | |
| * Unless required by applicable law or agreed to in writing, software |
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
| public class AVUpdateUtils { | |
| public static final long RESULT_OK = 0L; | |
| public static final long RESULT_CANCEL = 1L; | |
| public static final long RESULT_INSTALLING = 2L; | |
| private static long downloadInBackground(Context context, String url, File file) { | |
| DownloadManager.Request request = new DownloadManager.Request(Uri.parse(url)); | |
| request.setAllowedNetworkTypes(DownloadManager.Request.NETWORK_WIFI); | |
| request.setAllowedOverRoaming(false); |
NewerOlder