Great Update to the source

This commit is contained in:
Vlad Mihalachi
2014-09-25 14:19:23 +02:00
parent ec5645c2a4
commit 276b831ceb
382 changed files with 21651 additions and 3801 deletions

View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.DEPENDENCIES"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="gen"/>
<classpathentry kind="output" path="bin/classes"/>
</classpath>

View File

@ -0,0 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>FloatingActionButton</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>com.android.ide.eclipse.adt.ResourceManagerBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.android.ide.eclipse.adt.PreCompilerBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.android.ide.eclipse.adt.ApkBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>com.android.ide.eclipse.adt.AndroidNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>

View File

@ -0,0 +1,4 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
org.eclipse.jdt.core.compiler.compliance=1.6
org.eclipse.jdt.core.compiler.source=1.6

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
package="com.faizmalkani.floatingactionbutton">
<application
android:allowBackup="true">
</application>
</manifest>

View File

@ -0,0 +1,28 @@
apply plugin: 'com.android.library'
android {
compileSdkVersion 19
buildToolsVersion "20.0.0"
defaultConfig {
applicationId 'com.faizmalkani.floatingactionbutton'
minSdkVersion 14
targetSdkVersion 19
versionName "1.0"
versionCode 1
}
sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src']
resources.srcDirs = ['src']
aidl.srcDirs = ['src']
renderscript.srcDirs = ['src']
res.srcDirs = ['res']
assets.srcDirs = ['assets']
}
}
}
dependencies {
}

View File

@ -0,0 +1,13 @@
/**
* Automatically generated file. DO NOT MODIFY
*/
package com.faizmalkani.floatingactionbutton;
public final class BuildConfig {
public static final boolean DEBUG = Boolean.parseBoolean("true");
public static final String PACKAGE_NAME = "com.faizmalkani.floatingactionbutton";
public static final String BUILD_TYPE = "debug";
public static final String FLAVOR = "";
public static final int VERSION_CODE = 1;
public static final String VERSION_NAME = "1.0";
}

View File

@ -0,0 +1,13 @@
/**
* Automatically generated file. DO NOT MODIFY
*/
package com.faizmalkani.floatingactionbutton;
public final class BuildConfig {
public static final boolean DEBUG = false;
public static final String PACKAGE_NAME = "com.faizmalkani.floatingactionbutton";
public static final String BUILD_TYPE = "release";
public static final String FLAVOR = "";
public static final int VERSION_CODE = 1;
public static final String VERSION_NAME = "1.0";
}

View File

@ -0,0 +1,13 @@
/**
* Automatically generated file. DO NOT MODIFY
*/
package com.faizmalkani.floatingactionbutton.test;
public final class BuildConfig {
public static final boolean DEBUG = Boolean.parseBoolean("true");
public static final String PACKAGE_NAME = "com.faizmalkani.floatingactionbutton.test";
public static final String BUILD_TYPE = "debug";
public static final String FLAVOR = "";
public static final int VERSION_CODE = 1;
public static final String VERSION_NAME = "1.0";
}

View File

