diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..4fa7e0b
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,108 @@
+# Created by https://www.gitignore.io
+
+### Android ###
+# Built application files
+*.apk
+*.ap_
+
+# Files for the Dalvik VM
+*.dex
+
+# Java class files
+*.class
+
+# Generated files
+bin/
+gen/
+
+# Gradle files
+.gradle/
+build/
+/*/build/
+
+# Local configuration file (sdk path, etc)
+local.properties
+
+# Proguard folder generated by Eclipse
+proguard/
+
+# Log Files
+*.log
+
+### Android Patch ###
+gen-external-apklibs
+
+
+### Intellij ###
+# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm
+
+*.iml
+
+## Directory-based project format:
+.idea/
+# if you remove the above rule, at least ignore the following:
+
+# User-specific stuff:
+# .idea/workspace.xml
+# .idea/tasks.xml
+# .idea/dictionaries
+
+# Sensitive or high-churn files:
+# .idea/dataSources.ids
+# .idea/dataSources.xml
+# .idea/sqlDataSources.xml
+# .idea/dynamic.xml
+# .idea/uiDesigner.xml
+
+# Gradle:
+# .idea/gradle.xml
+# .idea/libraries
+
+# Mongo Explorer plugin:
+# .idea/mongoSettings.xml
+
+## File-based project format:
+*.ipr
+*.iws
+
+## Plugin-specific files:
+
+# IntelliJ
+out/
+
+# mpeltonen/sbt-idea plugin
+.idea_modules/
+
+# JIRA plugin
+atlassian-ide-plugin.xml
+
+# Crashlytics plugin (for Android Studio and IntelliJ)
+com_crashlytics_export_strings.xml
+crashlytics.properties
+crashlytics-build.properties
+
+
+### Java ###
+*.class
+
+# Mobile Tools for Java (J2ME)
+.mtj.tmp/
+
+# Package Files #
+*.jar
+*.war
+*.ear
+
+# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
+hs_err_pid*
+
+
+### Gradle ###
+.gradle
+build/
+
+# Ignore Gradle GUI config
+gradle-app.setting
+
+# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
+!gradle-wrapper.jar
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 0000000..d7972ec
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,30 @@
+language: android
+
+jdk:
+ - oraclejdk8
+
+android:
+ components:
+ - extra-android-support
+ - extra-android-m2repository
+ - extra-google-m2repository
+ - build-tools-22.0.1
+ - android-22
+ licenses:
+ - '.+'
+
+script:
+ - ./gradlew clean assemble check -Dpre-dex=false --stacktrace
+
+branches:
+ except:
+ - gh-pages
+
+notifications:
+ email: false
+
+sudo: false
+
+cache:
+ directories:
+ - $HOME/.gradle
diff --git a/LICENSE.txt b/LICENSE.txt
deleted file mode 100644
index d645695..0000000
--- a/LICENSE.txt
+++ /dev/null
@@ -1,202 +0,0 @@
-
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- 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
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
diff --git a/README.md b/README.md
index 8640fa6..1dc59fe 100644
--- a/README.md
+++ b/README.md
@@ -1,36 +1,42 @@
-RibbonMenu
-==========
+# New Ribbon Menu [Deprecated]
-Navigation menu for Android (based on Google+ app).
+[](http://www.apache.org/licenses/LICENSE-2.0)
+[](https://travis-ci.org/jaredsburrows/RibbonMenu)
+[](https://twitter.com/jaredsburrows)
-
+Updated navigation menu for Android.
-Usage
-=====
-
-Menus are created in xml as normal, adding text and an icon.
+Original:
-In the layout you want to show the menu, add a FrameLayout as the root layout and add the RibbonMenuView set with width and height to match_parent.
+
-In your class you need to implement the iRibbonMenuCallback interface. This is called when you click a menu item and it passes the menu item id from the xml. You then make a reference to the RibbonMenuView and set the callback, set the menu items and add toggleMenu() to your android.R.id.home in your onOptionsItemSelected
+New:
-The sample activity shows how it should all work.
+
+
+Purpose
+=====
-License
-=======
+- Ease of Access: Allow easy access to a menu that slides in and out
+- Ease of Implementation: Update the same screen using minimal amount of code
+- Customization: Easy to change colors and menus
-Copyright 2012 David Scott
+New
+=====
-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
+- Removed the 'library' project and condensed the project to one class
+- Changed the sliding animation to match Facebook and Google+ apps
+- Added standard ActionBar (you can chose to use ActionBarSherlock)
+ - Used menuitem to open the Menu
+- Added ability to update ListView on main Activity
+- Added 2 ListViews to the Menu, similiar to Facebook and Google+ apps
+- Added a AutoCompleteTextView and a Button as well to show examples of implemenation
+- Added ability to allow users to hit the 'back button' to hide the menu when it is open
+- Allows users to interact with background(main ListView) and the menu at the same time unlike the Facebook and Google+ apps
- http://www.apache.org/licenses/LICENSE-2.0
+Future
+====
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
\ No newline at end of file
+- Swiping to open and close
diff --git a/art/new1.png b/art/new1.png
new file mode 100644
index 0000000..aeb2241
Binary files /dev/null and b/art/new1.png differ
diff --git a/art/new2.png b/art/new2.png
new file mode 100644
index 0000000..bdee374
Binary files /dev/null and b/art/new2.png differ
diff --git a/rbm1.png b/art/rbm1.png
similarity index 100%
rename from rbm1.png
rename to art/rbm1.png
diff --git a/build.gradle b/build.gradle
new file mode 100644
index 0000000..6bf15be
--- /dev/null
+++ b/build.gradle
@@ -0,0 +1,41 @@
+buildscript {
+ repositories {
+ jcenter()
+ }
+
+ dependencies {
+ classpath 'com.android.tools.build:gradle:1.2.2'
+ }
+}
+
+allprojects {
+ repositories {
+ jcenter()
+ }
+}
+
+apply plugin: 'com.android.application'
+
+android {
+ compileSdkVersion 22
+ buildToolsVersion '22.0.1'
+
+ defaultConfig {
+ applicationId 'burrows.apps.example.ribbonmenu'
+ minSdkVersion 9
+ targetSdkVersion 22
+ versionCode 1
+ versionName '1.0'
+ }
+
+ buildTypes {
+ release {
+ minifyEnabled false
+ proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
+ }
+ }
+}
+
+dependencies {
+ compile 'com.android.support:appcompat-v7:22.1.1'
+}
diff --git a/gradle.properties b/gradle.properties
new file mode 100644
index 0000000..89e0d99
--- /dev/null
+++ b/gradle.properties
@@ -0,0 +1,18 @@
+# Project-wide Gradle settings.
+
+# IDE (e.g. Android Studio) users:
+# Gradle settings configured through the IDE *will override*
+# any settings specified in this file.
+
+# For more details on how to configure your build environment visit
+# http://www.gradle.org/docs/current/userguide/build_environment.html
+
+# Specifies the JVM arguments used for the daemon process.
+# The setting is particularly useful for tweaking memory settings.
+# Default value: -Xmx10248m -XX:MaxPermSize=256m
+# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
+
+# When configured, Gradle will run in incubating parallel mode.
+# This option should only be used with decoupled projects. More details, visit
+# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
+# org.gradle.parallel=true
diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar
new file mode 100644
index 0000000..085a1cd
Binary files /dev/null and b/gradle/wrapper/gradle-wrapper.jar differ
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
new file mode 100644
index 0000000..0a8e40a
--- /dev/null
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -0,0 +1,6 @@
+#Sun Mar 08 15:23:52 EDT 2015
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-2.3-bin.zip
diff --git a/gradlew b/gradlew
new file mode 100755
index 0000000..91a7e26
--- /dev/null
+++ b/gradlew
@@ -0,0 +1,164 @@
+#!/usr/bin/env bash
+
+##############################################################################
+##
+## Gradle start up script for UN*X
+##
+##############################################################################
+
+# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+DEFAULT_JVM_OPTS=""
+
+APP_NAME="Gradle"
+APP_BASE_NAME=`basename "$0"`
+
+# Use the maximum available, or set MAX_FD != -1 to use that value.
+MAX_FD="maximum"
+
+warn ( ) {
+ echo "$*"
+}
+
+die ( ) {
+ echo
+ echo "$*"
+ echo
+ exit 1
+}
+
+# OS specific support (must be 'true' or 'false').
+cygwin=false
+msys=false
+darwin=false
+case "`uname`" in
+ CYGWIN* )
+ cygwin=true
+ ;;
+ Darwin* )
+ darwin=true
+ ;;
+ MINGW* )
+ msys=true
+ ;;
+esac
+
+# For Cygwin, ensure paths are in UNIX format before anything is touched.
+if $cygwin ; then
+ [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
+fi
+
+# Attempt to set APP_HOME
+# Resolve links: $0 may be a link
+PRG="$0"
+# Need this for relative symlinks.
+while [ -h "$PRG" ] ; do
+ ls=`ls -ld "$PRG"`
+ link=`expr "$ls" : '.*-> \(.*\)$'`
+ if expr "$link" : '/.*' > /dev/null; then
+ PRG="$link"
+ else
+ PRG=`dirname "$PRG"`"/$link"
+ fi
+done
+SAVED="`pwd`"
+cd "`dirname \"$PRG\"`/" >&-
+APP_HOME="`pwd -P`"
+cd "$SAVED" >&-
+
+CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
+
+# Determine the Java command to use to start the JVM.
+if [ -n "$JAVA_HOME" ] ; then
+ if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+ # IBM's JDK on AIX uses strange locations for the executables
+ JAVACMD="$JAVA_HOME/jre/sh/java"
+ else
+ JAVACMD="$JAVA_HOME/bin/java"
+ fi
+ if [ ! -x "$JAVACMD" ] ; then
+ die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+ fi
+else
+ JAVACMD="java"
+ which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+fi
+
+# Increase the maximum file descriptors if we can.
+if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
+ MAX_FD_LIMIT=`ulimit -H -n`
+ if [ $? -eq 0 ] ; then
+ if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
+ MAX_FD="$MAX_FD_LIMIT"
+ fi
+ ulimit -n $MAX_FD
+ if [ $? -ne 0 ] ; then
+ warn "Could not set maximum file descriptor limit: $MAX_FD"
+ fi
+ else
+ warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
+ fi
+fi
+
+# For Darwin, add options to specify how the application appears in the dock
+if $darwin; then
+ GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
+fi
+
+# For Cygwin, switch paths to Windows format before running java
+if $cygwin ; then
+ APP_HOME=`cygpath --path --mixed "$APP_HOME"`
+ CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
+
+ # We build the pattern for arguments to be converted via cygpath
+ ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
+ SEP=""
+ for dir in $ROOTDIRSRAW ; do
+ ROOTDIRS="$ROOTDIRS$SEP$dir"
+ SEP="|"
+ done
+ OURCYGPATTERN="(^($ROOTDIRS))"
+ # Add a user-defined pattern to the cygpath arguments
+ if [ "$GRADLE_CYGPATTERN" != "" ] ; then
+ OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
+ fi
+ # Now convert the arguments - kludge to limit ourselves to /bin/sh
+ i=0
+ for arg in "$@" ; do
+ CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
+ CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
+
+ if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
+ eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
+ else
+ eval `echo args$i`="\"$arg\""
+ fi
+ i=$((i+1))
+ done
+ case $i in
+ (0) set -- ;;
+ (1) set -- "$args0" ;;
+ (2) set -- "$args0" "$args1" ;;
+ (3) set -- "$args0" "$args1" "$args2" ;;
+ (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
+ (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
+ (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
+ (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
+ (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
+ (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
+ esac
+fi
+
+# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
+function splitJvmOpts() {
+ JVM_OPTS=("$@")
+}
+eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
+JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
+
+exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
diff --git a/gradlew.bat b/gradlew.bat
new file mode 100644
index 0000000..aec9973
--- /dev/null
+++ b/gradlew.bat
@@ -0,0 +1,90 @@
+@if "%DEBUG%" == "" @echo off
+@rem ##########################################################################
+@rem
+@rem Gradle startup script for Windows
+@rem
+@rem ##########################################################################
+
+@rem Set local scope for the variables with windows NT shell
+if "%OS%"=="Windows_NT" setlocal
+
+@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+set DEFAULT_JVM_OPTS=
+
+set DIRNAME=%~dp0
+if "%DIRNAME%" == "" set DIRNAME=.
+set APP_BASE_NAME=%~n0
+set APP_HOME=%DIRNAME%
+
+@rem Find java.exe
+if defined JAVA_HOME goto findJavaFromJavaHome
+
+set JAVA_EXE=java.exe
+%JAVA_EXE% -version >NUL 2>&1
+if "%ERRORLEVEL%" == "0" goto init
+
+echo.
+echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:findJavaFromJavaHome
+set JAVA_HOME=%JAVA_HOME:"=%
+set JAVA_EXE=%JAVA_HOME%/bin/java.exe
+
+if exist "%JAVA_EXE%" goto init
+
+echo.
+echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:init
+@rem Get command-line arguments, handling Windowz variants
+
+if not "%OS%" == "Windows_NT" goto win9xME_args
+if "%@eval[2+2]" == "4" goto 4NT_args
+
+:win9xME_args
+@rem Slurp the command line arguments.
+set CMD_LINE_ARGS=
+set _SKIP=2
+
+:win9xME_args_slurp
+if "x%~1" == "x" goto execute
+
+set CMD_LINE_ARGS=%*
+goto execute
+
+:4NT_args
+@rem Get arguments from the 4NT Shell from JP Software
+set CMD_LINE_ARGS=%$
+
+:execute
+@rem Setup the command line
+
+set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
+
+@rem Execute Gradle
+"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
+
+:end
+@rem End local scope for the variables with windows NT shell
+if "%ERRORLEVEL%"=="0" goto mainEnd
+
+:fail
+rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
+rem the _cmd.exe /c_ return code!
+if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
+exit /b 1
+
+:mainEnd
+if "%OS%"=="Windows_NT" endlocal
+
+:omega
diff --git a/library/.classpath b/library/.classpath
deleted file mode 100644
index a4763d1..0000000
--- a/library/.classpath
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
-
-
-
-
diff --git a/library/.project b/library/.project
deleted file mode 100644
index 43c06a2..0000000
--- a/library/.project
+++ /dev/null
@@ -1,33 +0,0 @@
-
-
- com_ribbonmenu
-
-
-
-
-
- com.android.ide.eclipse.adt.ResourceManagerBuilder
-
-
-
-
- com.android.ide.eclipse.adt.PreCompilerBuilder
-
-
-
-
- org.eclipse.jdt.core.javabuilder
-
-
-
-
- com.android.ide.eclipse.adt.ApkBuilder
-
-
-
-
-
- com.android.ide.eclipse.adt.AndroidNature
- org.eclipse.jdt.core.javanature
-
-
diff --git a/library/AndroidManifest.xml b/library/AndroidManifest.xml
deleted file mode 100644
index 3974dc5..0000000
--- a/library/AndroidManifest.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/library/bin/classes/com/darvds/ribbonmenu/BuildConfig.class b/library/bin/classes/com/darvds/ribbonmenu/BuildConfig.class
deleted file mode 100644
index 4ae5920..0000000
Binary files a/library/bin/classes/com/darvds/ribbonmenu/BuildConfig.class and /dev/null differ
diff --git a/library/bin/classes/com/darvds/ribbonmenu/R$anim.class b/library/bin/classes/com/darvds/ribbonmenu/R$anim.class
deleted file mode 100644
index 6425d2c..0000000
Binary files a/library/bin/classes/com/darvds/ribbonmenu/R$anim.class and /dev/null differ
diff --git a/library/bin/classes/com/darvds/ribbonmenu/R$attr.class b/library/bin/classes/com/darvds/ribbonmenu/R$attr.class
deleted file mode 100644
index 5eeaef4..0000000
Binary files a/library/bin/classes/com/darvds/ribbonmenu/R$attr.class and /dev/null differ
diff --git a/library/bin/classes/com/darvds/ribbonmenu/R$color.class b/library/bin/classes/com/darvds/ribbonmenu/R$color.class
deleted file mode 100644
index c18c33d..0000000
Binary files a/library/bin/classes/com/darvds/ribbonmenu/R$color.class and /dev/null differ
diff --git a/library/bin/classes/com/darvds/ribbonmenu/R$dimen.class b/library/bin/classes/com/darvds/ribbonmenu/R$dimen.class
deleted file mode 100644
index c1b0672..0000000
Binary files a/library/bin/classes/com/darvds/ribbonmenu/R$dimen.class and /dev/null differ
diff --git a/library/bin/classes/com/darvds/ribbonmenu/R$id.class b/library/bin/classes/com/darvds/ribbonmenu/R$id.class
deleted file mode 100644
index 84944a3..0000000
Binary files a/library/bin/classes/com/darvds/ribbonmenu/R$id.class and /dev/null differ
diff --git a/library/bin/classes/com/darvds/ribbonmenu/R$layout.class b/library/bin/classes/com/darvds/ribbonmenu/R$layout.class
deleted file mode 100644
index 721f90d..0000000
Binary files a/library/bin/classes/com/darvds/ribbonmenu/R$layout.class and /dev/null differ
diff --git a/library/bin/classes/com/darvds/ribbonmenu/R.class b/library/bin/classes/com/darvds/ribbonmenu/R.class
deleted file mode 100644
index ee2cb6e..0000000
Binary files a/library/bin/classes/com/darvds/ribbonmenu/R.class and /dev/null differ
diff --git a/library/bin/classes/com/darvds/ribbonmenu/RibbonMenuView$1.class b/library/bin/classes/com/darvds/ribbonmenu/RibbonMenuView$1.class
deleted file mode 100644
index 5a13e09..0000000
Binary files a/library/bin/classes/com/darvds/ribbonmenu/RibbonMenuView$1.class and /dev/null differ
diff --git a/library/bin/classes/com/darvds/ribbonmenu/RibbonMenuView$2.class b/library/bin/classes/com/darvds/ribbonmenu/RibbonMenuView$2.class
deleted file mode 100644
index ee02484..0000000
Binary files a/library/bin/classes/com/darvds/ribbonmenu/RibbonMenuView$2.class and /dev/null differ
diff --git a/library/bin/classes/com/darvds/ribbonmenu/RibbonMenuView$Adapter$ViewHolder.class b/library/bin/classes/com/darvds/ribbonmenu/RibbonMenuView$Adapter$ViewHolder.class
deleted file mode 100644
index 165f6a0..0000000
Binary files a/library/bin/classes/com/darvds/ribbonmenu/RibbonMenuView$Adapter$ViewHolder.class and /dev/null differ
diff --git a/library/bin/classes/com/darvds/ribbonmenu/RibbonMenuView$Adapter.class b/library/bin/classes/com/darvds/ribbonmenu/RibbonMenuView$Adapter.class
deleted file mode 100644
index 18ab49a..0000000
Binary files a/library/bin/classes/com/darvds/ribbonmenu/RibbonMenuView$Adapter.class and /dev/null differ
diff --git a/library/bin/classes/com/darvds/ribbonmenu/RibbonMenuView$RibbonMenuItem.class b/library/bin/classes/com/darvds/ribbonmenu/RibbonMenuView$RibbonMenuItem.class
deleted file mode 100644
index 495abb7..0000000
Binary files a/library/bin/classes/com/darvds/ribbonmenu/RibbonMenuView$RibbonMenuItem.class and /dev/null differ
diff --git a/library/bin/classes/com/darvds/ribbonmenu/RibbonMenuView$SavedState$1.class b/library/bin/classes/com/darvds/ribbonmenu/RibbonMenuView$SavedState$1.class
deleted file mode 100644
index 37cff9e..0000000
Binary files a/library/bin/classes/com/darvds/ribbonmenu/RibbonMenuView$SavedState$1.class and /dev/null differ
diff --git a/library/bin/classes/com/darvds/ribbonmenu/RibbonMenuView$SavedState.class b/library/bin/classes/com/darvds/ribbonmenu/RibbonMenuView$SavedState.class
deleted file mode 100644
index 06bdaa0..0000000
Binary files a/library/bin/classes/com/darvds/ribbonmenu/RibbonMenuView$SavedState.class and /dev/null differ
diff --git a/library/bin/classes/com/darvds/ribbonmenu/RibbonMenuView.class b/library/bin/classes/com/darvds/ribbonmenu/RibbonMenuView.class
deleted file mode 100644
index af241da..0000000
Binary files a/library/bin/classes/com/darvds/ribbonmenu/RibbonMenuView.class and /dev/null differ
diff --git a/library/bin/classes/com/darvds/ribbonmenu/iRibbonMenuCallback.class b/library/bin/classes/com/darvds/ribbonmenu/iRibbonMenuCallback.class
deleted file mode 100644
index 1d3ba34..0000000
Binary files a/library/bin/classes/com/darvds/ribbonmenu/iRibbonMenuCallback.class and /dev/null differ
diff --git a/library/bin/com_ribbonmenu.jar b/library/bin/com_ribbonmenu.jar
deleted file mode 100644
index a60b419..0000000
Binary files a/library/bin/com_ribbonmenu.jar and /dev/null differ
diff --git a/library/bin/jarlist.cache b/library/bin/jarlist.cache
deleted file mode 100644
index 1b5ec3f..0000000
--- a/library/bin/jarlist.cache
+++ /dev/null
@@ -1,3 +0,0 @@
-# cache for current jar dependecy. DO NOT EDIT.
-# format is
-# Encoding is UTF-8
diff --git a/library/bin/resources.ap_ b/library/bin/resources.ap_
deleted file mode 100644
index 1b9e5d0..0000000
Binary files a/library/bin/resources.ap_ and /dev/null differ
diff --git a/library/gen/com/darvds/ribbonmenu/BuildConfig.java b/library/gen/com/darvds/ribbonmenu/BuildConfig.java
deleted file mode 100644
index cfc288e..0000000
--- a/library/gen/com/darvds/ribbonmenu/BuildConfig.java
+++ /dev/null
@@ -1,6 +0,0 @@
-/** Automatically generated file. DO NOT MODIFY */
-package com.darvds.ribbonmenu;
-
-public final class BuildConfig {
- public final static boolean DEBUG = true;
-}
\ No newline at end of file
diff --git a/library/gen/com/darvds/ribbonmenu/R.java b/library/gen/com/darvds/ribbonmenu/R.java
deleted file mode 100644
index e90efdc..0000000
--- a/library/gen/com/darvds/ribbonmenu/R.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/* 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.darvds.ribbonmenu;
-
-public final class R {
- public static final class anim {
- public static int rbm_in_from_left=0x7f030000;
- public static int rbm_out_to_left=0x7f030001;
- }
- public static final class attr {
- }
- public static final class color {
- public static int rbm_item_text_color=0x7f040001;
- public static int rbm_menu_background=0x7f040000;
- }
- public static final class dimen {
- public static int rbm_item_image_height=0x7f050003;
- public static int rbm_item_image_width=0x7f050004;
- public static int rbm_item_padding_leftright=0x7f050002;
- public static int rbm_item_padding_topbottom=0x7f050001;
- public static int rbm_item_text_padding_left=0x7f050006;
- public static int rbm_item_text_size=0x7f050005;
- public static int rbm_menu_width=0x7f050000;
- }
- public static final class id {
- public static int rbm_item_icon=0x7f060000;
- public static int rbm_item_text=0x7f060001;
- public static int rbm_listview=0x7f060002;
- public static int rbm_outside_view=0x7f060003;
- }
- public static final class layout {
- public static int rbm_item=0x7f020000;
- public static int rbm_menu=0x7f020001;
- }
-}
diff --git a/library/proguard-project.txt b/library/proguard-project.txt
deleted file mode 100644
index f2fe155..0000000
--- a/library/proguard-project.txt
+++ /dev/null
@@ -1,20 +0,0 @@
-# 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 *;
-#}
diff --git a/library/project.properties b/library/project.properties
deleted file mode 100644
index fec2d61..0000000
--- a/library/project.properties
+++ /dev/null
@@ -1,15 +0,0 @@
-# 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-15
-android.library=true
diff --git a/library/res/anim/rbm_in_from_left.xml b/library/res/anim/rbm_in_from_left.xml
deleted file mode 100644
index 11af321..0000000
--- a/library/res/anim/rbm_in_from_left.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-
-
-
-
-
-
-
-
-
-
diff --git a/library/res/anim/rbm_out_to_left.xml b/library/res/anim/rbm_out_to_left.xml
deleted file mode 100644
index 583fec5..0000000
--- a/library/res/anim/rbm_out_to_left.xml
+++ /dev/null
@@ -1,34 +0,0 @@
-
-
-
-
-
-
-
-
-
diff --git a/library/res/layout/rbm_item.xml b/library/res/layout/rbm_item.xml
deleted file mode 100644
index f2269b6..0000000
--- a/library/res/layout/rbm_item.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/library/res/layout/rbm_menu.xml b/library/res/layout/rbm_menu.xml
deleted file mode 100644
index 6b7e432..0000000
--- a/library/res/layout/rbm_menu.xml
+++ /dev/null
@@ -1,29 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/library/res/values/colors.xml b/library/res/values/colors.xml
deleted file mode 100644
index 24021bd..0000000
--- a/library/res/values/colors.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
- #303030
- #ffffff
-
-
\ No newline at end of file
diff --git a/library/res/values/dimensions.xml b/library/res/values/dimensions.xml
deleted file mode 100644
index 1d5dea1..0000000
--- a/library/res/values/dimensions.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
-
- 200dp
-
- 16dp
- 8dp
-
- 24dp
- 24dp
-
- 16sp
- 10dp
-
-
\ No newline at end of file
diff --git a/library/src/com/darvds/ribbonmenu/RibbonMenuView.java b/library/src/com/darvds/ribbonmenu/RibbonMenuView.java
deleted file mode 100644
index 9c84021..0000000
--- a/library/src/com/darvds/ribbonmenu/RibbonMenuView.java
+++ /dev/null
@@ -1,382 +0,0 @@
-package com.darvds.ribbonmenu;
-
-
-import java.util.ArrayList;
-
-import org.xmlpull.v1.XmlPullParser;
-
-import android.content.Context;
-import android.content.res.XmlResourceParser;
-import android.os.Parcel;
-import android.os.Parcelable;
-import android.util.AttributeSet;
-import android.view.LayoutInflater;
-import android.view.View;
-import android.view.ViewGroup;
-import android.view.animation.AnimationUtils;
-import android.widget.AdapterView;
-import android.widget.AdapterView.OnItemClickListener;
-import android.widget.BaseAdapter;
-import android.widget.ImageView;
-import android.widget.LinearLayout;
-import android.widget.ListView;
-import android.widget.TextView;
-
-import com.darvds.ribbonmenu.RibbonMenuView.SavedState;
-
-public class RibbonMenuView extends LinearLayout {
-
- private ListView rbmListView;
- private View rbmOutsideView;
-
- private iRibbonMenuCallback callback;
-
- private static ArrayList menuItems;
-
-
- public RibbonMenuView(Context context) {
- super(context);
-
-
- load();
- }
-
- public RibbonMenuView(Context context, AttributeSet attrs) {
- super(context, attrs);
-
- load();
- }
-
-
-
-
- private void load(){
-
- if(isInEditMode()) return;
-
-
- inflateLayout();
-
- initUi();
-
-
- }
-
-
- private void inflateLayout(){
-
-
-
-
- try{
- LayoutInflater.from(getContext()).inflate(R.layout.rbm_menu, this, true);
- } catch(Exception e){
-
- }
-
-
- }
-
- private void initUi(){
-
- rbmListView = (ListView) findViewById(R.id.rbm_listview);
- rbmOutsideView = (View) findViewById(R.id.rbm_outside_view);
-
- rbmOutsideView.setOnClickListener(new OnClickListener() {
-
- @Override
- public void onClick(View v) {
- hideMenu();
-
- }
- });
-
-
- rbmListView.setOnItemClickListener(new OnItemClickListener() {
-
- @Override
- public void onItemClick(AdapterView> parent, View view,
- int position, long id) {
-
- if(callback != null)
- callback.RibbonMenuItemClick(menuItems.get(position).id);
-
- hideMenu();
- }
-
- });
-
-
- }
-
-
- public void setMenuClickCallback(iRibbonMenuCallback callback){
- this.callback = callback;
- }
-
- public void setMenuItems(int menu){
-
- parseXml(menu);
-
- if(menuItems != null && menuItems.size() > 0)
- {
- rbmListView.setAdapter(new Adapter());
-
- }
-
-
-
-
- }
-
-
- public void setBackgroundResource(int resource){
- rbmListView.setBackgroundResource(resource);
-
- }
-
-
-
-
- public void showMenu(){
- rbmOutsideView.setVisibility(View.VISIBLE);
-
- rbmListView.setVisibility(View.VISIBLE);
- rbmListView.startAnimation(AnimationUtils.loadAnimation(getContext(), R.anim.rbm_in_from_left));
-
- }
-
-
- public void hideMenu(){
-
- rbmOutsideView.setVisibility(View.GONE);
- rbmListView.setVisibility(View.GONE);
-
- rbmListView.startAnimation(AnimationUtils.loadAnimation(getContext(), R.anim.rbm_out_to_left));
-
- }
-
-
- public void toggleMenu(){
-
- if(rbmOutsideView.getVisibility() == View.GONE){
- showMenu();
- } else {
- hideMenu();
- }
- }
-
-
- private void parseXml(int menu){
-
- menuItems = new ArrayList();
-
-
- try{
- XmlResourceParser xpp = getResources().getXml(menu);
-
- xpp.next();
- int eventType = xpp.getEventType();
-
-
- while(eventType != XmlPullParser.END_DOCUMENT){
-
- if(eventType == XmlPullParser.START_TAG){
-
- String elemName = xpp.getName();
-
-
-
- if(elemName.equals("item")){
-
-
- String textId = xpp.getAttributeValue("http://schemas.android.com/apk/res/android", "title");
- String iconId = xpp.getAttributeValue("http://schemas.android.com/apk/res/android", "icon");
- String resId = xpp.getAttributeValue("http://schemas.android.com/apk/res/android", "id");
-
-
- RibbonMenuItem item = new RibbonMenuItem();
- item.id = Integer.valueOf(resId.replace("@", ""));
- item.text = resourceIdToString(textId);
- item.icon = Integer.valueOf(iconId.replace("@", ""));
-
- menuItems.add(item);
-
- }
-
-
-
- }
-
- eventType = xpp.next();
-
-
- }
-
-
- } catch(Exception e){
- e.printStackTrace();
- }
-
- }
-
-
-
-
-
- private String resourceIdToString(String text){
-
- if(!text.contains("@")){
- return text;
- } else {
-
- String id = text.replace("@", "");
-
- return getResources().getString(Integer.valueOf(id));
-
- }
-
- }
-
-
- public boolean isMenuVisible(){
- return rbmOutsideView.getVisibility() == View.VISIBLE;
- }
-
-
-
-
- @Override
- protected void onRestoreInstanceState(Parcelable state) {
- SavedState ss = (SavedState)state;
- super.onRestoreInstanceState(ss.getSuperState());
-
- if (ss.bShowMenu)
- showMenu();
- else
- hideMenu();
- }
-
-
-
- @Override
- protected Parcelable onSaveInstanceState() {
- Parcelable superState = super.onSaveInstanceState();
- SavedState ss = new SavedState(superState);
-
- ss.bShowMenu = isMenuVisible();
-
- return ss;
- }
-
- static class SavedState extends BaseSavedState {
- boolean bShowMenu;
-
- SavedState(Parcelable superState) {
- super(superState);
- }
-
- private SavedState(Parcel in) {
- super(in);
- bShowMenu = (in.readInt() == 1);
- }
-
- @Override
- public void writeToParcel(Parcel out, int flags) {
- super.writeToParcel(out, flags);
- out.writeInt(bShowMenu ? 1 : 0);
- }
-
- public static final Parcelable.Creator CREATOR
- = new Parcelable.Creator() {
- public SavedState createFromParcel(Parcel in) {
- return new SavedState(in);
- }
-
- public SavedState[] newArray(int size) {
- return new SavedState[size];
- }
- };
- }
-
-
-
- class RibbonMenuItem{
-
- int id;
- String text;
- int icon;
-
- }
-
-
-
- private class Adapter extends BaseAdapter {
-
- private LayoutInflater inflater;
-
- public Adapter(){
- inflater = LayoutInflater.from(getContext());
- }
-
-
-
- @Override
- public int getCount() {
-
- return menuItems.size();
- }
-
- @Override
- public Object getItem(int position) {
-
- return null;
- }
-
- @Override
- public long getItemId(int position) {
-
- return 0;
- }
-
- @Override
- public View getView(int position, View convertView, ViewGroup parent) {
-
- final ViewHolder holder;
-
- if(convertView == null || convertView instanceof TextView){
- convertView = inflater.inflate(R.layout.rbm_item, null);
-
- holder = new ViewHolder();
- holder.image = (ImageView) convertView.findViewById(R.id.rbm_item_icon);
- holder.text = (TextView) convertView.findViewById(R.id.rbm_item_text);
-
- convertView.setTag(holder);
-
- } else {
-
- holder = (ViewHolder) convertView.getTag();
- }
-
- holder.image.setImageResource(menuItems.get(position).icon);
- holder.text.setText(menuItems.get(position).text);
-
-
- return convertView;
- }
-
-
- class ViewHolder {
- TextView text;
- ImageView image;
-
- }
-
-
-
-
- }
-
-
-
-}
diff --git a/library/src/com/darvds/ribbonmenu/iRibbonMenuCallback.java b/library/src/com/darvds/ribbonmenu/iRibbonMenuCallback.java
deleted file mode 100644
index e26e6a7..0000000
--- a/library/src/com/darvds/ribbonmenu/iRibbonMenuCallback.java
+++ /dev/null
@@ -1,8 +0,0 @@
-package com.darvds.ribbonmenu;
-
-public interface iRibbonMenuCallback {
-
- public void RibbonMenuItemClick(int itemId);
-
-
-}
diff --git a/sample/proguard-project.txt b/proguard-rules.pro
similarity index 62%
rename from sample/proguard-project.txt
rename to proguard-rules.pro
index f2fe155..136fe68 100644
--- a/sample/proguard-project.txt
+++ b/proguard-rules.pro
@@ -1,11 +1,8 @@
-# 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.
+# in /Users/noname/android-sdk/tools/proguard/proguard-android.txt
+# You can edit the include path and order by changing the proguardFiles
+# directive in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
diff --git a/sample/.classpath b/sample/.classpath
deleted file mode 100644
index a4763d1..0000000
--- a/sample/.classpath
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
-
-
-
-
diff --git a/sample/.project b/sample/.project
deleted file mode 100644
index 0e5e704..0000000
--- a/sample/.project
+++ /dev/null
@@ -1,33 +0,0 @@
-
-
- ribbonsample
-
-
-
-
-
- com.android.ide.eclipse.adt.ResourceManagerBuilder
-
-
-
-
- com.android.ide.eclipse.adt.PreCompilerBuilder
-
-
-
-
- org.eclipse.jdt.core.javabuilder
-
-
-
-
- com.android.ide.eclipse.adt.ApkBuilder
-
-
-
-
-
- com.android.ide.eclipse.adt.AndroidNature
- org.eclipse.jdt.core.javanature
-
-
diff --git a/sample/AndroidManifest.xml b/sample/AndroidManifest.xml
deleted file mode 100644
index 6ee5583..0000000
--- a/sample/AndroidManifest.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/sample/bin/classes.dex b/sample/bin/classes.dex
deleted file mode 100644
index 1903814..0000000
Binary files a/sample/bin/classes.dex and /dev/null differ
diff --git a/sample/bin/classes/com/darvds/ribbonmenu/R$anim.class b/sample/bin/classes/com/darvds/ribbonmenu/R$anim.class
deleted file mode 100644
index 0985fe9..0000000
Binary files a/sample/bin/classes/com/darvds/ribbonmenu/R$anim.class and /dev/null differ
diff --git a/sample/bin/classes/com/darvds/ribbonmenu/R$attr.class b/sample/bin/classes/com/darvds/ribbonmenu/R$attr.class
deleted file mode 100644
index 5eeaef4..0000000
Binary files a/sample/bin/classes/com/darvds/ribbonmenu/R$attr.class and /dev/null differ
diff --git a/sample/bin/classes/com/darvds/ribbonmenu/R$drawable.class b/sample/bin/classes/com/darvds/ribbonmenu/R$drawable.class
deleted file mode 100644
index 8f689bf..0000000
Binary files a/sample/bin/classes/com/darvds/ribbonmenu/R$drawable.class and /dev/null differ
diff --git a/sample/bin/classes/com/darvds/ribbonmenu/R$id.class b/sample/bin/classes/com/darvds/ribbonmenu/R$id.class
deleted file mode 100644
index 5da3486..0000000
Binary files a/sample/bin/classes/com/darvds/ribbonmenu/R$id.class and /dev/null differ
diff --git a/sample/bin/classes/com/darvds/ribbonmenu/R$layout.class b/sample/bin/classes/com/darvds/ribbonmenu/R$layout.class
deleted file mode 100644
index fdc39be..0000000
Binary files a/sample/bin/classes/com/darvds/ribbonmenu/R$layout.class and /dev/null differ
diff --git a/sample/bin/classes/com/darvds/ribbonmenu/R$menu.class b/sample/bin/classes/com/darvds/ribbonmenu/R$menu.class
deleted file mode 100644
index c6d404c..0000000
Binary files a/sample/bin/classes/com/darvds/ribbonmenu/R$menu.class and /dev/null differ
diff --git a/sample/bin/classes/com/darvds/ribbonmenu/R$string.class b/sample/bin/classes/com/darvds/ribbonmenu/R$string.class
deleted file mode 100644
index 41c3619..0000000
Binary files a/sample/bin/classes/com/darvds/ribbonmenu/R$string.class and /dev/null differ
diff --git a/sample/bin/classes/com/darvds/ribbonmenu/R.class b/sample/bin/classes/com/darvds/ribbonmenu/R.class
deleted file mode 100644
index 42dcc1d..0000000
Binary files a/sample/bin/classes/com/darvds/ribbonmenu/R.class and /dev/null differ
diff --git a/sample/bin/classes/com/darvds/ribbonmenu/sample/BuildConfig.class b/sample/bin/classes/com/darvds/ribbonmenu/sample/BuildConfig.class
deleted file mode 100644
index 74c60fd..0000000
Binary files a/sample/bin/classes/com/darvds/ribbonmenu/sample/BuildConfig.class and /dev/null differ
diff --git a/sample/bin/classes/com/darvds/ribbonmenu/sample/R$anim.class b/sample/bin/classes/com/darvds/ribbonmenu/sample/R$anim.class
deleted file mode 100644
index 4d4da66..0000000
Binary files a/sample/bin/classes/com/darvds/ribbonmenu/sample/R$anim.class and /dev/null differ
diff --git a/sample/bin/classes/com/darvds/ribbonmenu/sample/R$attr.class b/sample/bin/classes/com/darvds/ribbonmenu/sample/R$attr.class
deleted file mode 100644
index ac83fd0..0000000
Binary files a/sample/bin/classes/com/darvds/ribbonmenu/sample/R$attr.class and /dev/null differ
diff --git a/sample/bin/classes/com/darvds/ribbonmenu/sample/R$drawable.class b/sample/bin/classes/com/darvds/ribbonmenu/sample/R$drawable.class
deleted file mode 100644
index ca93b75..0000000
Binary files a/sample/bin/classes/com/darvds/ribbonmenu/sample/R$drawable.class and /dev/null differ
diff --git a/sample/bin/classes/com/darvds/ribbonmenu/sample/R$id.class b/sample/bin/classes/com/darvds/ribbonmenu/sample/R$id.class
deleted file mode 100644
index ff79640..0000000
Binary files a/sample/bin/classes/com/darvds/ribbonmenu/sample/R$id.class and /dev/null differ
diff --git a/sample/bin/classes/com/darvds/ribbonmenu/sample/R$layout.class b/sample/bin/classes/com/darvds/ribbonmenu/sample/R$layout.class
deleted file mode 100644
index d2647c0..0000000
Binary files a/sample/bin/classes/com/darvds/ribbonmenu/sample/R$layout.class and /dev/null differ
diff --git a/sample/bin/classes/com/darvds/ribbonmenu/sample/R$menu.class b/sample/bin/classes/com/darvds/ribbonmenu/sample/R$menu.class
deleted file mode 100644
index d282443..0000000
Binary files a/sample/bin/classes/com/darvds/ribbonmenu/sample/R$menu.class and /dev/null differ
diff --git a/sample/bin/classes/com/darvds/ribbonmenu/sample/R$string.class b/sample/bin/classes/com/darvds/ribbonmenu/sample/R$string.class
deleted file mode 100644
index 18911bd..0000000
Binary files a/sample/bin/classes/com/darvds/ribbonmenu/sample/R$string.class and /dev/null differ
diff --git a/sample/bin/classes/com/darvds/ribbonmenu/sample/R.class b/sample/bin/classes/com/darvds/ribbonmenu/sample/R.class
deleted file mode 100644
index 3cb7d1a..0000000
Binary files a/sample/bin/classes/com/darvds/ribbonmenu/sample/R.class and /dev/null differ
diff --git a/sample/bin/classes/com/darvds/ribbonmenu/sample/RibbonsampleActivity.class b/sample/bin/classes/com/darvds/ribbonmenu/sample/RibbonsampleActivity.class
deleted file mode 100644
index 015fd02..0000000
Binary files a/sample/bin/classes/com/darvds/ribbonmenu/sample/RibbonsampleActivity.class and /dev/null differ
diff --git a/sample/bin/jarlist.cache b/sample/bin/jarlist.cache
deleted file mode 100644
index 1b5ec3f..0000000
--- a/sample/bin/jarlist.cache
+++ /dev/null
@@ -1,3 +0,0 @@
-# cache for current jar dependecy. DO NOT EDIT.
-# format is
-# Encoding is UTF-8
diff --git a/sample/bin/res/drawable-hdpi/ic_launcher.png b/sample/bin/res/drawable-hdpi/ic_launcher.png
deleted file mode 100644
index bcfa058..0000000
Binary files a/sample/bin/res/drawable-hdpi/ic_launcher.png and /dev/null differ
diff --git a/sample/bin/res/drawable-ldpi/ic_launcher.png b/sample/bin/res/drawable-ldpi/ic_launcher.png
deleted file mode 100644
index dd7c05b..0000000
Binary files a/sample/bin/res/drawable-ldpi/ic_launcher.png and /dev/null differ
diff --git a/sample/bin/res/drawable-mdpi/ic_launcher.png b/sample/bin/res/drawable-mdpi/ic_launcher.png
deleted file mode 100644
index 85848ff..0000000
Binary files a/sample/bin/res/drawable-mdpi/ic_launcher.png and /dev/null differ
diff --git a/sample/bin/res/drawable-xhdpi/ic_launcher.png b/sample/bin/res/drawable-xhdpi/ic_launcher.png
deleted file mode 100644
index 916901e..0000000
Binary files a/sample/bin/res/drawable-xhdpi/ic_launcher.png and /dev/null differ
diff --git a/sample/bin/resources.ap_ b/sample/bin/resources.ap_
deleted file mode 100644
index 2c4286b..0000000
Binary files a/sample/bin/resources.ap_ and /dev/null differ
diff --git a/sample/bin/ribbonsample.apk b/sample/bin/ribbonsample.apk
deleted file mode 100644
index e1a42d5..0000000
Binary files a/sample/bin/ribbonsample.apk and /dev/null differ
diff --git a/sample/gen/com/darvds/ribbonmenu/R.java b/sample/gen/com/darvds/ribbonmenu/R.java
deleted file mode 100644
index d67f311..0000000
--- a/sample/gen/com/darvds/ribbonmenu/R.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/* 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.darvds.ribbonmenu;
-
-public final class R {
- public static final class anim {
- public static final int in_from_left=0x7f040000;
- public static final int out_to_left=0x7f040001;
- }
- public static final class attr {
- }
- public static final class drawable {
- public static final int ic_launcher=0x7f020000;
- }
- public static final class id {
- public static final int rbm_item_icon=0x7f070001;
- public static final int rbm_item_text=0x7f070002;
- public static final int rbm_listview=0x7f070003;
- public static final int rbm_outside_view=0x7f070004;
- public static final int ribbonMenuView1=0x7f070000;
- public static final int ribbon_menu_home=0x7f070005;
- public static final int ribbon_menu_home2=0x7f070006;
- public static final int ribbon_menu_home3=0x7f070007;
- }
- public static final class layout {
- public static final int main=0x7f030000;
- public static final int rbm_item=0x7f030001;
- public static final int rbm_menu=0x7f030002;
- }
- public static final class menu {
- public static final int ribbon_menu=0x7f060000;
- }
- public static final class string {
- public static final int app_name=0x7f050001;
- public static final int hello=0x7f050000;
- }
-}
diff --git a/sample/gen/com/darvds/ribbonmenu/sample/BuildConfig.java b/sample/gen/com/darvds/ribbonmenu/sample/BuildConfig.java
deleted file mode 100644
index f9df588..0000000
--- a/sample/gen/com/darvds/ribbonmenu/sample/BuildConfig.java
+++ /dev/null
@@ -1,6 +0,0 @@
-/** Automatically generated file. DO NOT MODIFY */
-package com.darvds.ribbonmenu.sample;
-
-public final class BuildConfig {
- public final static boolean DEBUG = true;
-}
\ No newline at end of file
diff --git a/sample/gen/com/darvds/ribbonmenu/sample/R.java b/sample/gen/com/darvds/ribbonmenu/sample/R.java
deleted file mode 100644
index a54fca1..0000000
--- a/sample/gen/com/darvds/ribbonmenu/sample/R.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/* 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.darvds.ribbonmenu.sample;
-
-public final class R {
- public static final class anim {
- public static final int in_from_left=0x7f040000;
- public static final int out_to_left=0x7f040001;
- }
- public static final class attr {
- }
- public static final class drawable {
- public static final int ic_launcher=0x7f020000;
- }
- public static final class id {
- public static final int rbm_item_icon=0x7f070001;
- public static final int rbm_item_text=0x7f070002;
- public static final int rbm_listview=0x7f070003;
- public static final int rbm_outside_view=0x7f070004;
- public static final int ribbonMenuView1=0x7f070000;
- public static final int ribbon_menu_home=0x7f070005;
- public static final int ribbon_menu_home2=0x7f070006;
- public static final int ribbon_menu_home3=0x7f070007;
- }
- public static final class layout {
- public static final int main=0x7f030000;
- public static final int rbm_item=0x7f030001;
- public static final int rbm_menu=0x7f030002;
- }
- public static final class menu {
- public static final int ribbon_menu=0x7f060000;
- }
- public static final class string {
- public static final int app_name=0x7f050001;
- public static final int hello=0x7f050000;
- }
-}
diff --git a/sample/project.properties b/sample/project.properties
deleted file mode 100644
index 7c1307b..0000000
--- a/sample/project.properties
+++ /dev/null
@@ -1,15 +0,0 @@
-# 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-15
-android.library.reference.1=../com_ribbonmenu
diff --git a/sample/res/drawable-hdpi/ic_launcher.png b/sample/res/drawable-hdpi/ic_launcher.png
deleted file mode 100644
index 96a442e..0000000
Binary files a/sample/res/drawable-hdpi/ic_launcher.png and /dev/null differ
diff --git a/sample/res/drawable-ldpi/ic_launcher.png b/sample/res/drawable-ldpi/ic_launcher.png
deleted file mode 100644
index 9923872..0000000
Binary files a/sample/res/drawable-ldpi/ic_launcher.png and /dev/null differ
diff --git a/sample/res/drawable-mdpi/ic_launcher.png b/sample/res/drawable-mdpi/ic_launcher.png
deleted file mode 100644
index 359047d..0000000
Binary files a/sample/res/drawable-mdpi/ic_launcher.png and /dev/null differ
diff --git a/sample/res/drawable-xhdpi/ic_launcher.png b/sample/res/drawable-xhdpi/ic_launcher.png
deleted file mode 100644
index 71c6d76..0000000
Binary files a/sample/res/drawable-xhdpi/ic_launcher.png and /dev/null differ
diff --git a/sample/res/layout/main.xml b/sample/res/layout/main.xml
deleted file mode 100644
index 2019518..0000000
--- a/sample/res/layout/main.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/sample/res/menu/ribbon_menu.xml b/sample/res/menu/ribbon_menu.xml
deleted file mode 100644
index 402acf2..0000000
--- a/sample/res/menu/ribbon_menu.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
diff --git a/sample/res/values/strings.xml b/sample/res/values/strings.xml
deleted file mode 100644
index 1ebdf5a..0000000
--- a/sample/res/values/strings.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
- Hello World, RibbonsampleActivity!
- Ribbonsample
-
-
\ No newline at end of file
diff --git a/sample/src/com/darvds/ribbonmenu/sample/RibbonsampleActivity.java b/sample/src/com/darvds/ribbonmenu/sample/RibbonsampleActivity.java
deleted file mode 100644
index 60c04c0..0000000
--- a/sample/src/com/darvds/ribbonmenu/sample/RibbonsampleActivity.java
+++ /dev/null
@@ -1,60 +0,0 @@
-package com.darvds.ribbonmenu.sample;
-
-import android.app.Activity;
-import android.os.Bundle;
-import android.view.MenuItem;
-
-import com.darvds.ribbonmenu.R;
-import com.darvds.ribbonmenu.RibbonMenuView;
-import com.darvds.ribbonmenu.iRibbonMenuCallback;
-
-public class RibbonsampleActivity extends Activity implements iRibbonMenuCallback {
- /** Called when the activity is first created. */
-
- private RibbonMenuView rbmView;
-
-
- @Override
- public void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- setContentView(R.layout.main);
-
-
- rbmView = (RibbonMenuView) findViewById(R.id.ribbonMenuView1);
- rbmView.setMenuClickCallback(this);
- rbmView.setMenuItems(R.menu.ribbon_menu);
-
- getActionBar().setDisplayHomeAsUpEnabled(true);
-
-
- }
-
-
-
-
- @Override
- public boolean onOptionsItemSelected(MenuItem item) {
- int id = item.getItemId();
-
- if (id == android.R.id.home) {
-
- rbmView.toggleMenu();
-
- return true;
-
- } else {
- return super.onOptionsItemSelected(item);
- }
- }
-
-
-
-
- @Override
- public void RibbonMenuItemClick(int itemId) {
-
-
-
-
- }
-}
\ No newline at end of file
diff --git a/settings.gradle b/settings.gradle
new file mode 100644
index 0000000..516ff62
--- /dev/null
+++ b/settings.gradle
@@ -0,0 +1,3 @@
+rootProject.name = 'RibbonMenu'
+
+include ':app'
diff --git a/src/androidTest/java/burrows/apps/example/ribbonmenu/ApplicationTest.java b/src/androidTest/java/burrows/apps/example/ribbonmenu/ApplicationTest.java
new file mode 100644
index 0000000..ba37f82
--- /dev/null
+++ b/src/androidTest/java/burrows/apps/example/ribbonmenu/ApplicationTest.java
@@ -0,0 +1,13 @@
+package burrows.apps.example.ribbonmenu;
+
+import android.app.Application;
+import android.test.ApplicationTestCase;
+
+/**
+ * Testing Fundamentals
+ */
+public class ApplicationTest extends ApplicationTestCase {
+ public ApplicationTest() {
+ super(Application.class);
+ }
+}
diff --git a/src/main/AndroidManifest.xml b/src/main/AndroidManifest.xml
new file mode 100644
index 0000000..6d63c29
--- /dev/null
+++ b/src/main/AndroidManifest.xml
@@ -0,0 +1,23 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/main/java/burrows/apps/example/ribbonmenu/activity/MainActivity.java b/src/main/java/burrows/apps/example/ribbonmenu/activity/MainActivity.java
new file mode 100644
index 0000000..db8cc25
--- /dev/null
+++ b/src/main/java/burrows/apps/example/ribbonmenu/activity/MainActivity.java
@@ -0,0 +1,169 @@
+package burrows.apps.example.ribbonmenu.activity;
+
+import android.os.Bundle;
+import android.os.Handler;
+import android.support.v7.app.ActionBarActivity;
+import android.view.KeyEvent;
+import android.view.Menu;
+import android.view.MenuItem;
+import android.view.View;
+import android.widget.AdapterView;
+import android.widget.AdapterView.OnItemClickListener;
+import android.widget.ArrayAdapter;
+import android.widget.Button;
+import android.widget.ListView;
+import android.widget.Toast;
+
+import burrows.apps.example.ribbonmenu.R;
+import burrows.apps.example.ribbonmenu.view.RibbonMenuView;
+
+public class MainActivity extends ActionBarActivity {
+ private ListView list;
+ private ArrayAdapter adapter;
+ private RibbonMenuView rbmView;
+ private Button test;
+ private ListView rbmListView, rbmListView2;
+ private ArrayAdapter adapt, adapter2;
+
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.activity_main);
+
+ /** Init our views **/
+ rbmView = (RibbonMenuView) findViewById(R.id.ribbonMenuView1);
+ list = (ListView) findViewById(R.id.listView1);
+
+ /** Calls "hideMenu()" after each click similiar to the Facebook or Google+ application **/
+ test = (Button) findViewById(R.id.button);
+ test.setOnClickListener(new View.OnClickListener() {
+ public void onClick(View v) {
+ // shows how to hide the menu
+ if (rbmView != null) {
+ rbmView.hideMenu();
+ }
+ }
+ });
+
+ /** This is the most important ListView, updating the main list in the Activity **/
+ final String[] items_list = {"List1", "List2", "List3", "List4"};
+ adapt = new ArrayAdapter(MainActivity.this, android.R.layout.simple_list_item_1, items_list);
+ rbmListView = (ListView) findViewById(R.id.rbm_listview);
+ if (rbmListView != null) {
+ rbmListView.setOnItemClickListener(new OnItemClickListener() {
+ /*
+ * (non-Javadoc)
+ * @see android.widget.AdapterView.OnItemClickListener#onItemClick(android.widget.AdapterView, android.view.View, int, long)
+ */
+ public void onItemClick(AdapterView> parent, View view, int position, long id) {
+ switch (position) {
+ case 0:
+ String[] items = {"A", "B", "C", "D"};
+ adapter = new ArrayAdapter(MainActivity.this, android.R.layout.simple_list_item_1, items);
+ break;
+
+ case 1:
+ String[] items1 = {"1", "2", "3", "4"};
+ adapter = new ArrayAdapter(MainActivity.this, android.R.layout.simple_list_item_1, items1);
+ break;
+
+ case 2:
+ String[] items2 = {"z", "x", "c", "v"};
+ adapter = new ArrayAdapter(MainActivity.this, android.R.layout.simple_list_item_1, items2);
+ break;
+
+ case 3:
+ String[] items3 = {"Test1", "Test2", "Test3", "Test4"};
+ adapter = new ArrayAdapter(MainActivity.this, android.R.layout.simple_list_item_1, items3);
+ break;
+
+ default:
+ String[] itemsd = {"A", "B", "C", "D"};
+ adapter = new ArrayAdapter(MainActivity.this, android.R.layout.simple_list_item_1, itemsd);
+ break;
+ }
+
+ // always update these
+ if (list != null) {
+ list.setAdapter(adapter);
+ }
+
+ if (rbmView != null) {
+ rbmView.hideMenu();
+ }
+ }
+ });
+ rbmListView.setAdapter(adapt);
+ }
+
+ /** This is the second ListView on the menu **/
+ final String[] items_list2 = {"Notification1", "Notification2", "Notification3", "Notification4"};
+ adapter2 = new ArrayAdapter(MainActivity.this, android.R.layout.simple_list_item_1, items_list2);
+ rbmListView2 = (ListView) findViewById(R.id.rbm_listview2);
+ if (rbmListView2 != null) {
+ rbmListView2.setOnItemClickListener(new OnItemClickListener() {
+ /*
+ * (non-Javadoc)
+ * @see android.widget.AdapterView.OnItemClickListener#onItemClick(android.widget.AdapterView, android.view.View, int, long)
+ */
+ public void onItemClick(AdapterView> parent, View view, int position, long id) {
+ Toast.makeText(MainActivity.this, items_list2[position], Toast.LENGTH_SHORT).show();
+ if (rbmView != null) {
+ rbmView.hideMenu();
+ }
+ }
+ });
+ rbmListView2.setAdapter(adapter2);
+ }
+ }
+
+ /** Allows users, even API < 5, to use the back button * */
+ @Override
+ public boolean onKeyDown(int keyCode, KeyEvent event) {
+ switch (keyCode) {
+ case KeyEvent.KEYCODE_BACK:
+ // if view is showing, close it
+ // all other back button clicks are handled by the phone
+ if (rbmView != null) {
+ if (rbmView.isMenuShowing()) {
+ new Handler().postDelayed(new Runnable() {
+ public void run() {
+ rbmView.hideMenu();
+ }
+ }, 50);
+ } else {
+ return super.onKeyDown(keyCode, event);
+ }
+ }
+ break;
+ default:
+ return super.onKeyDown(keyCode, event);
+
+ }
+
+ return true;
+ }
+
+ @Override
+ public boolean onCreateOptionsMenu(Menu menu) {
+ getMenuInflater().inflate(R.menu.menu_main, menu);
+ return true;
+ }
+
+ @Override
+ public boolean onOptionsItemSelected(MenuItem item) {
+ switch (item.getItemId()) {
+ case R.id.test:
+ // toggle our menu
+ if (rbmView != null) {
+ rbmView.toggleMenu();
+ }
+ break;
+
+ default:
+ return super.onOptionsItemSelected(item);
+
+ }
+
+ return true;
+ }
+}
diff --git a/src/main/java/burrows/apps/example/ribbonmenu/view/RibbonMenuView.java b/src/main/java/burrows/apps/example/ribbonmenu/view/RibbonMenuView.java
new file mode 100644
index 0000000..e2272a6
--- /dev/null
+++ b/src/main/java/burrows/apps/example/ribbonmenu/view/RibbonMenuView.java
@@ -0,0 +1,81 @@
+package burrows.apps.example.ribbonmenu.view;
+
+import android.content.Context;
+import android.os.Handler;
+import android.util.AttributeSet;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.animation.AnimationUtils;
+import android.widget.LinearLayout;
+
+import burrows.apps.example.ribbonmenu.R;
+
+public class RibbonMenuView extends LinearLayout {
+ private LinearLayout menu;
+
+ /**
+ * Constructor to create menu
+ *
+ * @param context Context
+ * @param attrs Other Attributes
+ */
+ public RibbonMenuView(Context context, AttributeSet attrs) {
+ super(context, attrs);
+ LayoutInflater.from(context).inflate(R.layout.rbm_menu, this, true);
+ menu = (LinearLayout) findViewById(R.id.menu);
+ }
+
+ /**
+ * Show our Menu
+ */
+ public void showMenu() {
+ if (menu != null) {
+ new Handler().postDelayed(new Runnable() {
+ public void run() {
+ menu.setVisibility(View.VISIBLE);
+ menu.startAnimation(AnimationUtils.loadAnimation(getContext(), R.anim.rbm_in_from_left));
+ }
+ }, 50);
+ }
+ }
+
+ /**
+ * Hide our Menu
+ */
+ public void hideMenu() {
+ if (menu != null) {
+ new Handler().postDelayed(new Runnable() {
+ public void run() {
+ menu.setVisibility(View.GONE);
+ menu.startAnimation(AnimationUtils.loadAnimation(getContext(), R.anim.rbm_out_to_left));
+ }
+ }, 50);
+ }
+ }
+
+ /**
+ * Toggle the Menu open/close
+ */
+ public void toggleMenu() {
+ if (menu != null) {
+ if (menu.getVisibility() == View.GONE) {
+ showMenu();
+ } else {
+ hideMenu();
+ }
+ }
+ }
+
+ /**
+ * Check to see if the menu is visible
+ *
+ * @return Visible
+ */
+ public boolean isMenuShowing() {
+ if (menu != null) {
+ return menu.getVisibility() == View.VISIBLE;
+ }
+
+ return false;
+ }
+}
diff --git a/src/main/res/anim/rbm_in_from_left.xml b/src/main/res/anim/rbm_in_from_left.xml
new file mode 100644
index 0000000..cb97a9d
--- /dev/null
+++ b/src/main/res/anim/rbm_in_from_left.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/main/res/anim/rbm_out_to_left.xml b/src/main/res/anim/rbm_out_to_left.xml
new file mode 100644
index 0000000..f4dceed
--- /dev/null
+++ b/src/main/res/anim/rbm_out_to_left.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/main/res/layout/activity_main.xml b/src/main/res/layout/activity_main.xml
new file mode 100644
index 0000000..f89ba9c
--- /dev/null
+++ b/src/main/res/layout/activity_main.xml
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
+
diff --git a/src/main/res/layout/rbm_menu.xml b/src/main/res/layout/rbm_menu.xml
new file mode 100644
index 0000000..2784ef5
--- /dev/null
+++ b/src/main/res/layout/rbm_menu.xml
@@ -0,0 +1,41 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/main/res/menu/menu_main.xml b/src/main/res/menu/menu_main.xml
new file mode 100644
index 0000000..3427dd3
--- /dev/null
+++ b/src/main/res/menu/menu_main.xml
@@ -0,0 +1,22 @@
+
diff --git a/src/main/res/mipmap-hdpi/ic_launcher.png b/src/main/res/mipmap-hdpi/ic_launcher.png
new file mode 100644
index 0000000..cde69bc
Binary files /dev/null and b/src/main/res/mipmap-hdpi/ic_launcher.png differ
diff --git a/src/main/res/mipmap-mdpi/ic_launcher.png b/src/main/res/mipmap-mdpi/ic_launcher.png
new file mode 100644
index 0000000..c133a0c
Binary files /dev/null and b/src/main/res/mipmap-mdpi/ic_launcher.png differ
diff --git a/src/main/res/mipmap-xhdpi/ic_launcher.png b/src/main/res/mipmap-xhdpi/ic_launcher.png
new file mode 100644
index 0000000..bfa42f0
Binary files /dev/null and b/src/main/res/mipmap-xhdpi/ic_launcher.png differ
diff --git a/src/main/res/mipmap-xxhdpi/ic_launcher.png b/src/main/res/mipmap-xxhdpi/ic_launcher.png
new file mode 100644
index 0000000..324e72c
Binary files /dev/null and b/src/main/res/mipmap-xxhdpi/ic_launcher.png differ
diff --git a/src/main/res/values-w820dp/dimens.xml b/src/main/res/values-w820dp/dimens.xml
new file mode 100644
index 0000000..63fc816
--- /dev/null
+++ b/src/main/res/values-w820dp/dimens.xml
@@ -0,0 +1,6 @@
+
+
+ 64dp
+
diff --git a/src/main/res/values/dimens.xml b/src/main/res/values/dimens.xml
new file mode 100644
index 0000000..47c8224
--- /dev/null
+++ b/src/main/res/values/dimens.xml
@@ -0,0 +1,5 @@
+
+
+ 16dp
+ 16dp
+
diff --git a/src/main/res/values/strings.xml b/src/main/res/values/strings.xml
new file mode 100644
index 0000000..313a864
--- /dev/null
+++ b/src/main/res/values/strings.xml
@@ -0,0 +1,13 @@
+
+ RibbonMenu
+ Hello world!
+ Settings
+ Search
+ Settings
+ Share
+ Menu
+ Feedback
+ About
+ TestButton
+
+
diff --git a/src/main/res/values/styles.xml b/src/main/res/values/styles.xml
new file mode 100644
index 0000000..766ab99
--- /dev/null
+++ b/src/main/res/values/styles.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+