Skip to content

Instantly share code, notes, and snippets.

package com.dgorod.tourbag.presentation.adapter.base;
import android.content.Context;
import android.support.annotation.CallSuper;
import android.support.annotation.LayoutRes;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
package com.dgorod.tourbag.presentation.mvp.presenter.base;
import android.support.annotation.NonNull;
import com.dgorod.tourbag.commons.Preconditions;
import com.dgorod.tourbag.presentation.rx.RxUtil;
import com.hannesdorfmann.mosby.mvp.MvpNullObjectBasePresenter;
import com.hannesdorfmann.mosby.mvp.MvpView;
import rx.Subscription;
package com.dgorod.tourbag.presentation.analytics;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
/**
* Created by Dmytro Gorodnytskyi on 30-Apr-16.
*/
public interface AbstractAnalyticsHelper {
package com.dgorod.tourbag.presentation.rx;
import android.support.annotation.Nullable;
import rx.Observable;
import rx.Observable.Transformer;
import rx.android.schedulers.AndroidSchedulers;
import rx.schedulers.Schedulers;
/**
package com.dgorod.tourbag.commons;
import java.util.Locale;
/**
* Collection of static methods that helps to check objects.
* Inspired by Google Preconditions class presented Guava.
*
* Created by Dmytro Gorodnytskyi on 18-Apr-16.
*/
@dGorod
dGorod / version_conflicts_gradle.md
Created March 12, 2016 07:42 — forked from uarun/version_conflicts_gradle.md
Resolving version conflicts in Gradle

Resolving Version Conflicts in Gradle

If one module has a dependency on version 1.1 of library X and another module on version 2.0 of the same library, gradle will use the latest version.

Failing a build on version conflict

To make gradle fail the build on encountering a conflict, we can do the following:

configurations.all {

resolutionStrategy {

@dGorod
dGorod / AnimationIdlingResource.java
Last active April 17, 2019 16:18
IdlingResource implementation for Android Espresso test framework. Waits for animation end, if view has one. Useful to test views that have animations.
package com.exsoft.musarium.entity;
import android.support.test.espresso.IdlingResource;
import android.view.View;
import android.view.animation.Animation;
/**
* Created by Dmitriy Gorodnytskiy on 13-Jan-16.
*/
public class AnimationIdlingResource implements IdlingResource {
package com.exsoft.musarium.util;
import android.app.Activity;
import android.content.Context;
import android.content.DialogInterface;
import android.content.pm.PackageManager;
import android.support.annotation.NonNull;
import android.support.v4.app.ActivityCompat;
import android.support.v7.app.AlertDialog;
@dGorod
dGorod / CursorExpandableRecyclerViewAdapter.java
Created December 22, 2015 22:11
Experimental approach to implement expandable RecycleView that works with cursors.
package com.exsoft.musarium.adapter;
/*
* Copyright (C) 2015 exelero01@gmail.com
*
* 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