@ -0,0 +1,173 @@
/* AUTO-GENERATED FILE. DO NOT MODIFY.
*
* This class was automatically generated by the
* aapt tool from the resource data it found. It
* should not be modified by hand.
*/
package com.faizmalkani.floatingactionbutton;
public final class R {
public static final class attr {
/** <p>Must be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>",
"<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static int color=0x7f010001;
/** <p>Must be an integer value, such as "<code>100</code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static int drawable=0x7f010000;
/** <p>Must be an integer value, such as "<code>100</code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static int shadowColor=0x7f010005;
/** <p>Must be a floating point value, such as "<code>1.2</code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static int shadowDx=0x7f010003;
/** <p>Must be a floating point value, such as "<code>1.2</code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static int shadowDy=0x7f010004;
/** <p>Must be a floating point value, such as "<code>1.2</code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static int shadowRadius=0x7f010002;
}
public static final class styleable {
/** Attributes that can be used with a FloatingActionButton.
<p>Includes the following attributes:</p>
<table>
<colgroup align="left" />
<colgroup align="left" />
<tr><th>Attribute</th><th>Description</th></tr>
<tr><td><code>{@link #FloatingActionButton_color com.faizmalkani.floatingactionbutton:color}</code></td><td></td></tr>
<tr><td><code>{@link #FloatingActionButton_drawable com.faizmalkani.floatingactionbutton:drawable}</code></td><td></td></tr>
<tr><td><code>{@link #FloatingActionButton_shadowColor com.faizmalkani.floatingactionbutton:shadowColor}</code></td><td></td></tr>
<tr><td><code>{@link #FloatingActionButton_shadowDx com.faizmalkani.floatingactionbutton:shadowDx}</code></td><td></td></tr>
<tr><td><code>{@link #FloatingActionButton_shadowDy com.faizmalkani.floatingactionbutton:shadowDy}</code></td><td></td></tr>
<tr><td><code>{@link #FloatingActionButton_shadowRadius com.faizmalkani.floatingactionbutton:shadowRadius}</code></td><td></td></tr>
</table>
@see #FloatingActionButton_color
@see #FloatingActionButton_drawable
@see #FloatingActionButton_shadowColor
@see #FloatingActionButton_shadowDx
@see #FloatingActionButton_shadowDy
@see #FloatingActionButton_shadowRadius
*/
public static final int[] FloatingActionButton = {
0x7f010000, 0x7f010001, 0x7f010002, 0x7f010003,
0x7f010004, 0x7f010005
};
/**
<p>This symbol is the offset where the {@link com.faizmalkani.floatingactionbutton.R.attr#color}
attribute's value can be found in the {@link #FloatingActionButton} array.
<p>Must be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>",
"<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name com.faizmalkani.floatingactionbutton:color
*/
public static final int FloatingActionButton_color = 1;
/**
<p>This symbol is the offset where the {@link com.faizmalkani.floatingactionbutton.R.attr#drawable}
attribute's value can be found in the {@link #FloatingActionButton} array.
<p>Must be an integer value, such as "<code>100</code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name com.faizmalkani.floatingactionbutton:drawable
*/
public static final int FloatingActionButton_drawable = 0;
/**
<p>This symbol is the offset where the {@link com.faizmalkani.floatingactionbutton.R.attr#shadowColor}
attribute's value can be found in the {@link #FloatingActionButton} array.
<p>Must be an integer value, such as "<code>100</code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name com.faizmalkani.floatingactionbutton:shadowColor
*/
public static final int FloatingActionButton_shadowColor = 5;
/**
<p>This symbol is the offset where the {@link com.faizmalkani.floatingactionbutton.R.attr#shadowDx}
attribute's value can be found in the {@link #FloatingActionButton} array.
<p>Must be a floating point value, such as "<code>1.2</code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name com.faizmalkani.floatingactionbutton:shadowDx
*/
public static final int FloatingActionButton_shadowDx = 3;
/**
<p>This symbol is the offset where the {@link com.faizmalkani.floatingactionbutton.R.attr#shadowDy}
attribute's value can be found in the {@link #FloatingActionButton} array.
<p>Must be a floating point value, such as "<code>1.2</code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name com.faizmalkani.floatingactionbutton:shadowDy
*/
public static final int FloatingActionButton_shadowDy = 4;
/**
<p>This symbol is the offset where the {@link com.faizmalkani.floatingactionbutton.R.attr#shadowRadius}
attribute's value can be found in the {@link #FloatingActionButton} array.
<p>Must be a floating point value, such as "<code>1.2</code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name com.faizmalkani.floatingactionbutton:shadowRadius
*/
public static final int FloatingActionButton_shadowRadius = 2;
};
}

View File

