Skip to content

Instantly share code, notes, and snippets.

@MFlisar
MFlisar / build.gradle
Created Oct 25, 2018
Example Project build.gradle
View build.gradle
// Top-level build file where you can add configuration options common to all sub-projects/modules.
apply from: './versions.gradle'
buildscript {
repositories {
// ...
}
dependencies {
classpath 'com.android.tools.build:gradle:' + versions.gradlePlugin
View MyViewGroupMviDelegateImpl.java
package com.appindustry.everywherelauncher.mvi;
import android.app.Activity;
import android.app.Application;
import android.content.Context;
import android.os.Bundle;
import android.os.Parcelable;
import android.support.annotation.NonNull;
import android.util.Log;
import android.view.View;
View InstantTarget.java
import android.graphics.drawable.Drawable;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import com.bumptech.glide.request.target.BaseTarget;
import com.bumptech.glide.request.target.SizeReadyCallback;
import com.bumptech.glide.request.transition.Transition;
public class InstantTarget extends BaseTarget<Drawable> {
private Drawable drawable;
@MFlisar
MFlisar / IconicsBottomNavigationView.java
Last active Jan 14, 2019
IconicsBottomNavigationView - reflection based extension to support iconics icons
View IconicsBottomNavigationView.java
import android.content.Context;
import android.support.design.internal.BottomNavigationPresenter;
import android.support.design.widget.BottomNavigationView;
import android.util.AttributeSet;
import android.util.Log;
import android.view.Menu;
import android.view.MenuInflater;
import com.mikepenz.iconics.utils.IconicsMenuInflaterUtil;
View CachedFileProvider.java
import android.content.ContentProvider;
import android.content.ContentValues;
import android.content.UriMatcher;
import android.database.Cursor;
import android.net.Uri;
import android.os.ParcelFileDescriptor;
import java.io.File;
import java.io.FileNotFoundException;
View ComposeComprehensionsTest.java
import android.support.v4.util.Pair;
import com.michaelflisar.lumberjack.L;
import com.michaelflisar.multiples.Triple;
import io.reactivex.Observable;
import io.reactivex.ObservableSource;
import io.reactivex.ObservableTransformer;
import io.reactivex.annotations.NonNull;
import io.reactivex.functions.BiFunction;
@MFlisar
MFlisar / test.java
Last active Sep 6, 2016
ModelView Test Example
View test.java
// *****************************
// function
// *****************************
public static List<DBMedia> getMedia()
{
ArrayList<DBMedia> medias = new ArrayList<>();
SquidCursor<MediaView> cursor = MainApp.getDB().query(MediaView.class, Query.select(MediaView.PROPERTIES).from(MediaView.SUBQUERY));
cursor.moveToFirst();
@MFlisar
MFlisar / CustomViewPager.java
Last active May 27, 2016
ViewPager for Gesture Image View
View CustomViewPager.java
import android.content.Context;
import android.graphics.Matrix;
import android.graphics.Rect;
import android.graphics.RectF;
import android.support.v4.view.ViewPager;
import android.util.AttributeSet;
import android.view.MotionEvent;
import android.view.View;
import com.alexvasilkov.gestures.views.GestureImageView;
View crash_log_android_instand_run.txt
04-14 09:48:11.123 19871-19871/com.app.test.premium E/com.app.androknife2.utils.StringUtil: [StringUtil-47] com.app.test.data.DataManager$ExistingDataSources; Incompatible class (SUID):com.app.test.data.DataManager$ExistingDataSources: static final long serialVersionUID =4867698184298054210L; but expectedcom.app.test.data.DataManager$ExistingDataSources: static final long serialVersionUID =2877622586407293138L;
java.io.InvalidClassException:com.app.test.data.DataManager$ExistingDataSources; Incompatible class (SUID):com.app.test.data.DataManager$ExistingDataSources: static final long serialVersionUID =4867698184298054210L; but expectedcom.app.test.data.DataManager$ExistingDataSources: static final long serialVersionUID =2877622586407293138L;
at java.io.ObjectInputStream.verifyAndInit(ObjectInputStream.java:2341)
at java.io.ObjectInputStream.readNewClassDesc(ObjectInputStream.java:1643)
at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:657)
at java.io.ObjectInputStream.readNe
View FastScrollerUtil.java
package com.turingtechnologies.materialscrollbar;
import android.support.v7.widget.GridLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.util.Log;
import java.util.ArrayList;
/**
* Created by flisar on 11.04.2016.