Skip to content

Instantly share code, notes, and snippets.

Carlo Marinangeli carlonzo

Block or report user

Report or block carlonzo

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
@carlonzo
carlonzo / PopupHighlightItems.java
Last active Nov 2, 2018
Centered Window Android. It will align the contentView at the center of the anchor. It has a addOnGlobalLayoutListener to refresh the position when the size of the contentview changes
View PopupHighlightItems.java
public class PopupHighlightItems {
private WindowManager windowManager;
private final View contentView;
private WeakReference<View> anchor;
private int direction = Gravity.TOP;
private boolean isShowing = false;
private WindowManager.LayoutParams layoutParams;
View PopupHighlightItems.java
public class PopupHighlightItems {
private WindowManager windowManager;
private final View contentView;
private WeakReference<View> anchor;
private int direction = Gravity.TOP;
private boolean isShowing = false;
private WindowManager.LayoutParams layoutParams;
@carlonzo
carlonzo / ParallaxScrollingImages.java
Created Mar 3, 2017
ParallaxScrollingImages yahoo weather like
View ParallaxScrollingImages.java
package it.carlom.bubutranslater;
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.Rect;
import android.graphics.drawable.Drawable;
@carlonzo
carlonzo / CacheFragmentStatePagerAdapter.java
Created Aug 2, 2015
FragmentStatePagerAdapter that caches each pages.
View CacheFragmentStatePagerAdapter.java
/*
* Copyright 2014 Soichiro Kashima
*
* 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
You can’t perform that action at this time.