@ -0,0 +1,173 @@
/* AUTO-GENERATED FILE. DO NOT MODIFY.
*
* This class was automatically generated by the
* aapt tool from the resource data it found. It
* should not be modified by hand.
*/
package com.faizmalkani.floatingactionbutton;
public final class R {
public static final class attr {
/** <p>Must be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>",
"<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static int color=0x7f010001;
/** <p>Must be an integer value, such as "<code>100</code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static int drawable=0x7f010000;
/** <p>Must be an integer value, such as "<code>100</code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static int shadowColor=0x7f010005;
/** <p>Must be a floating point value, such as "<code>1.2</code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static int shadowDx=0x7f010003;
/** <p>Must be a floating point value, such as "<code>1.2</code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static int shadowDy=0x7f010004;
/** <p>Must be a floating point value, such as "<code>1.2</code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static int shadowRadius=0x7f010002;
}
public static final class styleable {
/** Attributes that can be used with a FloatingActionButton.
<p>Includes the following attributes:</p>
<table>
<colgroup align="left" />
<colgroup align="left" />
<tr><th>Attribute</th><th>Description</th></tr>
<tr><td><code>{@link #FloatingActionButton_color com.faizmalkani.floatingactionbutton:color}</code></td><td></td></tr>
<tr><td><code>{@link #FloatingActionButton_drawable com.faizmalkani.floatingactionbutton:drawable}</code></td><td></td></tr>
<tr><td><code>{@link #FloatingActionButton_shadowColor com.faizmalkani.floatingactionbutton:shadowColor}</code></td><td></td></tr>
<tr><td><code>{@link #FloatingActionButton_shadowDx com.faizmalkani.floatingactionbutton:shadowDx}</code></td><td></td></tr>
<tr><td><code>{@link #FloatingActionButton_shadowDy com.faizmalkani.floatingactionbutton:shadowDy}</code></td><td></td></tr>
<tr><td><code>{@link #FloatingActionButton_shadowRadius com.faizmalkani.floatingactionbutton:shadowRadius}</code></td><td></td></tr>
</table>
@see #FloatingActionButton_color
@see #FloatingActionButton_drawable
@see #FloatingActionButton_shadowColor
@see #FloatingActionButton_shadowDx
@see #FloatingActionButton_shadowDy
@see #FloatingActionButton_shadowRadius
*/
public static final int[] FloatingActionButton = {
0x7f010000, 0x7f010001, 0x7f010002, 0x7f010003,
0x7f010004, 0x7f010005
};
/**
<p>This symbol is the offset where the {@link com.faizmalkani.floatingactionbutton.R.attr#color}
attribute's value can be found in the {@link #FloatingActionButton} array.
<p>Must be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>",
"<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name com.faizmalkani.floatingactionbutton:color
*/
public static final int FloatingActionButton_color = 1;
/**
<p>This symbol is the offset where the {@link com.faizmalkani.floatingactionbutton.R.attr#drawable}
attribute's value can be found in the {@link #FloatingActionButton} array.
<p>Must be an integer value, such as "<code>100</code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name com.faizmalkani.floatingactionbutton:drawable
*/
public static final int FloatingActionButton_drawable = 0;
/**
<p>This symbol is the offset where the {@link com.faizmalkani.floatingactionbutton.R.attr#shadowColor}
attribute's value can be found in the {@link #FloatingActionButton} array.
<p>Must be an integer value, such as "<code>100</code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name com.faizmalkani.floatingactionbutton:shadowColor
*/
public static final int FloatingActionButton_shadowColor = 5;
/**
<p>This symbol is the offset where the {@link com.faizmalkani.floatingactionbutton.R.attr#shadowDx}
attribute's value can be found in the {@link #FloatingActionButton} array.
<p>Must be a floating point value, such as "<code>1.2</code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name com.faizmalkani.floatingactionbutton:shadowDx
*/
public static final int FloatingActionButton_shadowDx = 3;
/**
<p>This symbol is the offset where the {@link com.faizmalkani.floatingactionbutton.R.attr#shadowDy}
attribute's value can be found in the {@link #FloatingActionButton} array.
<p>Must be a floating point value, such as "<code>1.2</code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name com.faizmalkani.floatingactionbutton:shadowDy
*/
public static final int FloatingActionButton_shadowDy = 4;
/**
<p>This symbol is the offset where the {@link com.faizmalkani.floatingactionbutton.R.attr#shadowRadius}
attribute's value can be found in the {@link #FloatingActionButton} array.
<p>Must be a floating point value, such as "<code>1.2</code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name com.faizmalkani.floatingactionbutton:shadowRadius
*/
public static final int FloatingActionButton_shadowRadius = 2;
};
}

View File

@ -0,0 +1,27 @@
/* AUTO-GENERATED FILE. DO NOT MODIFY.
*
* This class was automatically generated by the
* aapt tool from the resource data it found. It
* should not be modified by hand.
*/
package com.faizmalkani.floatingactionbutton;
public final class R {
public static final class attr {
public static final int color = 0x7f010001;
public static final int drawable = 0x7f010000;
public static final int shadowColor = 0x7f010005;
public static final int shadowDx = 0x7f010003;
public static final int shadowDy = 0x7f010004;
public static final int shadowRadius = 0x7f010002;
}
public static final class styleable {
public static final int[] FloatingActionButton = { 0x7f010000, 0x7f010001, 0x7f010002, 0x7f010003, 0x7f010004, 0x7f010005 };
public static final int FloatingActionButton_color = 1;
public static final int FloatingActionButton_drawable = 0;
public static final int FloatingActionButton_shadowColor = 5;
public static final int FloatingActionButton_shadowDx = 3;
public static final int FloatingActionButton_shadowDy = 4;
public static final int FloatingActionButton_shadowRadius = 2;
}
}

