Skip to content

Instantly share code, notes, and snippets.

Eugen Pechanec consp1racy

  • Prague, Czech Republic
Block or report user

Report or block consp1racy

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View Section2.java
package com.xwray.groupie;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v7.util.DiffUtil;
import android.support.v7.util.ListUpdateCallback;
import java.util.ArrayList;
import java.util.Collection;
@consp1racy
consp1racy / XpeceDrawableWrapper.java
Created Apr 19, 2015
How to get around wrapped drawables
View XpeceDrawableWrapper.java
package net.xpece.android.graphics.drawable;
import android.graphics.drawable.Drawable;
import android.util.Log;
import java.lang.reflect.Field;
/**
* Created by Eugen on 8. 3. 2015.
*/
View MaterialUtils.java
// ...
public static void fixToolbarOverflowButton(final Activity activity) {
if (Build.VERSION.SDK_INT >= 21) {
// the problem occurs only on LOLLIPOP when using native Toolbar and Action Bar
try {
final int abId = activity.getResources().getIdentifier("android:id/action_bar", null, null);
final Toolbar toolbar = (Toolbar) activity.getWindow().getDecorView().findViewById(abId);
final int moreId = activity.getResources().getIdentifier("android:string/action_menu_overflow_description", "string", null);
@consp1racy
consp1racy / ToolbarUtils.java
Last active Aug 29, 2015
Material Toolbar Utilities
View ToolbarUtils.java
import android.animation.LayoutTransition;
import android.annotation.TargetApi;
import android.app.ActionBar;
import android.app.Activity;
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Color;
import android.graphics.PorterDuff;
import android.graphics.drawable.Drawable;
import android.os.Build;
You can’t perform that action at this time.