- https://github.com/nrudenko/gradle-android-cq-plugin
- http://plugins.jetbrains.com/plugin/1065
- https://github.com/jshiell/checkstyle-idea
- https://www.openhub.net/p/checkstyle-idea
- https://github.com/sethrylan/rosette/blob/master/gradle/checkstyle.gradle
- https://gist.github.com/shareme/4197561
- http://stackoverflow.com/questions/9339804/where-can-i-find-checkstyle-config-for-android-coding-style
- http://stackoverflow.com/questions/11229217/checkstyle-plugin-for-idea-java-way-of-warnings-presentation-and-automatic-fix
- http://stackoverflow.com/questions/17050654/get-android-gradle-plugin-checkstyle-working-together-command-line-usage
- http://sethrylan.org/2013/07/14/gradle-android-findbugs.html
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
buildscript { | |
repositories { | |
// rather than hit central each time with this: | |
// mavenCentral() | |
// we hit our company Nexus server ont he public group | |
// which includes the Central Repository | |
// and is local, so more performant | |
maven { | |
url "http://localhost:8081/nexus/content/groups/public" | |
} |
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
public class AccountActivity extends BaseActivity { | |
// ---------------------------------- | |
// ATTRIBUTES | |
// ---------------------------------- | |
private AccountComponent component; | |
// ---------------------------------- | |
// LIFE CYCLE | |
// ---------------------------------- | |
@Override |
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
/** | |
* @author Fernando Franco Giráldez | |
*/ | |
public abstract class BaseActivity<T> extends ComponentActivity { | |
// ---------------------------------- | |
// ATTRIBUTES | |
// ---------------------------------- | |
private T component; | |
private ActivityComponent activityComponent; | |
@Inject |
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
public class ToolbarActivity extends AppCompatActivity { | |
// Set the flags that fit your needs | |
private static final int ENABLED_SCROLL_BEHAVIOR = AppBarLayout.LayoutParams.SCROLL_FLAG_ENTER_ALWAYS | AppBarLayout.LayoutParams.SCROLL_FLAG_SCROLL; | |
private static final int DISABLED_SCROLL_BEHAVIOR = 0; | |
private static final int SCROLL_DOWN = 1; | |
//Injected via ButterKnife (http://jakewharton.github.io/butterknife) | |
@InjectView(R.id.toolbar) | |
Toolbar toolbar; | |
@InjectView(R.id.recyclerview) |
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
public class Pager<I, O> { | |
private static final Observable FINISH_SEQUENCE = Observable.never(); | |
private PublishSubject<Observable<I>> pages; | |
private Observable<I> nextPage = finish(); | |
private Subscription subscription = Subscriptions.empty(); | |
private final PagingFunction<I> pagingFunction; | |
private final Func1<I, O> pageTransformer; |
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
public abstract class EndpointInterceptor implements Interceptor { | |
@Override | |
public Response intercept(Chain chain) throws IOException { | |
Request originalRequest = chain.request(); | |
HttpUrl newUrl = replaceHost(originalRequest); | |
Request completeRequest = originalRequest.newBuilder() | |
.url(newUrl) | |
.build(); |
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 es.ffgiraldez.gist.arrow | |
import arrow.core.Option | |
import arrow.core.Try | |
import arrow.effects.extensions.io.fx.fx | |
import arrow.effects.extensions.io.unsafeRun.runBlocking | |
import arrow.unsafe | |
import java.util.Random | |
interface Console { |
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.und0.vocabularymate.x.utils | |
import androidx.annotation.MainThread | |
import androidx.lifecycle.LifecycleOwner | |
import androidx.lifecycle.MutableLiveData | |
import androidx.lifecycle.Observer | |
import java.util.concurrent.atomic.AtomicInteger | |
/** | |
* A [MutableLiveData] variant that introduces a _volatile_ behavior. Namely, it has no "memory" of values set |
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 javafx.application.*; | |
import javafx.geometry.Pos; | |
import javafx.scene.*; | |
import javafx.scene.control.Label; | |
import javafx.scene.layout.*; | |
import javafx.scene.paint.Color; | |
import javafx.stage.*; | |
import javax.imageio.ImageIO; | |
import java.io.IOException; |