View File

@ -0,0 +1,173 @@
/* AUTO-GENERATED FILE. DO NOT MODIFY.
*
* This class was automatically generated by the
* aapt tool from the resource data it found. It
* should not be modified by hand.
*/
package com.faizmalkani.floatingactionbutton.test;
public final class R {
public static final class attr {
/** <p>Must be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>",
"<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static final int color=0x7f010001;
/** <p>Must be an integer value, such as "<code>100</code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static final int drawable=0x7f010000;
/** <p>Must be an integer value, such as "<code>100</code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static final int shadowColor=0x7f010005;
/** <p>Must be a floating point value, such as "<code>1.2</code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static final int shadowDx=0x7f010003;
/** <p>Must be a floating point value, such as "<code>1.2</code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static final int shadowDy=0x7f010004;
/** <p>Must be a floating point value, such as "<code>1.2</code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static final int shadowRadius=0x7f010002;
}
public static final class styleable {
/** Attributes that can be used with a FloatingActionButton.
<p>Includes the following attributes:</p>
<table>
<colgroup align="left" />
<colgroup align="left" />
<tr><th>Attribute</th><th>Description</th></tr>
<tr><td><code>{@link #FloatingActionButton_color com.faizmalkani.floatingactionbutton.test:color}</code></td><td></td></tr>
<tr><td><code>{@link #FloatingActionButton_drawable com.faizmalkani.floatingactionbutton.test:drawable}</code></td><td></td></tr>
<tr><td><code>{@link #FloatingActionButton_shadowColor com.faizmalkani.floatingactionbutton.test:shadowColor}</code></td><td></td></tr>
<tr><td><code>{@link #FloatingActionButton_shadowDx com.faizmalkani.floatingactionbutton.test:shadowDx}</code></td><td></td></tr>
<tr><td><code>{@link #FloatingActionButton_shadowDy com.faizmalkani.floatingactionbutton.test:shadowDy}</code></td><td></td></tr>
<tr><td><code>{@link #FloatingActionButton_shadowRadius com.faizmalkani.floatingactionbutton.test:shadowRadius}</code></td><td></td></tr>
</table>
@see #FloatingActionButton_color
@see #FloatingActionButton_drawable
@see #FloatingActionButton_shadowColor
@see #FloatingActionButton_shadowDx
@see #FloatingActionButton_shadowDy
@see #FloatingActionButton_shadowRadius
*/
public static final int[] FloatingActionButton = {
0x7f010000, 0x7f010001, 0x7f010002, 0x7f010003,
0x7f010004, 0x7f010005
};
/**
<p>This symbol is the offset where the {@link com.faizmalkani.floatingactionbutton.test.R.attr#color}
attribute's value can be found in the {@link #FloatingActionButton} array.
<p>Must be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>",
"<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name com.faizmalkani.floatingactionbutton.test:color
*/
public static final int FloatingActionButton_color = 1;
/**
<p>This symbol is the offset where the {@link com.faizmalkani.floatingactionbutton.test.R.attr#drawable}
attribute's value can be found in the {@link #FloatingActionButton} array.
<p>Must be an integer value, such as "<code>100</code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name com.faizmalkani.floatingactionbutton.test:drawable
*/
public static final int FloatingActionButton_drawable = 0;
/**
<p>This symbol is the offset where the {@link com.faizmalkani.floatingactionbutton.test.R.attr#shadowColor}
attribute's value can be found in the {@link #FloatingActionButton} array.
<p>Must be an integer value, such as "<code>100</code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name com.faizmalkani.floatingactionbutton.test:shadowColor
*/
public static final int FloatingActionButton_shadowColor = 5;
/**
<p>This symbol is the offset where the {@link com.faizmalkani.floatingactionbutton.test.R.attr#shadowDx}
attribute's value can be found in the {@link #FloatingActionButton} array.
<p>Must be a floating point value, such as "<code>1.2</code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name com.faizmalkani.floatingactionbutton.test:shadowDx
*/
public static final int FloatingActionButton_shadowDx = 3;
/**
<p>This symbol is the offset where the {@link com.faizmalkani.floatingactionbutton.test.R.attr#shadowDy}
attribute's value can be found in the {@link #FloatingActionButton} array.
<p>Must be a floating point value, such as "<code>1.2</code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name com.faizmalkani.floatingactionbutton.test:shadowDy
*/
public static final int FloatingActionButton_shadowDy = 4;
/**
<p>This symbol is the offset where the {@link com.faizmalkani.floatingactionbutton.test.R.attr#shadowRadius}
attribute's value can be found in the {@link #FloatingActionButton} array.
<p>Must be a floating point value, such as "<code>1.2</code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name com.faizmalkani.floatingactionbutton.test:shadowRadius
*/
public static final int FloatingActionButton_shadowRadius = 2;
};
}

