Skip to content

Instantly share code, notes, and snippets.

@cesco89
cesco89 / ImplementationSample.java
Created May 11, 2014 13:04
ListView with detectable scrolling direction
list.setOnDetectScrollListener(new OnDetectScrollListener() {
@Override
public void onUpScrolling() {
// TODO Auto-generated method stub
mBottom.setVisibility(View.VISIBLE);
}
@Override
public void onDownScrolling() {
/*
* Copyright (C) 2014 sebnapi
*
* 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
@cesco89
cesco89 / Fab.java
Last active August 29, 2015 14:04
Android Floating Action Button (FAB). Based on this: https://github.com/FaizMalkani/FloatingActionButton with a couple of additions
import android.animation.ObjectAnimator;
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.Point;
import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.Drawable;
@cesco89
cesco89 / aaa
Last active August 29, 2015 13:56
Random test :P
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<TextView
android:id="@+id/text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"