View File

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.faizmalkani.floatingactionbutton"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="14"
android:targetSdkVersion="19" />
<application android:allowBackup="true" >
</application>
</manifest>

View File

@ -0,0 +1,13 @@
int attr color 0x7f010001
int attr drawable 0x7f010000
int attr shadowColor 0x7f010005
int attr shadowDx 0x7f010003
int attr shadowDy 0x7f010004
int attr shadowRadius 0x7f010002
int[] styleable FloatingActionButton { 0x7f010000, 0x7f010001, 0x7f010002, 0x7f010003, 0x7f010004, 0x7f010005 }
int styleable FloatingActionButton_color 1
int styleable FloatingActionButton_drawable 0
int styleable FloatingActionButton_shadowColor 5
int styleable FloatingActionButton_shadowDx 3
int styleable FloatingActionButton_shadowDy 4
int styleable FloatingActionButton_shadowRadius 2

View File

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- From: file:/C:/Users/Vlad/Documents/AndroidStudioProjects/turbo-editor/libraries/FloatingActionButton/res/values/attrs.xml -->
<eat-comment />
<declare-styleable name="FloatingActionButton">
<attr name="drawable" format="integer" />
<attr name="color" format="color" />
<attr name="shadowRadius" format="float" />
<attr name="shadowDx" format="float" />
<attr name="shadowDy" format="float" />
<attr name="shadowColor" format="integer" />
</declare-styleable>
</resources>

View File

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.faizmalkani.floatingactionbutton"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="14"
android:targetSdkVersion="19" />
<application android:allowBackup="true" >
</application>
</manifest>

View File

@ -0,0 +1,13 @@
int attr color 0x7f010001
int attr drawable 0x7f010000
int attr shadowColor 0x7f010005
int attr shadowDx 0x7f010003
int attr shadowDy 0x7f010004
int attr shadowRadius 0x7f010002
int[] styleable FloatingActionButton { 0x7f010000, 0x7f010001, 0x7f010002, 0x7f010003, 0x7f010004, 0x7f010005 }
int styleable FloatingActionButton_color 1
int styleable FloatingActionButton_drawable 0
int styleable FloatingActionButton_shadowColor 5
int styleable FloatingActionButton_shadowDx 3
int styleable FloatingActionButton_shadowDy 4
int styleable FloatingActionButton_shadowRadius 2

View File

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- From: file:/C:/Users/Vlad/Documents/AndroidStudioProjects/turbo-editor/libraries/FloatingActionButton/res/values/attrs.xml -->
<eat-comment />
<declare-styleable name="FloatingActionButton">
<attr name="drawable" format="integer" />
<attr name="color" format="color" />
<attr name="shadowRadius" format="float" />
<attr name="shadowDx" format="float" />
<attr name="shadowDy" format="float" />
<attr name="shadowColor" format="integer" />
</declare-styleable>
</resources>

View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<merger version="2" >
<dataSet config="main" >
<source path="C:\Users\Vlad\Documents\AndroidStudioProjects\turbo-editor\libraries\FloatingActionButton\assets" />
</dataSet>
<dataSet config="debug" >
<source path="C:\Users\Vlad\Documents\AndroidStudioProjects\turbo-editor\libraries\FloatingActionButton\src\debug\assets" />
</dataSet>
</merger>

View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<merger version="2" >
<dataSet config="main" >
<source path="C:\Users\Vlad\Documents\AndroidStudioProjects\turbo-editor\libraries\FloatingActionButton\assets" />
</dataSet>
<dataSet config="release" >
<source path="C:\Users\Vlad\Documents\AndroidStudioProjects\turbo-editor\libraries\FloatingActionButton\src\release\assets" />
</dataSet>
</merger>

View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<merger version="2" >
<dataSet config="debug" >
<source path="C:\Users\Vlad\Documents\AndroidStudioProjects\turbo-editor\libraries\FloatingActionButton\build\intermediates\bundles\debug\assets" />
</dataSet>
<dataSet config="main" >
<source path="C:\Users\Vlad\Documents\AndroidStudioProjects\turbo-editor\libraries\FloatingActionButton\src\androidTest\assets" />
</dataSet>
</merger>

View File

@ -0,0 +1,38 @@
<?xml version="1.0" encoding="utf-8"?>
<merger version="2" >
<dataSet config="debug" >
<source path="C:\Users\Vlad\Documents\AndroidStudioProjects\turbo-editor\libraries\FloatingActionButton\build\intermediates\bundles\debug\res" >
<file
path="C:\Users\Vlad\Documents\AndroidStudioProjects\turbo-editor\libraries\FloatingActionButton\build\intermediates\bundles\debug\res\values\values.xml"
qualifiers="" >
<declare-styleable name="FloatingActionButton" >
<attr
name="drawable"
format="integer" />
<attr
name="color"
format="color" />
<attr
name="shadowRadius"
format="float" />
<attr
name="shadowDx"
format="float" />
<attr
name="shadowDy"
format="float" />
<attr
name="shadowColor"
format="integer" />
</declare-styleable>
</file>
</source>
</dataSet>
<dataSet config="main" >
<source path="C:\Users\Vlad\Documents\AndroidStudioProjects\turbo-editor\libraries\FloatingActionButton\src\androidTest\res" />
<source path="C:\Users\Vlad\Documents\AndroidStudioProjects\turbo-editor\libraries\FloatingActionButton\build\generated\res\rs\test\debug" />
<source path="C:\Users\Vlad\Documents\AndroidStudioProjects\turbo-editor\libraries\FloatingActionButton\build\generated\res\generated\test\debug" />
</dataSet>
</merger>

View File

@ -0,0 +1,38 @@
<?xml version="1.0" encoding="utf-8"?>
<merger version="2" >
<dataSet config="main" >
<source path="C:\Users\Vlad\Documents\AndroidStudioProjects\turbo-editor\libraries\FloatingActionButton\res" >
<file
path="C:\Users\Vlad\Documents\AndroidStudioProjects\turbo-editor\libraries\FloatingActionButton\res\values\attrs.xml"
qualifiers="" >
<declare-styleable name="FloatingActionButton" >
<attr
name="drawable"
format="integer" />
<attr
name="color"
format="color" />
<attr
name="shadowRadius"
format="float" />
<attr
name="shadowDx"
format="float" />
<attr
name="shadowDy"
format="float" />
<attr
name="shadowColor"
format="integer" />
</declare-styleable>
</file>
</source>
<source path="C:\Users\Vlad\Documents\AndroidStudioProjects\turbo-editor\libraries\FloatingActionButton\build\generated\res\rs\debug" />
<source path="C:\Users\Vlad\Documents\AndroidStudioProjects\turbo-editor\libraries\FloatingActionButton\build\generated\res\generated\debug" />
</dataSet>
<dataSet config="debug" >
<source path="C:\Users\Vlad\Documents\AndroidStudioProjects\turbo-editor\libraries\FloatingActionButton\src\debug\res" />
</dataSet>
</merger>

View File

@ -0,0 +1,38 @@
<?xml version="1.0" encoding="utf-8"?>
<merger version="2" >
<dataSet config="main" >
<source path="C:\Users\Vlad\Documents\AndroidStudioProjects\turbo-editor\libraries\FloatingActionButton\res" >
<file
path="C:\Users\Vlad\Documents\AndroidStudioProjects\turbo-editor\libraries\FloatingActionButton\res\values\attrs.xml"
qualifiers="" >
<declare-styleable name="FloatingActionButton" >
<attr
name="drawable"
format="integer" />
<attr
name="color"
format="color" />
<attr
name="shadowRadius"
format="float" />
<attr
name="shadowDx"
format="float" />
<attr
name="shadowDy"
format="float" />
<attr
name="shadowColor"
format="integer" />
</declare-styleable>
</file>
</source>
<source path="C:\Users\Vlad\Documents\AndroidStudioProjects\turbo-editor\libraries\FloatingActionButton\build\generated\res\rs\release" />
<source path="C:\Users\Vlad\Documents\AndroidStudioProjects\turbo-editor\libraries\FloatingActionButton\build\generated\res\generated\release" />
</dataSet>
<dataSet config="release" >
<source path="C:\Users\Vlad\Documents\AndroidStudioProjects\turbo-editor\libraries\FloatingActionButton\src\release\res" />
</dataSet>
</merger>

View File

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.faizmalkani.floatingactionbutton.test" >
<uses-sdk
android:minSdkVersion="14"
android:targetSdkVersion="19" />
<instrumentation
android:name="android.test.InstrumentationTestRunner"
android:functionalTest="false"
android:handleProfiling="false"
android:label="Tests for com.faizmalkani.floatingactionbutton.test"
android:targetPackage="com.faizmalkani.floatingactionbutton.test" />
<application android:allowBackup="true" >
<uses-library android:name="android.test.runner" />
</application>
</manifest>

View File

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- From: file:/C:/Users/Vlad/Documents/AndroidStudioProjects/turbo-editor/libraries/FloatingActionButton/build/intermediates/bundles/debug/res/values/values.xml -->
<eat-comment />
<declare-styleable name="FloatingActionButton">
<attr name="drawable" format="integer" />
<attr name="color" format="color" />
<attr name="shadowRadius" format="float" />
<attr name="shadowDx" format="float" />
<attr name="shadowDy" format="float" />
<attr name="shadowColor" format="integer" />
</declare-styleable>
</resources>

View File

@ -0,0 +1,13 @@
int attr color 0x7f010001
int attr drawable 0x7f010000
int attr shadowColor 0x7f010005
int attr shadowDx 0x7f010003
int attr shadowDy 0x7f010004
int attr shadowRadius 0x7f010002
int[] styleable FloatingActionButton { 0x7f010000, 0x7f010001, 0x7f010002, 0x7f010003, 0x7f010004, 0x7f010005 }
int styleable FloatingActionButton_color 1
int styleable FloatingActionButton_drawable 0
int styleable FloatingActionButton_shadowColor 5
int styleable FloatingActionButton_shadowDx 3
int styleable FloatingActionButton_shadowDy 4
int styleable FloatingActionButton_shadowRadius 2

View File

@ -0,0 +1,2 @@
Manifest-Version: 1.0

View File

@ -0,0 +1,2 @@
Manifest-Version: 1.0

View File

@ -0,0 +1,20 @@
# To enable ProGuard in your project, edit project.properties
# to define the proguard.config property as described in that file.
#
# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in ${sdk.dir}/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the ProGuard
# include property in project.properties.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# Add any project specific keep options here:
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}

View File

@ -0,0 +1,16 @@
# This file is automatically generated by Android Tools.
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
#
# This file must be checked in Version Control Systems.
#
# To customize properties used by the Ant build system edit
# "ant.properties", and override values to adapt the script to your
# project structure.
#
# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):
#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
# Project target.
target=android-19
android.library=true

View File

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<declare-styleable name="FloatingActionButton">
<attr name="drawable" format="integer"/>
<attr name="color" format="color"/>
<attr name="shadowRadius" format="float"/>
<attr name="shadowDx" format="float"/>
<attr name="shadowDy" format="float"/>
<attr name="shadowColor" format="integer"/>
</declare-styleable>
</resources>

View File

@ -0,0 +1,50 @@
package com.faizmalkani.floatingactionbutton;
import android.view.View;
import android.widget.AbsListView;
class DirectionScrollListener implements AbsListView.OnScrollListener {
private static final int DIRECTION_CHANGE_THRESHOLD = 1;
private final FloatingActionButton mFloatingActionButton;
private int mPrevPosition;
private int mPrevTop;
private boolean mUpdated;
DirectionScrollListener(FloatingActionButton floatingActionButton) {
mFloatingActionButton = floatingActionButton;
}
@Override
public void onScroll(AbsListView view, int firstVisibleItem, int visibleItemCount, int totalItemCount) {
final View topChild = view.getChildAt(0);
int firstViewTop = 0;
if (topChild != null) {
firstViewTop = topChild.getTop();
}
boolean goingDown;
boolean changed = true;
if (mPrevPosition == firstVisibleItem) {
final int topDelta = mPrevTop - firstViewTop;
goingDown = firstViewTop < mPrevTop;
changed = Math.abs(topDelta) > DIRECTION_CHANGE_THRESHOLD;
} else {
goingDown = firstVisibleItem > mPrevPosition;
}
if (changed && mUpdated) {
if(goingDown)
mFloatingActionButton.hideFab();
else
mFloatingActionButton.showFab();
}
mPrevPosition = firstVisibleItem;
mPrevTop = firstViewTop;
mUpdated = true;
}
@Override
public void onScrollStateChanged(AbsListView view, int scrollState) {
}
}

View File

@ -0,0 +1,145 @@
package com.faizmalkani.floatingactionbutton;
import android.animation.ObjectAnimator;
import android.annotation.SuppressLint;
import android.content.Context;
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;
import android.util.AttributeSet;
import android.util.DisplayMetrics;
import android.view.Display;
import android.view.MotionEvent;
import android.view.View;
import android.view.WindowManager;
import android.view.animation.AccelerateInterpolator;
import android.view.animation.DecelerateInterpolator;
import android.widget.AbsListView;
public class FloatingActionButton extends View
{
Context _context;
Paint mButtonPaint, mDrawablePaint;
Bitmap mBitmap;
int mScreenHeight;
float currentY;
boolean mHidden = false;
ObjectAnimator mShowAnimation;
ObjectAnimator mHideAnimation;
public FloatingActionButton(Context context, AttributeSet attributeSet)
{
super(context, attributeSet);
_context = context;
init(Color.WHITE);
}
@SuppressLint("NewApi")
public FloatingActionButton(Context context)
{
super(context);
_context = context;
init(Color.WHITE);
}
public void setColor(int fabColor)
{
init(fabColor);
}
public void setDrawable(Drawable fabDrawable)
{
mBitmap = ((BitmapDrawable) fabDrawable).getBitmap();
invalidate();
}
public void init(int fabColor)
{
setWillNotDraw(false);
this.setLayerType(View.LAYER_TYPE_SOFTWARE, null);
mButtonPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
mButtonPaint.setColor(fabColor);
mButtonPaint.setStyle(Paint.Style.FILL);
mButtonPaint.setShadowLayer(10.0f, 0.0f, 3.5f, Color.argb(100, 0, 0, 0));
mDrawablePaint = new Paint(Paint.ANTI_ALIAS_FLAG);
invalidate();
WindowManager mWindowManager = (WindowManager) _context.getSystemService(Context.WINDOW_SERVICE);
Display display = mWindowManager.getDefaultDisplay();
Point size = new Point();
display.getSize(size);
mScreenHeight = size.y;
mShowAnimation = ObjectAnimator.ofFloat(this, "Y", currentY);
mHideAnimation = ObjectAnimator.ofFloat(this, "Y", mScreenHeight);
}
@Override
protected void onDraw(Canvas canvas)
{
setClickable(true);
canvas.drawCircle(getWidth()/2, getHeight()/2,(float) (getWidth()/2.6), mButtonPaint);
canvas.drawBitmap(mBitmap, (getWidth() - mBitmap.getWidth()) / 2, (getHeight() - mBitmap.getHeight()) / 2, mDrawablePaint);
}
@Override
public boolean onTouchEvent(MotionEvent event)
{
if(event.getAction() == MotionEvent.ACTION_UP)
{
setAlpha(1.0f);
}
else if(event.getAction() == MotionEvent.ACTION_DOWN)
{
setAlpha(0.6f);
}
return super.onTouchEvent(event);
}
public int dpToPx(int dp)
{
DisplayMetrics displayMetrics = getContext().getResources().getDisplayMetrics();
return Math.round(dp * (displayMetrics.xdpi / DisplayMetrics.DENSITY_DEFAULT));
}
public void hideFab()
{
if(!mHidden && mShowAnimation != null && !mShowAnimation.isRunning())
{
currentY = getY();
mHideAnimation = ObjectAnimator.ofFloat(this, "Y", mScreenHeight);
mHideAnimation.setInterpolator(new AccelerateInterpolator());
mHideAnimation.start();
mHidden = true;
}
}
public void showFab()
{
if(mHidden && mHideAnimation != null && !mHideAnimation.isRunning())
{
mShowAnimation = ObjectAnimator.ofFloat(this, "Y", currentY);
mShowAnimation.setInterpolator(new DecelerateInterpolator());
mShowAnimation.start();
mHidden = false;
}
}
public boolean isHidden(){
return mHidden;
}
public void listenTo(AbsListView listView) {
if (null != listView) {
listView.setOnScrollListener(new DirectionScrollListener(this));
}
}
}