Project updated to Android Studio

- No longer use submodules
- Use latest SDK
- Performed an entire project cleanup
This commit is contained in:
Óscar García Amor 2015-07-26 17:03:28 +02:00
parent b0b1fd7866
commit 89419732ca
748 changed files with 6020 additions and 491 deletions

View File

@ -1,9 +0,0 @@
<?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 kind="src" path="src"/>
<classpathentry kind="src" path="gen"/>
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.DEPENDENCIES"/>
<classpathentry kind="output" path="bin/classes"/>
</classpath>

10
.gitmodules vendored
View File

@ -1,10 +0,0 @@
[submodule "menudrawer"]
path = menudrawer
url = git://github.com/SimonVT/android-menudrawer.git
branch = master
[submodule "pulltorefresh"]
path = pulltorefresh
url = git://github.com/chrisbanes/Android-PullToRefresh.git
[submodule "drag-sort-listview"]
path = drag-sort-listview
url = https://github.com/bauerca/drag-sort-listview

View File

@ -0,0 +1 @@
#Sun Jul 26 16:05:14 CEST 2015

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1,45 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectCodeStyleSettingsManager">
<option name="PER_PROJECT_SETTINGS">
<value>
<option name="CLASS_COUNT_TO_USE_IMPORT_ON_DEMAND" value="99" />
<option name="NAMES_COUNT_TO_USE_IMPORT_ON_DEMAND" value="99" />
<option name="PACKAGES_TO_USE_IMPORT_ON_DEMAND">
<value />
</option>
<option name="IMPORT_LAYOUT_TABLE">
<value>
<package name="android" withSubpackages="true" static="false" />
<emptyLine />
<package name="com" withSubpackages="true" static="false" />
<emptyLine />
<package name="junit" withSubpackages="true" static="false" />
<emptyLine />
<package name="net" withSubpackages="true" static="false" />
<emptyLine />
<package name="org" withSubpackages="true" static="false" />
<emptyLine />
<package name="java" withSubpackages="true" static="false" />
<emptyLine />
<package name="javax" withSubpackages="true" static="false" />
<emptyLine />
<package name="" withSubpackages="true" static="false" />
<emptyLine />
<package name="" withSubpackages="true" static="true" />
<emptyLine />
</value>
</option>
<option name="RIGHT_MARGIN" value="100" />
<AndroidXmlCodeStyleSettings>
<option name="USE_CUSTOM_SETTINGS" value="true" />
</AndroidXmlCodeStyleSettings>
<XML>
<option name="XML_LEGACY_SETTINGS_IMPORTED" value="true" />
</XML>
</value>
</option>
<option name="PREFERRED_PROJECT_CODE_STYLE" value="Default (1)" />
</component>
</project>

View File

@ -1,12 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<option name="DEFAULT_COMPILER" value="Javac" />
<excludeFromCompile>
<directory url="file://$PROJECT_DIR$/gen" includeSubdirectories="true" />
<directory url="file://$PROJECT_DIR$/menudrawer/library/gen" includeSubdirectories="true" />
<directory url="file://$PROJECT_DIR$/pulltorefresh/library/gen" includeSubdirectories="true" />
</excludeFromCompile>
<resourceExtensions />
<wildcardResourcePatterns>
<entry name="!?*.java" />
@ -17,21 +11,12 @@
<entry name="!?*.flex" />
<entry name="!?*.kt" />
<entry name="!?*.clj" />
<entry name="!?*.aj" />
</wildcardResourcePatterns>
<annotationProcessing>
<profile default="true" name="Default" enabled="false">
<processorPath useClasspath="true" />
</profile>
<profile default="false" name="Maven default annotation processors profile" enabled="true">
<sourceOutputDir name="target/generated-sources/annotations" />
<sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
<outputRelativeToContentRoot value="true" />
<processorPath useClasspath="true" />
</profile>
</annotationProcessing>
<bytecodeTargetLevel>
<module name="menudrawer" target="1.6" />
</bytecodeTargetLevel>
</component>
</project>
</project>

View File

@ -1,5 +1,3 @@
<component name="CopyrightManager">
<settings default="">
<module2copyright />
</settings>
<settings default="" />
</component>

View File

@ -1,15 +0,0 @@
<component name="ProjectDictionaryState">
<dictionary name="Josh">
<words>
<w>bahnsen</w>
<w>bitrate</w>
<w>deserialize</w>
<w>deserialized</w>
<w>gapless</w>
<w>looper</w>
<w>playlists</w>
<w>transcoded</w>
<w>vizualizer</w>
</words>
</dictionary>
</component>

View File

@ -1,7 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding" useUTFGuessing="true" native2AsciiForPropertiesFiles="false">
<file url="file://$PROJECT_DIR$/menudrawer" charset="UTF-8" />
</component>
</project>

21
.idea/gradle.xml Normal file
View File

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="GradleSettings">
<option name="linkedExternalProjectsSettings">
<GradleProjectSettings>
<option name="distributionType" value="DEFAULT_WRAPPED" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="gradleJvm" value="1.8" />
<option name="modules">
<set>
<option value="$PROJECT_DIR$" />
<option value="$PROJECT_DIR$/library" />
<option value="$PROJECT_DIR$/menudrawer" />
<option value="$PROJECT_DIR$/pulltorefresh" />
<option value="$PROJECT_DIR$/ultraSonic" />
</set>
</option>
</GradleProjectSettings>
</option>
</component>
</project>

View File

@ -1,20 +0,0 @@
<component name="InspectionProjectProfileManager">
<profile version="1.0" is_locked="false">
<option name="myName" value="Project Default" />
<option name="myLocal" value="false" />
<inspection_tool class="ClassReferencesSubclass" enabled="true" level="WARNING" enabled_by_default="true" />
<inspection_tool class="DeclareCollectionAsInterface" enabled="true" level="WARNING" enabled_by_default="true">
<option name="ignoreLocalVariables" value="false" />
<option name="ignorePrivateMethodsAndFields" value="false" />
</inspection_tool>
<inspection_tool class="OverlyStrongTypeCast" enabled="true" level="WARNING" enabled_by_default="true">
<option name="ignoreInMatchingInstanceof" value="false" />
</inspection_tool>
<inspection_tool class="TypeMayBeWeakened" enabled="true" level="WARNING" enabled_by_default="true">
<option name="useRighthandTypeAsWeakestTypeInAssignments" value="true" />
<option name="useParameterizedTypeForCollectionMethods" value="true" />
<option name="doNotWeakenToJavaLangObject" value="true" />
<option name="onlyWeakentoInterface" value="true" />
</inspection_tool>
</profile>
</component>

View File

@ -1,7 +0,0 @@
<component name="InspectionProjectProfileManager">
<settings>
<option name="PROJECT_PROFILE" />
<option name="USE_PROJECT_PROFILE" value="false" />
<version value="1.0" />
</settings>
</component>

View File

@ -0,0 +1,9 @@
<component name="libraryTable">
<library name="pulltorefresh.pulltorefresh">
<CLASSES>
<root url="jar://$PROJECT_DIR$/pulltorefresh/build/libs/pulltorefresh.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</component>

View File

@ -0,0 +1,11 @@
<component name="libraryTable">
<library name="support-v4-18.0.0">
<CLASSES>
<root url="jar://$USER_HOME$/Android/Sdk/extras/android/m2repository/com/android/support/support-v4/18.0.0/support-v4-18.0.0.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/Android/Sdk/extras/android/m2repository/com/android/support/support-v4/18.0.0/support-v4-18.0.0-sources.jar!/" />
</SOURCES>
</library>
</component>

View File

@ -2,11 +2,11 @@
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/Subsonic-Android.iml" filepath="$PROJECT_DIR$/Subsonic-Android.iml" />
<module fileurl="file://$PROJECT_DIR$/drag-sort-listview.iml" filepath="$PROJECT_DIR$/drag-sort-listview.iml" />
<module fileurl="file://$PROJECT_DIR$/menudrawer.iml" filepath="$PROJECT_DIR$/menudrawer.iml" />
<module fileurl="file://$PROJECT_DIR$/pulltorefresh.iml" filepath="$PROJECT_DIR$/pulltorefresh.iml" />
<module fileurl="file://$PROJECT_DIR$/UltrasSonic.iml" filepath="$PROJECT_DIR$/UltrasSonic.iml" />
<module fileurl="file://$PROJECT_DIR$/library/library.iml" filepath="$PROJECT_DIR$/library/library.iml" />
<module fileurl="file://$PROJECT_DIR$/menudrawer/menudrawer.iml" filepath="$PROJECT_DIR$/menudrawer/menudrawer.iml" />
<module fileurl="file://$PROJECT_DIR$/pulltorefresh/pulltorefresh.iml" filepath="$PROJECT_DIR$/pulltorefresh/pulltorefresh.iml" />
<module fileurl="file://$PROJECT_DIR$/ultraSonic/ultraSonic.iml" filepath="$PROJECT_DIR$/ultraSonic/ultraSonic.iml" />
</modules>
</component>
</project>
</project>

View File

@ -1,5 +0,0 @@
<component name="DependencyValidationManager">
<state>
<option name="SKIP_IMPORT_STATEMENTS" value="false" />
</state>
</component>

View File

@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
<mapping directory="" vcs="" />
</component>
</project>
</project>

View File

@ -1,33 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>UltraSonic</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

@ -1,29 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="FacetManager">
<facet type="android" name="Android">
<configuration>
<option name="UPDATE_PROPERTY_FILES" value="true" />
<notImportedProperties>
<property>MANIFEST_FILE_PATH</property>
<property>RESOURCES_DIR_PATH</property>
<property>ASSETS_DIR_PATH</property>
<property>NATIVE_LIBS_DIR_PATH</property>
</notImportedProperties>
</configuration>
</facet>
</component>
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/gen" isTestSource="false" generated="true" />
</content>
<orderEntry type="jdk" jdkName="Android API 19 Platform" jdkType="Android SDK" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="module" module-name="menudrawer" />
<orderEntry type="module" module-name="pulltorefresh" />
<orderEntry type="module" module-name="drag-sort-listview" />
</component>
</module>

19
UltrasSonic.iml Normal file
View File

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<module external.linked.project.id="UltrasSonic" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$" external.system.id="GRADLE" external.system.module.group="" external.system.module.version="unspecified" type="JAVA_MODULE" version="4">
<component name="FacetManager">
<facet type="java-gradle" name="Java-Gradle">
<configuration>
<option name="BUILD_FOLDER_PATH" value="$MODULE_DIR$/build" />
<option name="BUILDABLE" value="false" />
</configuration>
</facet>
</component>
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/.gradle" />
</content>
<orderEntry type="jdk" jdkName="1.8" jdkType="JavaSDK" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

View File

@ -1,20 +0,0 @@
# This file is used to override default values used by the Ant build system.
#
# This file must be checked in Version Control Systems, as it is
# integral to the build system of your project.
# This file is only used by the Ant script.
# You can use this to override default values such as
# 'source.dir' for the location of your java source folder and
# 'out.dir' for the location of your output folder.
# You can also use it define how the release builds are signed by declaring
# the following properties:
# 'key.store' for the location of your keystore and
# 'key.alias' for the name of the key to use.
# The password will be asked during the build when you use the 'release' target.
key.store=subsonic.keystore
key.alias=subsonic

15
build.gradle Normal file
View File

@ -0,0 +1,15 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.2.3'
}
}
allprojects {
repositories {
jcenter()
}
}

View File

@ -1,85 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project name="UltraSonic" default="help">
<!-- The local.properties file is created and updated by the 'android' tool.
It contains the path to the SDK. It should *NOT* be checked into
Version Control Systems. -->
<loadproperties srcFile="local.properties" />
<!-- The ant.properties file can be created by you. It is only edited by the
'android' tool to add properties to it.
This is the place to change some Ant specific build properties.
Here are some properties you may want to change/update:
source.dir
The name of the source directory. Default is 'src'.
out.dir
The name of the output directory. Default is 'bin'.
For other overridable properties, look at the beginning of the rules
files in the SDK, at tools/ant/build.xml
Properties related to the SDK location or the project target should
be updated using the 'android' tool with the 'update' action.
This file is an integral part of the build system for your
application and should be checked into Version Control Systems.
-->
<property file="ant.properties" />
<!-- The project.properties file is created and updated by the 'android'
tool, as well as ADT.
This contains project specific properties such as project target, and library
dependencies. Lower level build properties are stored in ant.properties
(or in .classpath for Eclipse projects).
This file is an integral part of the build system for your
application and should be checked into Version Control Systems. -->
<loadproperties srcFile="project.properties" />
<!-- quick check on sdk.dir -->
<fail
message="sdk.dir is missing. Make sure to generate local.properties using 'android update project'"
unless="sdk.dir"
/>
<!-- extension targets. Uncomment the ones where you want to do custom work
in between standard targets -->
<!--
<target name="-pre-build">
</target>
<target name="-pre-compile">
</target>
/* This is typically used for code obfuscation.
Compiled code location: ${out.classes.absolute.dir}
If this is not done in place, override ${out.dex.input.absolute.dir} */
<target name="-post-compile">
</target>
-->
<!-- Import the actual build file.
To customize existing targets, there are two options:
- Customize only one target:
- copy/paste the target into this file, *before* the
<import> task.
- customize it to your needs.
- Customize the whole content of build.xml
- copy/paste the content of the rules files (minus the top node)
into this file, replacing the <import> task.
- customize to your needs.
***********************
****** IMPORTANT ******
***********************
In all cases you must update the value of version-tag below to read 'custom' instead of an integer,
in order to avoid having your file be overridden by tools such as "android update project"
-->
<!-- version-tag: 1 -->
<import file="${sdk.dir}/tools/ant/build.xml" />
</project>

Binary file not shown.

View File

@ -1,11 +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 use,
# "ant.properties", and override values to adapt the script to your
# project structure.
# Project target.
target=android-15

@ -1 +0,0 @@
Subproject commit c3cfccee21676149dfdf8e803c0ec2eaebc6b841

View File

@ -1,33 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="FacetManager">
<facet type="android" name="Android">
<configuration>
<option name="GEN_FOLDER_RELATIVE_PATH_APT" value="/drag-sort-listview/library/gen" />
<option name="GEN_FOLDER_RELATIVE_PATH_AIDL" value="/drag-sort-listview/library/gen" />
<option name="MANIFEST_FILE_RELATIVE_PATH" value="/drag-sort-listview/library/AndroidManifest.xml" />
<option name="RES_FOLDER_RELATIVE_PATH" value="/drag-sort-listview/library/res" />
<option name="LIBRARY_PROJECT" value="true" />
</configuration>
</facet>
</component>
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$/drag-sort-listview/library">
<sourceFolder url="file://$MODULE_DIR$/drag-sort-listview/library/gen" isTestSource="false" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/drag-sort-listview/library/src" isTestSource="false" />
</content>
<orderEntry type="jdk" jdkName="Android API 19 Platform" jdkType="Android SDK" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="module-library">
<library>
<CLASSES>
<root url="jar://$APPLICATION_HOME_DIR$/sdk/extras/android/support/v4/android-support-v4.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
</component>
</module>

BIN
gradle/wrapper/gradle-wrapper.jar vendored Normal file

Binary file not shown.

View File

@ -0,0 +1,6 @@
#Wed Apr 10 15:27:10 PDT 2013
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.2.1-all.zip

164
gradlew vendored Executable file
View File

@ -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 "$@"

90
gradlew.bat vendored Normal file
View File

@ -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

809
import-summary.txt Normal file
View File

@ -0,0 +1,809 @@
ECLIPSE ANDROID PROJECT IMPORT SUMMARY
======================================
Manifest Merging:
-----------------
Your project uses libraries that provide manifests, and your Eclipse
project did not explicitly turn on manifest merging. In Android Gradle
projects, manifests are always merged (meaning that contents from your
libraries' manifests will be merged into the app manifest. If you had
manually copied contents from library manifests into your app manifest
you may need to remove these for the app to build correctly.
Ignored Files:
--------------
The following files were *not* copied into the new Gradle project; you
should evaluate whether these are still needed in your project and if
so manually move them:
From UltraSonic:
* .gitattributes
* .gitignore
* .gitmodules
* .idea/
* .idea/.name
* .idea/codeStyleSettings.xml
* .idea/compiler.xml
* .idea/copyright/
* .idea/copyright/profiles_settings.xml
* .idea/dictionaries/
* .idea/dictionaries/Josh.xml
* .idea/encodings.xml
* .idea/inspectionProfiles/
* .idea/inspectionProfiles/Project_Default.xml
* .idea/inspectionProfiles/profiles_settings.xml
* .idea/modules.xml
* .idea/scopes/
* .idea/scopes/scope_settings.xml
* .idea/vcs.xml
* Subsonic-Android.iml
* ant.properties
* build.xml
* debug.keystore
* default.properties
* drag-sort-listview.iml
* drag-sort-listview/
* drag-sort-listview/.git
* drag-sort-listview/.gitignore
* drag-sort-listview/CHANGELOG.md
* drag-sort-listview/README.md
* drag-sort-listview/demo/
* drag-sort-listview/demo/.gitignore
* drag-sort-listview/demo/AndroidManifest.xml
* drag-sort-listview/demo/ant.properties
* drag-sort-listview/demo/app-description.txt
* drag-sort-listview/demo/build.xml
* drag-sort-listview/demo/libs/
* drag-sort-listview/demo/libs/android-support-v4.jar
* drag-sort-listview/demo/pom.xml
* drag-sort-listview/demo/proguard-project.txt
* drag-sort-listview/demo/project.properties
* drag-sort-listview/demo/res/
* drag-sort-listview/demo/res/drawable-hdpi/
* drag-sort-listview/demo/res/drawable-hdpi/delete_x.png
* drag-sort-listview/demo/res/drawable-hdpi/drag.9.png
* drag-sort-listview/demo/res/drawable-hdpi/dslv_launcher.png
* drag-sort-listview/demo/res/drawable-ldpi/
* drag-sort-listview/demo/res/drawable-ldpi/dslv_launcher.png
* drag-sort-listview/demo/res/drawable-mdpi/
* drag-sort-listview/demo/res/drawable-mdpi/drag.9.png
* drag-sort-listview/demo/res/drawable-mdpi/dslv_launcher.png
* drag-sort-listview/demo/res/drawable-xhdpi/
* drag-sort-listview/demo/res/drawable-xhdpi/dslv_launcher.png
* drag-sort-listview/demo/res/drawable/
* drag-sort-listview/demo/res/drawable/bg_handle.xml
* drag-sort-listview/demo/res/drawable/bg_handle_section1.xml
* drag-sort-listview/demo/res/drawable/bg_handle_section1_selector.xml
* drag-sort-listview/demo/res/drawable/bg_handle_section2.xml
* drag-sort-listview/demo/res/drawable/bg_handle_section2_selector.xml
* drag-sort-listview/demo/res/drawable/drag.9.png
* drag-sort-listview/demo/res/drawable/section_div.xml
* drag-sort-listview/demo/res/layout/
* drag-sort-listview/demo/res/layout/bg_handle_main.xml
* drag-sort-listview/demo/res/layout/checkable_main.xml
* drag-sort-listview/demo/res/layout/cursor_main.xml
* drag-sort-listview/demo/res/layout/dslv_fragment_main.xml
* drag-sort-listview/demo/res/layout/header_footer.xml
* drag-sort-listview/demo/res/layout/hetero_main.xml
* drag-sort-listview/demo/res/layout/jazz_artist_list_item.xml
* drag-sort-listview/demo/res/layout/launcher.xml
* drag-sort-listview/demo/res/layout/launcher_item.xml
* drag-sort-listview/demo/res/layout/list_item_bg_handle.xml
* drag-sort-listview/demo/res/layout/list_item_checkable.xml
* drag-sort-listview/demo/res/layout/list_item_click_remove.xml
* drag-sort-listview/demo/res/layout/list_item_handle_left.xml
* drag-sort-listview/demo/res/layout/list_item_handle_right.xml
* drag-sort-listview/demo/res/layout/list_item_no_handle.xml
* drag-sort-listview/demo/res/layout/list_item_radio.xml
* drag-sort-listview/demo/res/layout/section_div.xml
* drag-sort-listview/demo/res/layout/sections_main.xml
* drag-sort-listview/demo/res/layout/test_bed_main.xml
* drag-sort-listview/demo/res/layout/warp_main.xml
* drag-sort-listview/demo/res/menu/
* drag-sort-listview/demo/res/menu/mode_menu.xml
* drag-sort-listview/demo/res/values/
* drag-sort-listview/demo/res/values/colors.xml
* drag-sort-listview/demo/res/values/dimens.xml
* drag-sort-listview/demo/res/values/ids.xml
* drag-sort-listview/demo/res/values/strings.xml
* drag-sort-listview/demo/src/
* drag-sort-listview/demo/src/com/
* drag-sort-listview/demo/src/com/mobeta/
* drag-sort-listview/demo/src/com/mobeta/android/
* drag-sort-listview/demo/src/com/mobeta/android/demodslv/
* drag-sort-listview/demo/src/com/mobeta/android/demodslv/ArbItemSizeDSLV.java
* drag-sort-listview/demo/src/com/mobeta/android/demodslv/BGHandle.java
* drag-sort-listview/demo/src/com/mobeta/android/demodslv/CheckableLinearLayout.java
* drag-sort-listview/demo/src/com/mobeta/android/demodslv/CursorDSLV.java
* drag-sort-listview/demo/src/com/mobeta/android/demodslv/DSLVFragment.java
* drag-sort-listview/demo/src/com/mobeta/android/demodslv/DSLVFragmentBGHandle.java
* drag-sort-listview/demo/src/com/mobeta/android/demodslv/DSLVFragmentClicks.java
* drag-sort-listview/demo/src/com/mobeta/android/demodslv/DragInitModeDialog.java
* drag-sort-listview/demo/src/com/mobeta/android/demodslv/EnablesDialog.java
* drag-sort-listview/demo/src/com/mobeta/android/demodslv/Launcher.java
* drag-sort-listview/demo/src/com/mobeta/android/demodslv/MultipleChoiceListView.java
* drag-sort-listview/demo/src/com/mobeta/android/demodslv/RemoveModeDialog.java
* drag-sort-listview/demo/src/com/mobeta/android/demodslv/Sections.java
* drag-sort-listview/demo/src/com/mobeta/android/demodslv/SingleChoiceListView.java
* drag-sort-listview/demo/src/com/mobeta/android/demodslv/TestBedDSLV.java
* drag-sort-listview/demo/src/com/mobeta/android/demodslv/WarpDSLV.java
* drag-sort-listview/library/
* drag-sort-listview/library/.gitignore
* drag-sort-listview/library/AndroidManifest.xml
* drag-sort-listview/library/ant.properties
* drag-sort-listview/library/build.xml
* drag-sort-listview/library/libs/
* drag-sort-listview/library/libs/android-support-v4.jar
* drag-sort-listview/library/pom.xml
* drag-sort-listview/library/proguard-project.txt
* drag-sort-listview/library/project.properties
* drag-sort-listview/library/res/
* drag-sort-listview/library/res/values/
* drag-sort-listview/library/res/values/dslv_attrs.xml
* drag-sort-listview/library/src/
* drag-sort-listview/library/src/com/
* drag-sort-listview/library/src/com/mobeta/
* drag-sort-listview/library/src/com/mobeta/android/
* drag-sort-listview/library/src/com/mobeta/android/dslv/
* drag-sort-listview/library/src/com/mobeta/android/dslv/DragSortController.java
* drag-sort-listview/library/src/com/mobeta/android/dslv/DragSortCursorAdapter.java
* drag-sort-listview/library/src/com/mobeta/android/dslv/DragSortItemView.java
* drag-sort-listview/library/src/com/mobeta/android/dslv/DragSortItemViewCheckable.java
* drag-sort-listview/library/src/com/mobeta/android/dslv/DragSortListView.java
* drag-sort-listview/library/src/com/mobeta/android/dslv/ResourceDragSortCursorAdapter.java
* drag-sort-listview/library/src/com/mobeta/android/dslv/SimpleDragSortCursorAdapter.java
* drag-sort-listview/library/src/com/mobeta/android/dslv/SimpleFloatViewManager.java
* drag-sort-listview/pom.xml
* drag-sort-listview/tools/
* drag-sort-listview/tools/demo-sign-align.sh
* drag-sort-listview/tools/doc-dslv.sh
* drag-sort-listview/tools/dslv.py
* drag-sort-listview/tools/pkg-dslv.sh
* menudrawer.iml
* menudrawer/
* menudrawer/.git
* menudrawer/.gitignore
* menudrawer/CHANGELOG.md
* menudrawer/LICENSE
* menudrawer/README.md
* menudrawer/art/
* menudrawer/art/menu_arrow.svg
* menudrawer/build.gradle
* menudrawer/checkstyle.xml
* menudrawer/gradle/
* menudrawer/gradle/wrapper/
* menudrawer/gradle/wrapper/gradle-wrapper.jar
* menudrawer/gradle/wrapper/gradle-wrapper.properties
* menudrawer/gradlew
* menudrawer/gradlew.bat
* menudrawer/menudrawer-samples/
* menudrawer/menudrawer-samples/AndroidManifest.xml
* menudrawer/menudrawer-samples/build.gradle
* menudrawer/menudrawer-samples/res/
* menudrawer/menudrawer-samples/res/drawable-hdpi-v14/
* menudrawer/menudrawer-samples/res/drawable-hdpi-v14/menu_arrow_bottom.png
* menudrawer/menudrawer-samples/res/drawable-hdpi-v14/menu_arrow_end.png
* menudrawer/menudrawer-samples/res/drawable-hdpi-v14/menu_arrow_start.png
* menudrawer/menudrawer-samples/res/drawable-hdpi-v14/menu_arrow_top.png
* menudrawer/menudrawer-samples/res/drawable-hdpi/
* menudrawer/menudrawer-samples/res/drawable-hdpi/ic_action_refresh_dark.png
* menudrawer/menudrawer-samples/res/drawable-hdpi/ic_action_select_all_dark.png
* menudrawer/menudrawer-samples/res/drawable-hdpi/ic_drawer.png
* menudrawer/menudrawer-samples/res/drawable-hdpi/ic_launcher.png
* menudrawer/menudrawer-samples/res/drawable-hdpi/ic_menu_moreoverflow_normal_holo_light.png
* menudrawer/menudrawer-samples/res/drawable-hdpi/md__category_background.9.png
* menudrawer/menudrawer-samples/res/drawable-hdpi/md__list_focused_holo.9.png
* menudrawer/menudrawer-samples/res/drawable-hdpi/md__list_longpressed_holo.9.png
* menudrawer/menudrawer-samples/res/drawable-hdpi/md__list_pressed_holo_dark.9.png
* menudrawer/menudrawer-samples/res/drawable-hdpi/md__list_selector_disabled_holo_dark.9.png
* menudrawer/menudrawer-samples/res/drawable-hdpi/menu_arrow_bottom.png
* menudrawer/menudrawer-samples/res/drawable-hdpi/menu_arrow_end.png
* menudrawer/menudrawer-samples/res/drawable-hdpi/menu_arrow_start.png
* menudrawer/menudrawer-samples/res/drawable-hdpi/menu_arrow_top.png
* menudrawer/menudrawer-samples/res/drawable-ldrtl-hdpi/
* menudrawer/menudrawer-samples/res/drawable-ldrtl-hdpi/ic_drawer.png
* menudrawer/menudrawer-samples/res/drawable-ldrtl-hdpi/menu_arrow_end.png
* menudrawer/menudrawer-samples/res/drawable-ldrtl-hdpi/menu_arrow_start.png
* menudrawer/menudrawer-samples/res/drawable-ldrtl-mdpi/
* menudrawer/menudrawer-samples/res/drawable-ldrtl-mdpi/ic_drawer.png
* menudrawer/menudrawer-samples/res/drawable-ldrtl-mdpi/menu_arrow_end.png
* menudrawer/menudrawer-samples/res/drawable-ldrtl-mdpi/menu_arrow_start.png
* menudrawer/menudrawer-samples/res/drawable-ldrtl-xhdpi/
* menudrawer/menudrawer-samples/res/drawable-ldrtl-xhdpi/ic_drawer.png
* menudrawer/menudrawer-samples/res/drawable-ldrtl-xhdpi/menu_arrow_end.png
* menudrawer/menudrawer-samples/res/drawable-ldrtl-xhdpi/menu_arrow_start.png
* menudrawer/menudrawer-samples/res/drawable-mdpi-v14/
* menudrawer/menudrawer-samples/res/drawable-mdpi-v14/menu_arrow_bottom.png
* menudrawer/menudrawer-samples/res/drawable-mdpi-v14/menu_arrow_end.png
* menudrawer/menudrawer-samples/res/drawable-mdpi-v14/menu_arrow_start.png
* menudrawer/menudrawer-samples/res/drawable-mdpi-v14/menu_arrow_top.png
* menudrawer/menudrawer-samples/res/drawable-mdpi/
* menudrawer/menudrawer-samples/res/drawable-mdpi/ic_action_refresh_dark.png
* menudrawer/menudrawer-samples/res/drawable-mdpi/ic_action_select_all_dark.png
* menudrawer/menudrawer-samples/res/drawable-mdpi/ic_drawer.png
* menudrawer/menudrawer-samples/res/drawable-mdpi/ic_launcher.png
* menudrawer/menudrawer-samples/res/drawable-mdpi/ic_menu_moreoverflow_normal_holo_light.png
* menudrawer/menudrawer-samples/res/drawable-mdpi/md__category_background.9.png
* menudrawer/menudrawer-samples/res/drawable-mdpi/md__list_focused_holo.9.png
* menudrawer/menudrawer-samples/res/drawable-mdpi/md__list_longpressed_holo.9.png
* menudrawer/menudrawer-samples/res/drawable-mdpi/md__list_pressed_holo_dark.9.png
* menudrawer/menudrawer-samples/res/drawable-mdpi/md__list_selector_disabled_holo_dark.9.png
* menudrawer/menudrawer-samples/res/drawable-mdpi/menu_arrow_bottom.png
* menudrawer/menudrawer-samples/res/drawable-mdpi/menu_arrow_end.png
* menudrawer/menudrawer-samples/res/drawable-mdpi/menu_arrow_start.png
* menudrawer/menudrawer-samples/res/drawable-mdpi/menu_arrow_top.png
* menudrawer/menudrawer-samples/res/drawable-xhdpi-v14/
* menudrawer/menudrawer-samples/res/drawable-xhdpi-v14/menu_arrow_bottom.png
* menudrawer/menudrawer-samples/res/drawable-xhdpi-v14/menu_arrow_end.png
* menudrawer/menudrawer-samples/res/drawable-xhdpi-v14/menu_arrow_start.png
* menudrawer/menudrawer-samples/res/drawable-xhdpi-v14/menu_arrow_top.png
* menudrawer/menudrawer-samples/res/drawable-xhdpi/
* menudrawer/menudrawer-samples/res/drawable-xhdpi/ic_action_refresh_dark.png
* menudrawer/menudrawer-samples/res/drawable-xhdpi/ic_action_select_all_dark.png
* menudrawer/menudrawer-samples/res/drawable-xhdpi/ic_drawer.png
* menudrawer/menudrawer-samples/res/drawable-xhdpi/ic_launcher.png
* menudrawer/menudrawer-samples/res/drawable-xhdpi/ic_menu_moreoverflow_normal_holo_light.png
* menudrawer/menudrawer-samples/res/drawable-xhdpi/md__category_background.9.png
* menudrawer/menudrawer-samples/res/drawable-xhdpi/md__list_focused_holo.9.png
* menudrawer/menudrawer-samples/res/drawable-xhdpi/md__list_longpressed_holo.9.png
* menudrawer/menudrawer-samples/res/drawable-xhdpi/md__list_pressed_holo_dark.9.png
* menudrawer/menudrawer-samples/res/drawable-xhdpi/md__list_selector_disabled_holo_dark.9.png
* menudrawer/menudrawer-samples/res/drawable-xhdpi/menu_arrow_bottom.png
* menudrawer/menudrawer-samples/res/drawable-xhdpi/menu_arrow_end.png
* menudrawer/menudrawer-samples/res/drawable-xhdpi/menu_arrow_start.png
* menudrawer/menudrawer-samples/res/drawable-xhdpi/menu_arrow_top.png
* menudrawer/menudrawer-samples/res/drawable/
* menudrawer/menudrawer-samples/res/drawable/md__list_selector_background_transition_holo_dark.xml
* menudrawer/menudrawer-samples/res/drawable/md__list_selector_holo_dark.xml
* menudrawer/menudrawer-samples/res/layout/
* menudrawer/menudrawer-samples/res/layout/activity_bottommenu.xml
* menudrawer/menudrawer-samples/res/layout/activity_contentsample.xml
* menudrawer/menudrawer-samples/res/layout/activity_layoutsample.xml
* menudrawer/menudrawer-samples/res/layout/activity_rightmenu.xml
* menudrawer/menudrawer-samples/res/layout/activity_staticsample.xml
* menudrawer/menudrawer-samples/res/layout/activity_topmenu.xml
* menudrawer/menudrawer-samples/res/layout/activity_viewpagersample.xml
* menudrawer/menudrawer-samples/res/layout/activity_windowsample.xml
* menudrawer/menudrawer-samples/res/layout/fragment_sample.xml
* menudrawer/menudrawer-samples/res/layout/list_row_sample.xml
* menudrawer/menudrawer-samples/res/layout/list_row_sample_header.xml
* menudrawer/menudrawer-samples/res/layout/main.xml
* menudrawer/menudrawer-samples/res/layout/menu_bottom.xml
* menudrawer/menudrawer-samples/res/layout/menu_row_category.xml
* menudrawer/menudrawer-samples/res/layout/menu_row_item.xml
* menudrawer/menudrawer-samples/res/layout/menu_scrollview.xml
* menudrawer/menudrawer-samples/res/layout/menu_top.xml
* menudrawer/menudrawer-samples/res/values-v14/
* menudrawer/menudrawer-samples/res/values-v14/colors.xml
* menudrawer/menudrawer-samples/res/values-v14/themes.xml
* menudrawer/menudrawer-samples/res/values/
* menudrawer/menudrawer-samples/res/values/colors.xml
* menudrawer/menudrawer-samples/res/values/strings.xml
* menudrawer/menudrawer-samples/res/values/styles.xml
* menudrawer/menudrawer-samples/res/values/themes.xml
* menudrawer/menudrawer-samples/src/
* menudrawer/menudrawer-samples/src/net/
* menudrawer/menudrawer-samples/src/net/simonvt/
* menudrawer/menudrawer-samples/src/net/simonvt/menudrawer/
* menudrawer/menudrawer-samples/src/net/simonvt/menudrawer/samples/
* menudrawer/menudrawer-samples/src/net/simonvt/menudrawer/samples/ActionBarSherlockSample.java
* menudrawer/menudrawer-samples/src/net/simonvt/menudrawer/samples/BaseListSample.java
* menudrawer/menudrawer-samples/src/net/simonvt/menudrawer/samples/BottomDrawerSample.java
* menudrawer/menudrawer-samples/src/net/simonvt/menudrawer/samples/BottomOverlaySample.java
* menudrawer/menudrawer-samples/src/net/simonvt/menudrawer/samples/Category.java
* menudrawer/menudrawer-samples/src/net/simonvt/menudrawer/samples/FragmentSample.java
* menudrawer/menudrawer-samples/src/net/simonvt/menudrawer/samples/Item.java
* menudrawer/menudrawer-samples/src/net/simonvt/menudrawer/samples/LayoutSample.java
* menudrawer/menudrawer-samples/src/net/simonvt/menudrawer/samples/LeftDrawerSample.java
* menudrawer/menudrawer-samples/src/net/simonvt/menudrawer/samples/LeftOverlaySample.java
* menudrawer/menudrawer-samples/src/net/simonvt/menudrawer/samples/ListActivitySample.java
* menudrawer/menudrawer-samples/src/net/simonvt/menudrawer/samples/MenuAdapter.java
* menudrawer/menudrawer-samples/src/net/simonvt/menudrawer/samples/RightDrawerSample.java
* menudrawer/menudrawer-samples/src/net/simonvt/menudrawer/samples/RightOverlaySample.java
* menudrawer/menudrawer-samples/src/net/simonvt/menudrawer/samples/SamplesActivity.java
* menudrawer/menudrawer-samples/src/net/simonvt/menudrawer/samples/StaticDrawerSample.java
* menudrawer/menudrawer-samples/src/net/simonvt/menudrawer/samples/TopDrawerSample.java
* menudrawer/menudrawer-samples/src/net/simonvt/menudrawer/samples/TopOverlaySample.java
* menudrawer/menudrawer-samples/src/net/simonvt/menudrawer/samples/ViewPagerSample.java
* menudrawer/menudrawer-samples/src/net/simonvt/menudrawer/samples/WindowSample.java
* menudrawer/menudrawer/
* menudrawer/menudrawer/AndroidManifest.xml
* menudrawer/menudrawer/build.gradle
* menudrawer/menudrawer/res/
* menudrawer/menudrawer/res/values/
* menudrawer/menudrawer/res/values/attrs.xml
* menudrawer/menudrawer/res/values/colors.xml
* menudrawer/menudrawer/res/values/ids.xml
* menudrawer/menudrawer/res/values/strings.xml
* menudrawer/menudrawer/res/values/styles.xml
* menudrawer/menudrawer/src/
* menudrawer/menudrawer/src/net/
* menudrawer/menudrawer/src/net/simonvt/
* menudrawer/menudrawer/src/net/simonvt/menudrawer/
* menudrawer/menudrawer/src/net/simonvt/menudrawer/BuildLayerFrameLayout.java
* menudrawer/menudrawer/src/net/simonvt/menudrawer/ColorDrawable.java
* menudrawer/menudrawer/src/net/simonvt/menudrawer/DraggableDrawer.java
* menudrawer/menudrawer/src/net/simonvt/menudrawer/FloatScroller.java
* menudrawer/menudrawer/src/net/simonvt/menudrawer/MenuDrawer.java
* menudrawer/menudrawer/src/net/simonvt/menudrawer/NoClickThroughFrameLayout.java
* menudrawer/menudrawer/src/net/simonvt/menudrawer/OverlayDrawer.java
* menudrawer/menudrawer/src/net/simonvt/menudrawer/PeekInterpolator.java
* menudrawer/menudrawer/src/net/simonvt/menudrawer/Position.java
* menudrawer/menudrawer/src/net/simonvt/menudrawer/Scroller.java
* menudrawer/menudrawer/src/net/simonvt/menudrawer/SinusoidalInterpolator.java
* menudrawer/menudrawer/src/net/simonvt/menudrawer/SlideDrawable.java
* menudrawer/menudrawer/src/net/simonvt/menudrawer/SlidingDrawer.java
* menudrawer/menudrawer/src/net/simonvt/menudrawer/SmoothInterpolator.java
* menudrawer/menudrawer/src/net/simonvt/menudrawer/StaticDrawer.java
* menudrawer/menudrawer/src/net/simonvt/menudrawer/ViewHelper.java
* menudrawer/menudrawer/src/net/simonvt/menudrawer/compat/
* menudrawer/menudrawer/src/net/simonvt/menudrawer/compat/ActionBarHelper.java
* menudrawer/menudrawer/src/net/simonvt/menudrawer/compat/ActionBarHelperCompat.java
* menudrawer/menudrawer/src/net/simonvt/menudrawer/compat/ActionBarHelperNative.java
* menudrawer/settings.gradle
* proguard.cfg
* pulltorefresh.iml
* pulltorefresh/
* pulltorefresh/.git
* pulltorefresh/.gitignore
* pulltorefresh/LICENSE
* pulltorefresh/README.md
* pulltorefresh/extras/
* pulltorefresh/extras/PullToRefreshListFragment/
* pulltorefresh/extras/PullToRefreshListFragment/AndroidManifest.xml
* pulltorefresh/extras/PullToRefreshListFragment/LICENSE
* pulltorefresh/extras/PullToRefreshListFragment/libs/
* pulltorefresh/extras/PullToRefreshListFragment/libs/android-support-v4.jar
* pulltorefresh/extras/PullToRefreshListFragment/pom.xml
* pulltorefresh/extras/PullToRefreshListFragment/project.properties
* pulltorefresh/extras/PullToRefreshListFragment/res/
* pulltorefresh/extras/PullToRefreshListFragment/res/layout/
* pulltorefresh/extras/PullToRefreshListFragment/res/layout/need_this_for_maven.xml
* pulltorefresh/extras/PullToRefreshListFragment/src/
* pulltorefresh/extras/PullToRefreshListFragment/src/com/
* pulltorefresh/extras/PullToRefreshListFragment/src/com/handmark/
* pulltorefresh/extras/PullToRefreshListFragment/src/com/handmark/pulltorefresh/
* pulltorefresh/extras/PullToRefreshListFragment/src/com/handmark/pulltorefresh/extras/
* pulltorefresh/extras/PullToRefreshListFragment/src/com/handmark/pulltorefresh/extras/listfragment/
* pulltorefresh/extras/PullToRefreshListFragment/src/com/handmark/pulltorefresh/extras/listfragment/PullToRefreshBaseListFragment.java
* pulltorefresh/extras/PullToRefreshListFragment/src/com/handmark/pulltorefresh/extras/listfragment/PullToRefreshExpandableListFragment.java
* pulltorefresh/extras/PullToRefreshListFragment/src/com/handmark/pulltorefresh/extras/listfragment/PullToRefreshListFragment.java
* pulltorefresh/extras/PullToRefreshViewPager/
* pulltorefresh/extras/PullToRefreshViewPager/AndroidManifest.xml
* pulltorefresh/extras/PullToRefreshViewPager/ant.properties
* pulltorefresh/extras/PullToRefreshViewPager/libs/
* pulltorefresh/extras/PullToRefreshViewPager/libs/android-support-v4.jar
* pulltorefresh/extras/PullToRefreshViewPager/pom.xml
* pulltorefresh/extras/PullToRefreshViewPager/proguard-project.txt
* pulltorefresh/extras/PullToRefreshViewPager/project.properties
* pulltorefresh/extras/PullToRefreshViewPager/res/
* pulltorefresh/extras/PullToRefreshViewPager/res/layout/
* pulltorefresh/extras/PullToRefreshViewPager/res/layout/need_this_for_maven.xml
* pulltorefresh/extras/PullToRefreshViewPager/res/values/
* pulltorefresh/extras/PullToRefreshViewPager/res/values/ids.xml
* pulltorefresh/extras/PullToRefreshViewPager/src/
* pulltorefresh/extras/PullToRefreshViewPager/src/com/
* pulltorefresh/extras/PullToRefreshViewPager/src/com/handmark/
* pulltorefresh/extras/PullToRefreshViewPager/src/com/handmark/pulltorefresh/
* pulltorefresh/extras/PullToRefreshViewPager/src/com/handmark/pulltorefresh/extras/
* pulltorefresh/extras/PullToRefreshViewPager/src/com/handmark/pulltorefresh/extras/viewpager/
* pulltorefresh/extras/PullToRefreshViewPager/src/com/handmark/pulltorefresh/extras/viewpager/PullToRefreshViewPager.java
* pulltorefresh/extras/pom.xml
* pulltorefresh/header_graphic.png
* pulltorefresh/library/
* pulltorefresh/library/AndroidManifest.xml
* pulltorefresh/library/LICENSE
* pulltorefresh/library/pom.xml
* pulltorefresh/library/project.properties
* pulltorefresh/library/res/
* pulltorefresh/library/res/anim/
* pulltorefresh/library/res/anim/slide_in_from_bottom.xml
* pulltorefresh/library/res/anim/slide_in_from_top.xml
* pulltorefresh/library/res/anim/slide_out_to_bottom.xml
* pulltorefresh/library/res/anim/slide_out_to_top.xml
* pulltorefresh/library/res/drawable-hdpi/
* pulltorefresh/library/res/drawable-hdpi/default_ptr_flip.png
* pulltorefresh/library/res/drawable-hdpi/default_ptr_rotate.png
* pulltorefresh/library/res/drawable-hdpi/indicator_arrow.png
* pulltorefresh/library/res/drawable-mdpi/
* pulltorefresh/library/res/drawable-mdpi/default_ptr_flip.png
* pulltorefresh/library/res/drawable-mdpi/default_ptr_rotate.png
* pulltorefresh/library/res/drawable-mdpi/indicator_arrow.png
* pulltorefresh/library/res/drawable-xhdpi/
* pulltorefresh/library/res/drawable-xhdpi/default_ptr_flip.png
* pulltorefresh/library/res/drawable-xhdpi/default_ptr_rotate.png
* pulltorefresh/library/res/drawable-xhdpi/indicator_arrow.png
* pulltorefresh/library/res/drawable/
* pulltorefresh/library/res/drawable/indicator_bg_bottom.xml
* pulltorefresh/library/res/drawable/indicator_bg_top.xml
* pulltorefresh/library/res/layout/
* pulltorefresh/library/res/layout/pull_to_refresh_header_horizontal.xml
* pulltorefresh/library/res/layout/pull_to_refresh_header_vertical.xml
* pulltorefresh/library/res/values-ar/
* pulltorefresh/library/res/values-ar/pull_refresh_strings.xml
* pulltorefresh/library/res/values-cs/
* pulltorefresh/library/res/values-cs/pull_refresh_strings.xml
* pulltorefresh/library/res/values-de/
* pulltorefresh/library/res/values-de/pull_refresh_strings.xml
* pulltorefresh/library/res/values-es/
* pulltorefresh/library/res/values-es/pull_refresh_strings.xml
* pulltorefresh/library/res/values-fi/
* pulltorefresh/library/res/values-fi/pull_refresh_strings.xml
* pulltorefresh/library/res/values-fr/
* pulltorefresh/library/res/values-fr/pull_refresh_strings.xml
* pulltorefresh/library/res/values-he/
* pulltorefresh/library/res/values-he/pull_refresh_strings.xml
* pulltorefresh/library/res/values-it/
* pulltorefresh/library/res/values-it/pull_refresh_strings.xml
* pulltorefresh/library/res/values-iw/
* pulltorefresh/library/res/values-iw/pull_refresh_strings.xml
* pulltorefresh/library/res/values-ja/
* pulltorefresh/library/res/values-ja/pull_refresh_strings.xml
* pulltorefresh/library/res/values-ko/
* pulltorefresh/library/res/values-ko/pull_refresh_strings.xml
* pulltorefresh/library/res/values-nl/
* pulltorefresh/library/res/values-nl/pull_refresh_strings.xml
* pulltorefresh/library/res/values-pl/
* pulltorefresh/library/res/values-pl/pull_refresh_strings.xml
* pulltorefresh/library/res/values-pt-rBR/
* pulltorefresh/library/res/values-pt-rBR/pull_refresh_strings.xml
* pulltorefresh/library/res/values-pt/
* pulltorefresh/library/res/values-pt/pull_refresh_strings.xml
* pulltorefresh/library/res/values-ro/
* pulltorefresh/library/res/values-ro/pull_refresh_strings.xml
* pulltorefresh/library/res/values-ru/
* pulltorefresh/library/res/values-ru/pull_refresh_strings.xml
* pulltorefresh/library/res/values-zh/
* pulltorefresh/library/res/values-zh/pull_refresh_strings.xml
* pulltorefresh/library/res/values/
* pulltorefresh/library/res/values/attrs.xml
* pulltorefresh/library/res/values/dimens.xml
* pulltorefresh/library/res/values/ids.xml
* pulltorefresh/library/res/values/pull_refresh_strings.xml
* pulltorefresh/library/src/
* pulltorefresh/library/src/com/
* pulltorefresh/library/src/com/handmark/
* pulltorefresh/library/src/com/handmark/pulltorefresh/
* pulltorefresh/library/src/com/handmark/pulltorefresh/library/
* pulltorefresh/library/src/com/handmark/pulltorefresh/library/ILoadingLayout.java
* pulltorefresh/library/src/com/handmark/pulltorefresh/library/IPullToRefresh.java
* pulltorefresh/library/src/com/handmark/pulltorefresh/library/LoadingLayoutProxy.java
* pulltorefresh/library/src/com/handmark/pulltorefresh/library/OverscrollHelper.java
* pulltorefresh/library/src/com/handmark/pulltorefresh/library/PullToRefreshAdapterViewBase.java
* pulltorefresh/library/src/com/handmark/pulltorefresh/library/PullToRefreshBase.java
* pulltorefresh/library/src/com/handmark/pulltorefresh/library/PullToRefreshExpandableListView.java
* pulltorefresh/library/src/com/handmark/pulltorefresh/library/PullToRefreshGridView.java
* pulltorefresh/library/src/com/handmark/pulltorefresh/library/PullToRefreshHorizontalScrollView.java
* pulltorefresh/library/src/com/handmark/pulltorefresh/library/PullToRefreshListView.java
* pulltorefresh/library/src/com/handmark/pulltorefresh/library/PullToRefreshScrollView.java
* pulltorefresh/library/src/com/handmark/pulltorefresh/library/PullToRefreshWebView.java
* pulltorefresh/library/src/com/handmark/pulltorefresh/library/extras/
* pulltorefresh/library/src/com/handmark/pulltorefresh/library/extras/PullToRefreshWebView2.java
* pulltorefresh/library/src/com/handmark/pulltorefresh/library/extras/SoundPullEventListener.java
* pulltorefresh/library/src/com/handmark/pulltorefresh/library/internal/
* pulltorefresh/library/src/com/handmark/pulltorefresh/library/internal/EmptyViewMethodAccessor.java
* pulltorefresh/library/src/com/handmark/pulltorefresh/library/internal/FlipLoadingLayout.java
* pulltorefresh/library/src/com/handmark/pulltorefresh/library/internal/IndicatorLayout.java
* pulltorefresh/library/src/com/handmark/pulltorefresh/library/internal/LoadingLayout.java
* pulltorefresh/library/src/com/handmark/pulltorefresh/library/internal/RotateLoadingLayout.java
* pulltorefresh/library/src/com/handmark/pulltorefresh/library/internal/Utils.java
* pulltorefresh/library/src/com/handmark/pulltorefresh/library/internal/ViewCompat.java
* pulltorefresh/pom.xml
* pulltorefresh/sample/
* pulltorefresh/sample/AndroidManifest.xml
* pulltorefresh/sample/LICENSE
* pulltorefresh/sample/assets/
* pulltorefresh/sample/assets/ptr_webview2_sample.html
* pulltorefresh/sample/libs/
* pulltorefresh/sample/libs/android-support-v4.jar
* pulltorefresh/sample/pom.xml
* pulltorefresh/sample/project.properties
* pulltorefresh/sample/res/
* pulltorefresh/sample/res/drawable-hdpi/
* pulltorefresh/sample/res/drawable-hdpi/android.png
* pulltorefresh/sample/res/drawable-hdpi/icon.png
* pulltorefresh/sample/res/drawable-ldpi/
* pulltorefresh/sample/res/drawable-ldpi/icon.png
* pulltorefresh/sample/res/drawable-mdpi/
* pulltorefresh/sample/res/drawable-mdpi/icon.png
* pulltorefresh/sample/res/drawable-nodpi/
* pulltorefresh/sample/res/drawable-nodpi/wallpaper.jpg
* pulltorefresh/sample/res/drawable-xhdpi/
* pulltorefresh/sample/res/drawable-xhdpi/android.png
* pulltorefresh/sample/res/drawable/
* pulltorefresh/sample/res/drawable/icon.png
* pulltorefresh/sample/res/layout/
* pulltorefresh/sample/res/layout/activity_ptr_expandable_list.xml
* pulltorefresh/sample/res/layout/activity_ptr_grid.xml
* pulltorefresh/sample/res/layout/activity_ptr_horizontalscrollview.xml
* pulltorefresh/sample/res/layout/activity_ptr_list.xml
* pulltorefresh/sample/res/layout/activity_ptr_list_fragment.xml
* pulltorefresh/sample/res/layout/activity_ptr_list_in_vp.xml
* pulltorefresh/sample/res/layout/activity_ptr_scrollview.xml
* pulltorefresh/sample/res/layout/activity_ptr_viewpager.xml
* pulltorefresh/sample/res/layout/activity_ptr_webview.xml
* pulltorefresh/sample/res/layout/activity_ptr_webview2.xml
* pulltorefresh/sample/res/layout/layout_listview_in_viewpager.xml
* pulltorefresh/sample/res/raw/
* pulltorefresh/sample/res/raw/pull_event.mp3
* pulltorefresh/sample/res/raw/refreshing_sound.mp3
* pulltorefresh/sample/res/raw/reset_sound.mp3
* pulltorefresh/sample/res/values/
* pulltorefresh/sample/res/values/strings.xml
* pulltorefresh/sample/res/values/styles.xml
* pulltorefresh/sample/src/
* pulltorefresh/sample/src/com/
* pulltorefresh/sample/src/com/handmark/
* pulltorefresh/sample/src/com/handmark/pulltorefresh/
* pulltorefresh/sample/src/com/handmark/pulltorefresh/samples/
* pulltorefresh/sample/src/com/handmark/pulltorefresh/samples/LauncherActivity.java
* pulltorefresh/sample/src/com/handmark/pulltorefresh/samples/PullToRefreshExpandableListActivity.java
* pulltorefresh/sample/src/com/handmark/pulltorefresh/samples/PullToRefreshGridActivity.java
* pulltorefresh/sample/src/com/handmark/pulltorefresh/samples/PullToRefreshHorizontalScrollViewActivity.java
* pulltorefresh/sample/src/com/handmark/pulltorefresh/samples/PullToRefreshListActivity.java
* pulltorefresh/sample/src/com/handmark/pulltorefresh/samples/PullToRefreshListFragmentActivity.java
* pulltorefresh/sample/src/com/handmark/pulltorefresh/samples/PullToRefreshListInViewPagerActivity.java
* pulltorefresh/sample/src/com/handmark/pulltorefresh/samples/PullToRefreshScrollViewActivity.java
* pulltorefresh/sample/src/com/handmark/pulltorefresh/samples/PullToRefreshViewPagerActivity.java
* pulltorefresh/sample/src/com/handmark/pulltorefresh/samples/PullToRefreshWebView2Activity.java
* pulltorefresh/sample/src/com/handmark/pulltorefresh/samples/PullToRefreshWebViewActivity.java
* subsonic.keystore
From library:
* .gitignore
* ant.properties
* build.xml
* pom.xml
* proguard-project.txt
From menudrawer:
* build.gradle
From pulltorefresh:
* .git
* .gitignore
* LICENSE
* README.md
* extras/
* extras/PullToRefreshListFragment/
* extras/PullToRefreshListFragment/AndroidManifest.xml
* extras/PullToRefreshListFragment/LICENSE
* extras/PullToRefreshListFragment/libs/
* extras/PullToRefreshListFragment/libs/android-support-v4.jar
* extras/PullToRefreshListFragment/pom.xml
* extras/PullToRefreshListFragment/project.properties
* extras/PullToRefreshListFragment/res/
* extras/PullToRefreshListFragment/res/layout/
* extras/PullToRefreshListFragment/res/layout/need_this_for_maven.xml
* extras/PullToRefreshListFragment/src/
* extras/PullToRefreshListFragment/src/com/
* extras/PullToRefreshListFragment/src/com/handmark/
* extras/PullToRefreshListFragment/src/com/handmark/pulltorefresh/
* extras/PullToRefreshListFragment/src/com/handmark/pulltorefresh/extras/
* extras/PullToRefreshListFragment/src/com/handmark/pulltorefresh/extras/listfragment/
* extras/PullToRefreshListFragment/src/com/handmark/pulltorefresh/extras/listfragment/PullToRefreshBaseListFragment.java
* extras/PullToRefreshListFragment/src/com/handmark/pulltorefresh/extras/listfragment/PullToRefreshExpandableListFragment.java
* extras/PullToRefreshListFragment/src/com/handmark/pulltorefresh/extras/listfragment/PullToRefreshListFragment.java
* extras/PullToRefreshViewPager/
* extras/PullToRefreshViewPager/AndroidManifest.xml
* extras/PullToRefreshViewPager/ant.properties
* extras/PullToRefreshViewPager/libs/
* extras/PullToRefreshViewPager/libs/android-support-v4.jar
* extras/PullToRefreshViewPager/pom.xml
* extras/PullToRefreshViewPager/proguard-project.txt
* extras/PullToRefreshViewPager/project.properties
* extras/PullToRefreshViewPager/res/
* extras/PullToRefreshViewPager/res/layout/
* extras/PullToRefreshViewPager/res/layout/need_this_for_maven.xml
* extras/PullToRefreshViewPager/res/values/
* extras/PullToRefreshViewPager/res/values/ids.xml
* extras/PullToRefreshViewPager/src/
* extras/PullToRefreshViewPager/src/com/
* extras/PullToRefreshViewPager/src/com/handmark/
* extras/PullToRefreshViewPager/src/com/handmark/pulltorefresh/
* extras/PullToRefreshViewPager/src/com/handmark/pulltorefresh/extras/
* extras/PullToRefreshViewPager/src/com/handmark/pulltorefresh/extras/viewpager/
* extras/PullToRefreshViewPager/src/com/handmark/pulltorefresh/extras/viewpager/PullToRefreshViewPager.java
* extras/pom.xml
* header_graphic.png
* library/
* library/AndroidManifest.xml
* library/LICENSE
* library/pom.xml
* library/project.properties
* library/res/
* library/res/anim/
* library/res/anim/slide_in_from_bottom.xml
* library/res/anim/slide_in_from_top.xml
* library/res/anim/slide_out_to_bottom.xml
* library/res/anim/slide_out_to_top.xml
* library/res/drawable-hdpi/
* library/res/drawable-hdpi/default_ptr_flip.png
* library/res/drawable-hdpi/default_ptr_rotate.png
* library/res/drawable-hdpi/indicator_arrow.png
* library/res/drawable-mdpi/
* library/res/drawable-mdpi/default_ptr_flip.png
* library/res/drawable-mdpi/default_ptr_rotate.png
* library/res/drawable-mdpi/indicator_arrow.png
* library/res/drawable-xhdpi/
* library/res/drawable-xhdpi/default_ptr_flip.png
* library/res/drawable-xhdpi/default_ptr_rotate.png
* library/res/drawable-xhdpi/indicator_arrow.png
* library/res/drawable/
* library/res/drawable/indicator_bg_bottom.xml
* library/res/drawable/indicator_bg_top.xml
* library/res/layout/
* library/res/layout/pull_to_refresh_header_horizontal.xml
* library/res/layout/pull_to_refresh_header_vertical.xml
* library/res/values-ar/
* library/res/values-ar/pull_refresh_strings.xml
* library/res/values-cs/
* library/res/values-cs/pull_refresh_strings.xml
* library/res/values-de/
* library/res/values-de/pull_refresh_strings.xml
* library/res/values-es/
* library/res/values-es/pull_refresh_strings.xml
* library/res/values-fi/
* library/res/values-fi/pull_refresh_strings.xml
* library/res/values-fr/
* library/res/values-fr/pull_refresh_strings.xml
* library/res/values-he/
* library/res/values-he/pull_refresh_strings.xml
* library/res/values-it/
* library/res/values-it/pull_refresh_strings.xml
* library/res/values-iw/
* library/res/values-iw/pull_refresh_strings.xml
* library/res/values-ja/
* library/res/values-ja/pull_refresh_strings.xml
* library/res/values-ko/
* library/res/values-ko/pull_refresh_strings.xml
* library/res/values-nl/
* library/res/values-nl/pull_refresh_strings.xml
* library/res/values-pl/
* library/res/values-pl/pull_refresh_strings.xml
* library/res/values-pt-rBR/
* library/res/values-pt-rBR/pull_refresh_strings.xml
* library/res/values-pt/
* library/res/values-pt/pull_refresh_strings.xml
* library/res/values-ro/
* library/res/values-ro/pull_refresh_strings.xml
* library/res/values-ru/
* library/res/values-ru/pull_refresh_strings.xml
* library/res/values-zh/
* library/res/values-zh/pull_refresh_strings.xml
* library/res/values/
* library/res/values/attrs.xml
* library/res/values/dimens.xml
* library/res/values/ids.xml
* library/res/values/pull_refresh_strings.xml
* library/src/
* library/src/com/
* library/src/com/handmark/
* library/src/com/handmark/pulltorefresh/
* library/src/com/handmark/pulltorefresh/library/
* library/src/com/handmark/pulltorefresh/library/ILoadingLayout.java
* library/src/com/handmark/pulltorefresh/library/IPullToRefresh.java
* library/src/com/handmark/pulltorefresh/library/LoadingLayoutProxy.java
* library/src/com/handmark/pulltorefresh/library/OverscrollHelper.java
* library/src/com/handmark/pulltorefresh/library/PullToRefreshAdapterViewBase.java
* library/src/com/handmark/pulltorefresh/library/PullToRefreshBase.java
* library/src/com/handmark/pulltorefresh/library/PullToRefreshExpandableListView.java
* library/src/com/handmark/pulltorefresh/library/PullToRefreshGridView.java
* library/src/com/handmark/pulltorefresh/library/PullToRefreshHorizontalScrollView.java
* library/src/com/handmark/pulltorefresh/library/PullToRefreshListView.java
* library/src/com/handmark/pulltorefresh/library/PullToRefreshScrollView.java
* library/src/com/handmark/pulltorefresh/library/PullToRefreshWebView.java
* library/src/com/handmark/pulltorefresh/library/extras/
* library/src/com/handmark/pulltorefresh/library/extras/PullToRefreshWebView2.java
* library/src/com/handmark/pulltorefresh/library/extras/SoundPullEventListener.java
* library/src/com/handmark/pulltorefresh/library/internal/
* library/src/com/handmark/pulltorefresh/library/internal/EmptyViewMethodAccessor.java
* library/src/com/handmark/pulltorefresh/library/internal/FlipLoadingLayout.java
* library/src/com/handmark/pulltorefresh/library/internal/IndicatorLayout.java
* library/src/com/handmark/pulltorefresh/library/internal/LoadingLayout.java
* library/src/com/handmark/pulltorefresh/library/internal/RotateLoadingLayout.java
* library/src/com/handmark/pulltorefresh/library/internal/Utils.java
* library/src/com/handmark/pulltorefresh/library/internal/ViewCompat.java
* pom.xml
* sample/
* sample/AndroidManifest.xml
* sample/LICENSE
* sample/assets/
* sample/assets/ptr_webview2_sample.html
* sample/libs/
* sample/libs/android-support-v4.jar
* sample/pom.xml
* sample/project.properties
* sample/res/
* sample/res/drawable-hdpi/
* sample/res/drawable-hdpi/android.png
* sample/res/drawable-hdpi/icon.png
* sample/res/drawable-ldpi/
* sample/res/drawable-ldpi/icon.png
* sample/res/drawable-mdpi/
* sample/res/drawable-mdpi/icon.png
* sample/res/drawable-nodpi/
* sample/res/drawable-nodpi/wallpaper.jpg
* sample/res/drawable-xhdpi/
* sample/res/drawable-xhdpi/android.png
* sample/res/drawable/
* sample/res/drawable/icon.png
* sample/res/layout/
* sample/res/layout/activity_ptr_expandable_list.xml
* sample/res/layout/activity_ptr_grid.xml
* sample/res/layout/activity_ptr_horizontalscrollview.xml
* sample/res/layout/activity_ptr_list.xml
* sample/res/layout/activity_ptr_list_fragment.xml
* sample/res/layout/activity_ptr_list_in_vp.xml
* sample/res/layout/activity_ptr_scrollview.xml
* sample/res/layout/activity_ptr_viewpager.xml
* sample/res/layout/activity_ptr_webview.xml
* sample/res/layout/activity_ptr_webview2.xml
* sample/res/layout/layout_listview_in_viewpager.xml
* sample/res/raw/
* sample/res/raw/pull_event.mp3
* sample/res/raw/refreshing_sound.mp3
* sample/res/raw/reset_sound.mp3
* sample/res/values/
* sample/res/values/strings.xml
* sample/res/values/styles.xml
* sample/src/
* sample/src/com/
* sample/src/com/handmark/
* sample/src/com/handmark/pulltorefresh/
* sample/src/com/handmark/pulltorefresh/samples/
* sample/src/com/handmark/pulltorefresh/samples/LauncherActivity.java
* sample/src/com/handmark/pulltorefresh/samples/PullToRefreshExpandableListActivity.java
* sample/src/com/handmark/pulltorefresh/samples/PullToRefreshGridActivity.java
* sample/src/com/handmark/pulltorefresh/samples/PullToRefreshHorizontalScrollViewActivity.java
* sample/src/com/handmark/pulltorefresh/samples/PullToRefreshListActivity.java
* sample/src/com/handmark/pulltorefresh/samples/PullToRefreshListFragmentActivity.java
* sample/src/com/handmark/pulltorefresh/samples/PullToRefreshListInViewPagerActivity.java
* sample/src/com/handmark/pulltorefresh/samples/PullToRefreshScrollViewActivity.java
* sample/src/com/handmark/pulltorefresh/samples/PullToRefreshViewPagerActivity.java
* sample/src/com/handmark/pulltorefresh/samples/PullToRefreshWebView2Activity.java
* sample/src/com/handmark/pulltorefresh/samples/PullToRefreshWebViewActivity.java
Replaced Jars with Dependencies:
--------------------------------
The importer recognized the following .jar files as third party
libraries and replaced them with Gradle dependencies instead. This has
the advantage that more explicit version information is known, and the
libraries can be updated automatically. However, it is possible that
the .jar file in your project was of an older version than the
dependency we picked, which could render the project not compileable.
You can disable the jar replacement in the import wizard and try again:
android-support-v4.jar => com.android.support:support-v4:18.0.0
Moved Files:
------------
Android Gradle projects use a different directory structure than ADT
Eclipse projects. Here's how the projects were restructured:
In library:
* AndroidManifest.xml => library/src/main/AndroidManifest.xml
* res/ => library/src/main/res/
* src/ => library/src/main/java/
In menudrawer:
* AndroidManifest.xml => menudrawer/src/main/AndroidManifest.xml
* res/ => menudrawer/src/main/res/
* src/ => menudrawer/src/main/java/
In UltraSonic:
* AndroidManifest.xml => ultraSonic/src/main/AndroidManifest.xml
* assets/ => ultraSonic/src/main/assets/
* lint.xml => ultraSonic/lint.xml
* res/ => ultraSonic/src/main/res/
* src/ => ultraSonic/src/main/java/
Next Steps:
-----------
You can now build the project. The Gradle project needs network
connectivity to download dependencies.
Bugs:
-----
If for some reason your project does not build, and you determine that
it is due to a bug or limitation of the Eclipse to Gradle importer,
please file a bug at http://b.android.com with category
Component-Tools.
(This import summary is for your information only, and can be deleted
after import once you are satisfied with the results.)

22
library/build.gradle Normal file
View File

@ -0,0 +1,22 @@
apply plugin: 'com.android.library'
android {
compileSdkVersion 22
buildToolsVersion "22.0.1"
defaultConfig {
minSdkVersion 7
targetSdkVersion 22
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
}
dependencies {
compile 'com.android.support:support-v4:18.0.0'
}

92
library/library.iml Normal file
View File

@ -0,0 +1,92 @@
<?xml version="1.0" encoding="UTF-8"?>
<module external.linked.project.id=":library" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$/.." external.system.id="GRADLE" external.system.module.group="UltrasSonic" external.system.module.version="unspecified" type="JAVA_MODULE" version="4">
<component name="FacetManager">
<facet type="android-gradle" name="Android-Gradle">
<configuration>
<option name="GRADLE_PROJECT_PATH" value=":library" />
</configuration>
</facet>
<facet type="android" name="Android">
<configuration>
<option name="SELECTED_BUILD_VARIANT" value="debug" />
<option name="SELECTED_TEST_ARTIFACT" value="_android_test_" />
<option name="ASSEMBLE_TASK_NAME" value="assembleDebug" />
<option name="COMPILE_JAVA_TASK_NAME" value="compileDebugSources" />
<option name="SOURCE_GEN_TASK_NAME" value="generateDebugSources" />
<option name="ASSEMBLE_TEST_TASK_NAME" value="assembleDebugAndroidTest" />
<option name="COMPILE_JAVA_TEST_TASK_NAME" value="compileDebugAndroidTestSources" />
<option name="TEST_SOURCE_GEN_TASK_NAME" value="generateDebugAndroidTestSources" />
<option name="ALLOW_USER_CONFIGURATION" value="false" />
<option name="MANIFEST_FILE_RELATIVE_PATH" value="/src/main/AndroidManifest.xml" />
<option name="RES_FOLDER_RELATIVE_PATH" value="/src/main/res" />
<option name="RES_FOLDERS_RELATIVE_PATH" value="file://$MODULE_DIR$/src/main/res" />
<option name="ASSETS_FOLDER_RELATIVE_PATH" value="/src/main/assets" />
<option name="LIBRARY_PROJECT" value="true" />
</configuration>
</facet>
</component>
<component name="NewModuleRootManager" inherit-compiler-output="false">
<output url="file://$MODULE_DIR$/build/intermediates/classes/debug" />
<output-test url="file://$MODULE_DIR$/build/intermediates/classes/androidTest/debug" />
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/r/debug" isTestSource="false" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/aidl/debug" isTestSource="false" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/buildConfig/debug" isTestSource="false" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/rs/debug" isTestSource="false" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/rs/debug" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/generated/debug" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/r/androidTest/debug" isTestSource="true" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/aidl/androidTest/debug" isTestSource="true" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/buildConfig/androidTest/debug" isTestSource="true" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/rs/androidTest/debug" isTestSource="true" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/rs/androidTest/debug" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/generated/androidTest/debug" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/res" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/resources" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/assets" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/aidl" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/jni" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/rs" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/res" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/main/assets" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/main/aidl" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/jni" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/rs" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/res" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/resources" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/assets" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/aidl" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/jni" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/rs" isTestSource="true" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/assets" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/bundles" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/classes" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/coverage-instrumented-classes" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/dependency-cache" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/dex" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/dex-cache" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/jacoco" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/javaResources" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/libs" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/lint" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/manifests" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/ndk" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/pre-dexed" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/proguard" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/res" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/rs" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/symbols" />
<excludeFolder url="file://$MODULE_DIR$/build/outputs" />
<excludeFolder url="file://$MODULE_DIR$/build/tmp" />
</content>
<orderEntry type="jdk" jdkName="Android API 22 Platform" jdkType="Android SDK" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" exported="" name="support-v4-18.0.0" level="project" />
</component>
</module>

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.mobeta.android.dslv"
android:versionCode="4"
android:versionName="0.6.1">
<uses-sdk android:targetSdkVersion="7"
android:minSdkVersion="7" />
</manifest>

View File

@ -0,0 +1,468 @@
package com.mobeta.android.dslv;
import android.graphics.Point;
import android.view.GestureDetector;
import android.view.HapticFeedbackConstants;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewConfiguration;
import android.widget.AdapterView;
/**
* Class that starts and stops item drags on a {@link DragSortListView}
* based on touch gestures. This class also inherits from
* {@link SimpleFloatViewManager}, which provides basic float View
* creation.
*
* An instance of this class is meant to be passed to the methods
* {@link DragSortListView#setTouchListener()} and
* {@link DragSortListView#setFloatViewManager()} of your
* {@link DragSortListView} instance.
*/
public class DragSortController extends SimpleFloatViewManager implements View.OnTouchListener, GestureDetector.OnGestureListener {
/**
* Drag init mode enum.
*/
public static final int ON_DOWN = 0;
public static final int ON_DRAG = 1;
public static final int ON_LONG_PRESS = 2;
private int mDragInitMode = ON_DOWN;
private boolean mSortEnabled = true;
/**
* Remove mode enum.
*/
public static final int CLICK_REMOVE = 0;
public static final int FLING_REMOVE = 1;
/**
* The current remove mode.
*/
private int mRemoveMode;
private boolean mRemoveEnabled = false;
private boolean mIsRemoving = false;
private GestureDetector mDetector;
private GestureDetector mFlingRemoveDetector;
private int mTouchSlop;
public static final int MISS = -1;
private int mHitPos = MISS;
private int mFlingHitPos = MISS;
private int mClickRemoveHitPos = MISS;
private int[] mTempLoc = new int[2];
private int mItemX;
private int mItemY;
private int mCurrX;
private int mCurrY;
private boolean mDragging = false;
private float mFlingSpeed = 500f;
private int mDragHandleId;
private int mClickRemoveId;
private int mFlingHandleId;
private boolean mCanDrag;
private DragSortListView mDslv;
private int mPositionX;
/**
* Calls {@link #DragSortController(DragSortListView, int)} with a
* 0 drag handle id, FLING_RIGHT_REMOVE remove mode,
* and ON_DOWN drag init. By default, sorting is enabled, and
* removal is disabled.
*
* @param dslv The DSLV instance
*/
public DragSortController(DragSortListView dslv) {
this(dslv, 0, ON_DOWN, FLING_REMOVE);
}
public DragSortController(DragSortListView dslv, int dragHandleId, int dragInitMode, int removeMode) {
this(dslv, dragHandleId, dragInitMode, removeMode, 0);
}
public DragSortController(DragSortListView dslv, int dragHandleId, int dragInitMode, int removeMode, int clickRemoveId) {
this(dslv, dragHandleId, dragInitMode, removeMode, clickRemoveId, 0);
}
/**
* By default, sorting is enabled, and removal is disabled.
*
* @param dslv The DSLV instance
* @param dragHandleId The resource id of the View that represents
* the drag handle in a list item.
*/
public DragSortController(DragSortListView dslv, int dragHandleId, int dragInitMode,
int removeMode, int clickRemoveId, int flingHandleId) {
super(dslv);
mDslv = dslv;
mDetector = new GestureDetector(dslv.getContext(), this);
mFlingRemoveDetector = new GestureDetector(dslv.getContext(), mFlingRemoveListener);
mFlingRemoveDetector.setIsLongpressEnabled(false);
mTouchSlop = ViewConfiguration.get(dslv.getContext()).getScaledTouchSlop();
mDragHandleId = dragHandleId;
mClickRemoveId = clickRemoveId;
mFlingHandleId = flingHandleId;
setRemoveMode(removeMode);
setDragInitMode(dragInitMode);
}
public int getDragInitMode() {
return mDragInitMode;
}
/**
* Set how a drag is initiated. Needs to be one of
* {@link ON_DOWN}, {@link ON_DRAG}, or {@link ON_LONG_PRESS}.
*
* @param mode The drag init mode.
*/
public void setDragInitMode(int mode) {
mDragInitMode = mode;
}
/**
* Enable/Disable list item sorting. Disabling is useful if only item
* removal is desired. Prevents drags in the vertical direction.
*
* @param enabled Set <code>true</code> to enable list
* item sorting.
*/
public void setSortEnabled(boolean enabled) {
mSortEnabled = enabled;
}
public boolean isSortEnabled() {
return mSortEnabled;
}
/**
* One of {@link CLICK_REMOVE}, {@link FLING_RIGHT_REMOVE},
* {@link FLING_LEFT_REMOVE},
* {@link SLIDE_RIGHT_REMOVE}, or {@link SLIDE_LEFT_REMOVE}.
*/
public void setRemoveMode(int mode) {
mRemoveMode = mode;
}
public int getRemoveMode() {
return mRemoveMode;
}
/**
* Enable/Disable item removal without affecting remove mode.
*/
public void setRemoveEnabled(boolean enabled) {
mRemoveEnabled = enabled;
}
public boolean isRemoveEnabled() {
return mRemoveEnabled;
}
/**
* Set the resource id for the View that represents the drag
* handle in a list item.
*
* @param id An android resource id.
*/
public void setDragHandleId(int id) {
mDragHandleId = id;
}
/**
* Set the resource id for the View that represents the fling
* handle in a list item.
*
* @param id An android resource id.
*/
public void setFlingHandleId(int id) {
mFlingHandleId = id;
}
/**
* Set the resource id for the View that represents click
* removal button.
*
* @param id An android resource id.
*/
public void setClickRemoveId(int id) {
mClickRemoveId = id;
}
/**
* Sets flags to restrict certain motions of the floating View
* based on DragSortController settings (such as remove mode).
* Starts the drag on the DragSortListView.
*
* @param position The list item position (includes headers).
* @param deltaX Touch x-coord minus left edge of floating View.
* @param deltaY Touch y-coord minus top edge of floating View.
*
* @return True if drag started, false otherwise.
*/
public boolean startDrag(int position, int deltaX, int deltaY) {
int dragFlags = 0;
if (mSortEnabled && !mIsRemoving) {
dragFlags |= DragSortListView.DRAG_POS_Y | DragSortListView.DRAG_NEG_Y;
}
if (mRemoveEnabled && mIsRemoving) {
dragFlags |= DragSortListView.DRAG_POS_X;
dragFlags |= DragSortListView.DRAG_NEG_X;
}
mDragging = mDslv.startDrag(position - mDslv.getHeaderViewsCount(), dragFlags, deltaX,
deltaY);
return mDragging;
}
@Override
public boolean onTouch(View v, MotionEvent ev) {
if (!mDslv.isDragEnabled() || mDslv.listViewIntercepted()) {
return false;
}
mDetector.onTouchEvent(ev);
if (mRemoveEnabled && mDragging && mRemoveMode == FLING_REMOVE) {
mFlingRemoveDetector.onTouchEvent(ev);
}
int action = ev.getAction() & MotionEvent.ACTION_MASK;
switch (action) {
case MotionEvent.ACTION_DOWN:
mCurrX = (int) ev.getX();
mCurrY = (int) ev.getY();
break;
case MotionEvent.ACTION_UP:
if (mRemoveEnabled && mIsRemoving) {
int x = mPositionX >= 0 ? mPositionX : -mPositionX;
int removePoint = mDslv.getWidth() / 2;
if (x > removePoint) {
mDslv.stopDragWithVelocity(true, 0);
}
}
case MotionEvent.ACTION_CANCEL:
mIsRemoving = false;
mDragging = false;
break;
}
return false;
}
/**
* Overrides to provide fading when slide removal is enabled.
*/
@Override
public void onDragFloatView(View floatView, Point position, Point touch) {
if (mRemoveEnabled && mIsRemoving) {
mPositionX = position.x;
}
}
/**
* Get the position to start dragging based on the ACTION_DOWN
* MotionEvent. This function simply calls
* {@link #dragHandleHitPosition(MotionEvent)}. Override
* to change drag handle behavior;
* this function is called internally when an ACTION_DOWN
* event is detected.
*
* @param ev The ACTION_DOWN MotionEvent.
*
* @return The list position to drag if a drag-init gesture is
* detected; MISS if unsuccessful.
*/
public int startDragPosition(MotionEvent ev) {
return dragHandleHitPosition(ev);
}
public int startFlingPosition(MotionEvent ev) {
return mRemoveMode == FLING_REMOVE ? flingHandleHitPosition(ev) : MISS;
}
/**
* Checks for the touch of an item's drag handle (specified by
* {@link #setDragHandleId(int)}), and returns that item's position
* if a drag handle touch was detected.
*
* @param ev The ACTION_DOWN MotionEvent.
* @return The list position of the item whose drag handle was
* touched; MISS if unsuccessful.
*/
public int dragHandleHitPosition(MotionEvent ev) {
return viewIdHitPosition(ev, mDragHandleId);
}
public int flingHandleHitPosition(MotionEvent ev) {
return viewIdHitPosition(ev, mFlingHandleId);
}
public int viewIdHitPosition(MotionEvent ev, int id) {
final int x = (int) ev.getX();
final int y = (int) ev.getY();
int touchPos = mDslv.pointToPosition(x, y); // includes headers/footers
final int numHeaders = mDslv.getHeaderViewsCount();
final int numFooters = mDslv.getFooterViewsCount();
final int count = mDslv.getCount();
// Log.d("mobeta", "touch down on position " + itemnum);
// We're only interested if the touch was on an
// item that's not a header or footer.
if (touchPos != AdapterView.INVALID_POSITION && touchPos >= numHeaders
&& touchPos < (count - numFooters)) {
final View item = mDslv.getChildAt(touchPos - mDslv.getFirstVisiblePosition());
final int rawX = (int) ev.getRawX();
final int rawY = (int) ev.getRawY();
View dragBox = id == 0 ? item : (View) item.findViewById(id);
if (dragBox != null) {
dragBox.getLocationOnScreen(mTempLoc);
if (rawX > mTempLoc[0] && rawY > mTempLoc[1] &&
rawX < mTempLoc[0] + dragBox.getWidth() &&
rawY < mTempLoc[1] + dragBox.getHeight()) {
mItemX = item.getLeft();
mItemY = item.getTop();
return touchPos;
}
}
}
return MISS;
}
@Override
public boolean onDown(MotionEvent ev) {
if (mRemoveEnabled && mRemoveMode == CLICK_REMOVE) {
mClickRemoveHitPos = viewIdHitPosition(ev, mClickRemoveId);
}
mHitPos = startDragPosition(ev);
if (mHitPos != MISS && mDragInitMode == ON_DOWN) {
startDrag(mHitPos, (int) ev.getX() - mItemX, (int) ev.getY() - mItemY);
}
mIsRemoving = false;
mCanDrag = true;
mPositionX = 0;
mFlingHitPos = startFlingPosition(ev);
return true;
}
@Override
public boolean onScroll(MotionEvent e1, MotionEvent e2, float distanceX, float distanceY) {
final int x1 = (int) e1.getX();
final int y1 = (int) e1.getY();
final int x2 = (int) e2.getX();
final int y2 = (int) e2.getY();
final int deltaX = x2 - mItemX;
final int deltaY = y2 - mItemY;
if (mCanDrag && !mDragging && (mHitPos != MISS || mFlingHitPos != MISS)) {
if (mHitPos != MISS) {
if (mDragInitMode == ON_DRAG && Math.abs(y2 - y1) > mTouchSlop && mSortEnabled) {
startDrag(mHitPos, deltaX, deltaY);
}
else if (mDragInitMode != ON_DOWN && Math.abs(x2 - x1) > mTouchSlop && mRemoveEnabled)
{
mIsRemoving = true;
startDrag(mFlingHitPos, deltaX, deltaY);
}
} else if (mFlingHitPos != MISS) {
if (Math.abs(x2 - x1) > mTouchSlop && mRemoveEnabled) {
mIsRemoving = true;
startDrag(mFlingHitPos, deltaX, deltaY);
} else if (Math.abs(y2 - y1) > mTouchSlop) {
mCanDrag = false; // if started to scroll the list then
// don't allow sorting nor fling-removing
}
}
}
// return whatever
return false;
}
@Override
public void onLongPress(MotionEvent e) {
// Log.d("mobeta", "lift listener long pressed");
if (mHitPos != MISS && mDragInitMode == ON_LONG_PRESS) {
mDslv.performHapticFeedback(HapticFeedbackConstants.LONG_PRESS);
startDrag(mHitPos, mCurrX - mItemX, mCurrY - mItemY);
}
}
// complete the OnGestureListener interface
@Override
public final boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX, float velocityY) {
return false;
}
// complete the OnGestureListener interface
@Override
public boolean onSingleTapUp(MotionEvent ev) {
if (mRemoveEnabled && mRemoveMode == CLICK_REMOVE) {
if (mClickRemoveHitPos != MISS) {
mDslv.removeItem(mClickRemoveHitPos - mDslv.getHeaderViewsCount());
}
}
return true;
}
// complete the OnGestureListener interface
@Override
public void onShowPress(MotionEvent ev) {
// do nothing
}
private GestureDetector.OnGestureListener mFlingRemoveListener =
new GestureDetector.SimpleOnGestureListener() {
@Override
public final boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX,
float velocityY) {
// Log.d("mobeta", "on fling remove called");
if (mRemoveEnabled && mIsRemoving) {
int w = mDslv.getWidth();
int minPos = w / 5;
if (velocityX > mFlingSpeed) {
if (mPositionX > -minPos) {
mDslv.stopDragWithVelocity(true, velocityX);
}
} else if (velocityX < -mFlingSpeed) {
if (mPositionX < minPos) {
mDslv.stopDragWithVelocity(true, velocityX);
}
}
mIsRemoving = false;
}
return false;
}
};
}

View File

@ -0,0 +1,241 @@
package com.mobeta.android.dslv;
import java.util.ArrayList;
import android.content.Context;
import android.database.Cursor;
import android.util.SparseIntArray;
import android.view.View;
import android.view.ViewGroup;
import android.support.v4.widget.CursorAdapter;
/**
* A subclass of {@link android.widget.CursorAdapter} that provides
* reordering of the elements in the Cursor based on completed
* drag-sort operations. The reordering is a simple mapping of
* list positions into Cursor positions (the Cursor is unchanged).
* To persist changes made by drag-sorts, one can retrieve the
* mapping with the {@link #getCursorPositions()} method, which
* returns the reordered list of Cursor positions.
*
* An instance of this class is passed
* to {@link DragSortListView#setAdapter(ListAdapter)} and, since
* this class implements the {@link DragSortListView.DragSortListener}
* interface, it is automatically set as the DragSortListener for
* the DragSortListView instance.
*/
public abstract class DragSortCursorAdapter extends CursorAdapter implements DragSortListView.DragSortListener {
public static final int REMOVED = -1;
/**
* Key is ListView position, value is Cursor position
*/
private SparseIntArray mListMapping = new SparseIntArray();
private ArrayList<Integer> mRemovedCursorPositions = new ArrayList<Integer>();
public DragSortCursorAdapter(Context context, Cursor c) {
super(context, c);
}
public DragSortCursorAdapter(Context context, Cursor c, boolean autoRequery) {
super(context, c, autoRequery);
}
public DragSortCursorAdapter(Context context, Cursor c, int flags) {
super(context, c, flags);
}
/**
* Swaps Cursor and clears list-Cursor mapping.
*
* @see android.widget.CursorAdapter#swapCursor(android.database.Cursor)
*/
@Override
public Cursor swapCursor(Cursor newCursor) {
Cursor old = super.swapCursor(newCursor);
resetMappings();
return old;
}
/**
* Changes Cursor and clears list-Cursor mapping.
*
* @see android.widget.CursorAdapter#changeCursor(android.database.Cursor)
*/
@Override
public void changeCursor(Cursor cursor) {
super.changeCursor(cursor);
resetMappings();
}
/**
* Resets list-cursor mapping.
*/
public void reset() {
resetMappings();
notifyDataSetChanged();
}
private void resetMappings() {
mListMapping.clear();
mRemovedCursorPositions.clear();
}
@Override
public Object getItem(int position) {
return super.getItem(mListMapping.get(position, position));
}
@Override
public long getItemId(int position) {
return super.getItemId(mListMapping.get(position, position));
}
@Override
public View getDropDownView(int position, View convertView, ViewGroup parent) {
return super.getDropDownView(mListMapping.get(position, position), convertView, parent);
}
@Override
public View getView(int position, View convertView, ViewGroup parent) {
return super.getView(mListMapping.get(position, position), convertView, parent);
}
/**
* On drop, this updates the mapping between Cursor positions
* and ListView positions. The Cursor is unchanged. Retrieve
* the current mapping with {@link getCursorPositions()}.
*
* @see DragSortListView.DropListener#drop(int, int)
*/
@Override
public void drop(int from, int to) {
if (from != to) {
int cursorFrom = mListMapping.get(from, from);
if (from > to) {
for (int i = from; i > to; --i) {
mListMapping.put(i, mListMapping.get(i - 1, i - 1));
}
} else {
for (int i = from; i < to; ++i) {
mListMapping.put(i, mListMapping.get(i + 1, i + 1));
}
}
mListMapping.put(to, cursorFrom);
cleanMapping();
notifyDataSetChanged();
}
}
/**
* On remove, this updates the mapping between Cursor positions
* and ListView positions. The Cursor is unchanged. Retrieve
* the current mapping with {@link getCursorPositions()}.
*
* @see DragSortListView.RemoveListener#remove(int)
*/
@Override
public void remove(int which) {
int cursorPos = mListMapping.get(which, which);
if (!mRemovedCursorPositions.contains(cursorPos)) {
mRemovedCursorPositions.add(cursorPos);
}
int newCount = getCount();
for (int i = which; i < newCount; ++i) {
mListMapping.put(i, mListMapping.get(i + 1, i + 1));
}
mListMapping.delete(newCount);
cleanMapping();
notifyDataSetChanged();
}
/**
* Does nothing. Just completes DragSortListener interface.
*/
@Override
public void drag(int from, int to) {
// do nothing
}
/**
* Remove unnecessary mappings from sparse array.
*/
private void cleanMapping() {
ArrayList<Integer> toRemove = new ArrayList<Integer>();
int size = mListMapping.size();
for (int i = 0; i < size; ++i) {
if (mListMapping.keyAt(i) == mListMapping.valueAt(i)) {
toRemove.add(mListMapping.keyAt(i));
}
}
size = toRemove.size();
for (int i = 0; i < size; ++i) {
mListMapping.delete(toRemove.get(i));
}
}
@Override
public int getCount() {
return super.getCount() - mRemovedCursorPositions.size();
}
/**
* Get the Cursor position mapped to by the provided list position
* (given all previously handled drag-sort
* operations).
*
* @param position List position
*
* @return The mapped-to Cursor position
*/
public int getCursorPosition(int position) {
return mListMapping.get(position, position);
}
/**
* Get the current order of Cursor positions presented by the
* list.
*/
public ArrayList<Integer> getCursorPositions() {
ArrayList<Integer> result = new ArrayList<Integer>();
for (int i = 0; i < getCount(); ++i) {
result.add(mListMapping.get(i, i));
}
return result;
}
/**
* Get the list position mapped to by the provided Cursor position.
* If the provided Cursor position has been removed by a drag-sort,
* this returns {@link #REMOVED}.
*
* @param cursorPosition A Cursor position
* @return The mapped-to list position or REMOVED
*/
public int getListPosition(int cursorPosition) {
if (mRemovedCursorPositions.contains(cursorPosition)) {
return REMOVED;
}
int index = mListMapping.indexOfValue(cursorPosition);
if (index < 0) {
return cursorPosition;
} else {
return mListMapping.keyAt(index);
}
}
}

View File

@ -0,0 +1,100 @@
package com.mobeta.android.dslv;
import android.content.Context;
import android.view.Gravity;
import android.view.View;
import android.view.View.MeasureSpec;
import android.view.ViewGroup;
import android.widget.AbsListView;
import android.util.Log;
/**
* Lightweight ViewGroup that wraps list items obtained from user's
* ListAdapter. ItemView expects a single child that has a definite
* height (i.e. the child's layout height is not MATCH_PARENT).
* The width of
* ItemView will always match the width of its child (that is,
* the width MeasureSpec given to ItemView is passed directly
* to the child, and the ItemView measured width is set to the
* child's measured width). The height of ItemView can be anything;
* the
*
*
* The purpose of this class is to optimize slide
* shuffle animations.
*/
public class DragSortItemView extends ViewGroup {
private int mGravity = Gravity.TOP;
public DragSortItemView(Context context) {
super(context);
// always init with standard ListView layout params
setLayoutParams(new AbsListView.LayoutParams(
ViewGroup.LayoutParams.FILL_PARENT,
ViewGroup.LayoutParams.WRAP_CONTENT));
//setClipChildren(true);
}
public void setGravity(int gravity) {
mGravity = gravity;
}
public int getGravity() {
return mGravity;
}
@Override
protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
final View child = getChildAt(0);
if (child == null) {
return;
}
if (mGravity == Gravity.TOP) {
child.layout(0, 0, getMeasuredWidth(), child.getMeasuredHeight());
} else {
child.layout(0, getMeasuredHeight() - child.getMeasuredHeight(), getMeasuredWidth(), getMeasuredHeight());
}
}
/**
*
*/
@Override
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
int height = MeasureSpec.getSize(heightMeasureSpec);
int width = MeasureSpec.getSize(widthMeasureSpec);
int heightMode = MeasureSpec.getMode(heightMeasureSpec);
final View child = getChildAt(0);
if (child == null) {
setMeasuredDimension(0, width);
return;
}
if (child.isLayoutRequested()) {
// Always let child be as tall as it wants.
measureChild(child, widthMeasureSpec,
MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED));
}
if (heightMode == MeasureSpec.UNSPECIFIED) {
ViewGroup.LayoutParams lp = getLayoutParams();
if (lp.height > 0) {
height = lp.height;
} else {
height = child.getMeasuredHeight();
}
}
setMeasuredDimension(width, height);
}
}

View File

@ -0,0 +1,55 @@
package com.mobeta.android.dslv;
import android.content.Context;
import android.view.Gravity;
import android.view.View;
import android.view.View.MeasureSpec;
import android.view.ViewGroup;
import android.widget.AbsListView;
import android.widget.Checkable;
import android.util.Log;
/**
* Lightweight ViewGroup that wraps list items obtained from user's
* ListAdapter. ItemView expects a single child that has a definite
* height (i.e. the child's layout height is not MATCH_PARENT).
* The width of
* ItemView will always match the width of its child (that is,
* the width MeasureSpec given to ItemView is passed directly
* to the child, and the ItemView measured width is set to the
* child's measured width). The height of ItemView can be anything;
* the
*
*
* The purpose of this class is to optimize slide
* shuffle animations.
*/
public class DragSortItemViewCheckable extends DragSortItemView implements Checkable {
public DragSortItemViewCheckable(Context context) {
super(context);
}
@Override
public boolean isChecked() {
View child = getChildAt(0);
if (child instanceof Checkable)
return ((Checkable) child).isChecked();
else
return false;
}
@Override
public void setChecked(boolean checked) {
View child = getChildAt(0);
if (child instanceof Checkable)
((Checkable) child).setChecked(checked);
}
@Override
public void toggle() {
View child = getChildAt(0);
if (child instanceof Checkable)
((Checkable) child).toggle();
}
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,133 @@
/*
* Copyright (C) 2011 The Android Open Source Project
*
* 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.
*/
package com.mobeta.android.dslv;
import android.content.Context;
import android.database.Cursor;
import android.view.View;
import android.view.ViewGroup;
import android.view.LayoutInflater;
// taken from v4 rev. 10 ResourceCursorAdapter.java
/**
* Static library support version of the framework's {@link android.widget.ResourceCursorAdapter}.
* Used to write apps that run on platforms prior to Android 3.0. When running
* on Android 3.0 or above, this implementation is still used; it does not try
* to switch to the framework's implementation. See the framework SDK
* documentation for a class overview.
*/
public abstract class ResourceDragSortCursorAdapter extends DragSortCursorAdapter {
private int mLayout;
private int mDropDownLayout;
private LayoutInflater mInflater;
/**
* Constructor the enables auto-requery.
*
* @deprecated This option is discouraged, as it results in Cursor queries
* being performed on the application's UI thread and thus can cause poor
* responsiveness or even Application Not Responding errors. As an alternative,
* use {@link android.app.LoaderManager} with a {@link android.content.CursorLoader}.
*
* @param context The context where the ListView associated with this adapter is running
* @param layout resource identifier of a layout file that defines the views
* for this list item. Unless you override them later, this will
* define both the item views and the drop down views.
*/
@Deprecated
public ResourceDragSortCursorAdapter(Context context, int layout, Cursor c) {
super(context, c);
mLayout = mDropDownLayout = layout;
mInflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
}
/**
* Constructor with default behavior as per
* {@link CursorAdapter#CursorAdapter(Context, Cursor, boolean)}; it is recommended
* you not use this, but instead {@link #ResourceCursorAdapter(Context, int, Cursor, int)}.
* When using this constructor, {@link #FLAG_REGISTER_CONTENT_OBSERVER}
* will always be set.
*
* @param context The context where the ListView associated with this adapter is running
* @param layout resource identifier of a layout file that defines the views
* for this list item. Unless you override them later, this will
* define both the item views and the drop down views.
* @param c The cursor from which to get the data.
* @param autoRequery If true the adapter will call requery() on the
* cursor whenever it changes so the most recent
* data is always displayed. Using true here is discouraged.
*/
public ResourceDragSortCursorAdapter(Context context, int layout, Cursor c, boolean autoRequery) {
super(context, c, autoRequery);
mLayout = mDropDownLayout = layout;
mInflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
}
/**
* Standard constructor.
*
* @param context The context where the ListView associated with this adapter is running
* @param layout Resource identifier of a layout file that defines the views
* for this list item. Unless you override them later, this will
* define both the item views and the drop down views.
* @param c The cursor from which to get the data.
* @param flags Flags used to determine the behavior of the adapter,
* as per {@link CursorAdapter#CursorAdapter(Context, Cursor, int)}.
*/
public ResourceDragSortCursorAdapter(Context context, int layout, Cursor c, int flags) {
super(context, c, flags);
mLayout = mDropDownLayout = layout;
mInflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
}
/**
* Inflates view(s) from the specified XML file.
*
* @see android.widget.CursorAdapter#newView(android.content.Context,
* android.database.Cursor, ViewGroup)
*/
@Override
public View newView(Context context, Cursor cursor, ViewGroup parent) {
return mInflater.inflate(mLayout, parent, false);
}
@Override
public View newDropDownView(Context context, Cursor cursor, ViewGroup parent) {
return mInflater.inflate(mDropDownLayout, parent, false);
}
/**
* <p>Sets the layout resource of the item views.</p>
*
* @param layout the layout resources used to create item views
*/
public void setViewResource(int layout) {
mLayout = layout;
}
/**
* <p>Sets the layout resource of the drop down views.</p>
*
* @param dropDownLayout the layout resources used to create drop down views
*/
public void setDropDownViewResource(int dropDownLayout) {
mDropDownLayout = dropDownLayout;
}
}

View File

@ -0,0 +1,422 @@
/*
* Copyright (C) 2006 The Android Open Source Project
*
* 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.
*/
package com.mobeta.android.dslv;
import android.content.Context;
import android.database.Cursor;
import android.net.Uri;
import android.view.View;
import android.widget.TextView;
import android.widget.ImageView;
// taken from sdk/sources/android-16/android/widget/SimpleCursorAdapter.java
/**
* An easy adapter to map columns from a cursor to TextViews or ImageViews
* defined in an XML file. You can specify which columns you want, which
* views you want to display the columns, and the XML file that defines
* the appearance of these views.
*
* Binding occurs in two phases. First, if a
* {@link android.widget.SimpleCursorAdapter.ViewBinder} is available,
* {@link ViewBinder#setViewValue(android.view.View, android.database.Cursor, int)}
* is invoked. If the returned value is true, binding has occured. If the
* returned value is false and the view to bind is a TextView,
* {@link #setViewText(TextView, String)} is invoked. If the returned value
* is false and the view to bind is an ImageView,
* {@link #setViewImage(ImageView, String)} is invoked. If no appropriate
* binding can be found, an {@link IllegalStateException} is thrown.
*
* If this adapter is used with filtering, for instance in an
* {@link android.widget.AutoCompleteTextView}, you can use the
* {@link android.widget.SimpleCursorAdapter.CursorToStringConverter} and the
* {@link android.widget.FilterQueryProvider} interfaces
* to get control over the filtering process. You can refer to
* {@link #convertToString(android.database.Cursor)} and
* {@link #runQueryOnBackgroundThread(CharSequence)} for more information.
*/
public class SimpleDragSortCursorAdapter extends ResourceDragSortCursorAdapter {
/**
* A list of columns containing the data to bind to the UI.
* This field should be made private, so it is hidden from the SDK.
* {@hide}
*/
protected int[] mFrom;
/**
* A list of View ids representing the views to which the data must be bound.
* This field should be made private, so it is hidden from the SDK.
* {@hide}
*/
protected int[] mTo;
private int mStringConversionColumn = -1;
private CursorToStringConverter mCursorToStringConverter;
private ViewBinder mViewBinder;
String[] mOriginalFrom;
/**
* Constructor the enables auto-requery.
*
* @deprecated This option is discouraged, as it results in Cursor queries
* being performed on the application's UI thread and thus can cause poor
* responsiveness or even Application Not Responding errors. As an alternative,
* use {@link android.app.LoaderManager} with a {@link android.content.CursorLoader}.
*/
@Deprecated
public SimpleDragSortCursorAdapter(Context context, int layout, Cursor c, String[] from, int[] to) {
super(context, layout, c);
mTo = to;
mOriginalFrom = from;
findColumns(c, from);
}
/**
* Standard constructor.
*
* @param context The context where the ListView associated with this
* SimpleListItemFactory is running
* @param layout resource identifier of a layout file that defines the views
* for this list item. The layout file should include at least
* those named views defined in "to"
* @param c The database cursor. Can be null if the cursor is not available yet.
* @param from A list of column names representing the data to bind to the UI. Can be null
* if the cursor is not available yet.
* @param to The views that should display column in the "from" parameter.
* These should all be TextViews. The first N views in this list
* are given the values of the first N columns in the from
* parameter. Can be null if the cursor is not available yet.
* @param flags Flags used to determine the behavior of the adapter,
* as per {@link CursorAdapter#CursorAdapter(Context, Cursor, int)}.
*/
public SimpleDragSortCursorAdapter(Context context, int layout,
Cursor c, String[] from, int[] to, int flags) {
super(context, layout, c, flags);
mTo = to;
mOriginalFrom = from;
findColumns(c, from);
}
/**
* Binds all of the field names passed into the "to" parameter of the
* constructor with their corresponding cursor columns as specified in the
* "from" parameter.
*
* Binding occurs in two phases. First, if a
* {@link android.widget.SimpleCursorAdapter.ViewBinder} is available,
* {@link ViewBinder#setViewValue(android.view.View, android.database.Cursor, int)}
* is invoked. If the returned value is true, binding has occured. If the
* returned value is false and the view to bind is a TextView,
* {@link #setViewText(TextView, String)} is invoked. If the returned value is
* false and the view to bind is an ImageView,
* {@link #setViewImage(ImageView, String)} is invoked. If no appropriate
* binding can be found, an {@link IllegalStateException} is thrown.
*
* @throws IllegalStateException if binding cannot occur
*
* @see android.widget.CursorAdapter#bindView(android.view.View,
* android.content.Context, android.database.Cursor)
* @see #getViewBinder()
* @see #setViewBinder(android.widget.SimpleCursorAdapter.ViewBinder)
* @see #setViewImage(ImageView, String)
* @see #setViewText(TextView, String)
*/
@Override
public void bindView(View view, Context context, Cursor cursor) {
final ViewBinder binder = mViewBinder;
final int count = mTo.length;
final int[] from = mFrom;
final int[] to = mTo;
for (int i = 0; i < count; i++) {
final View v = view.findViewById(to[i]);
if (v != null) {
boolean bound = false;
if (binder != null) {
bound = binder.setViewValue(v, cursor, from[i]);
}
if (!bound) {
String text = cursor.getString(from[i]);
if (text == null) {
text = "";
}
if (v instanceof TextView) {
setViewText((TextView) v, text);
} else if (v instanceof ImageView) {
setViewImage((ImageView) v, text);
} else {
throw new IllegalStateException(v.getClass().getName() + " is not a " +
" view that can be bounds by this SimpleCursorAdapter");
}
}
}
}
}
/**
* Returns the {@link ViewBinder} used to bind data to views.
*
* @return a ViewBinder or null if the binder does not exist
*
* @see #bindView(android.view.View, android.content.Context, android.database.Cursor)
* @see #setViewBinder(android.widget.SimpleCursorAdapter.ViewBinder)
*/
public ViewBinder getViewBinder() {
return mViewBinder;
}
/**
* Sets the binder used to bind data to views.
*
* @param viewBinder the binder used to bind data to views, can be null to
* remove the existing binder
*
* @see #bindView(android.view.View, android.content.Context, android.database.Cursor)
* @see #getViewBinder()
*/
public void setViewBinder(ViewBinder viewBinder) {
mViewBinder = viewBinder;
}
/**
* Called by bindView() to set the image for an ImageView but only if
* there is no existing ViewBinder or if the existing ViewBinder cannot
* handle binding to an ImageView.
*
* By default, the value will be treated as an image resource. If the
* value cannot be used as an image resource, the value is used as an
* image Uri.
*
* Intended to be overridden by Adapters that need to filter strings
* retrieved from the database.
*
* @param v ImageView to receive an image
* @param value the value retrieved from the cursor
*/
public void setViewImage(ImageView v, String value) {
try {
v.setImageResource(Integer.parseInt(value));
} catch (NumberFormatException nfe) {
v.setImageURI(Uri.parse(value));
}
}
/**
* Called by bindView() to set the text for a TextView but only if
* there is no existing ViewBinder or if the existing ViewBinder cannot
* handle binding to a TextView.
*
* Intended to be overridden by Adapters that need to filter strings
* retrieved from the database.
*
* @param v TextView to receive text
* @param text the text to be set for the TextView
*/
public void setViewText(TextView v, String text) {
v.setText(text);
}
/**
* Return the index of the column used to get a String representation
* of the Cursor.
*
* @return a valid index in the current Cursor or -1
*
* @see android.widget.CursorAdapter#convertToString(android.database.Cursor)
* @see #setStringConversionColumn(int)
* @see #setCursorToStringConverter(android.widget.SimpleCursorAdapter.CursorToStringConverter)
* @see #getCursorToStringConverter()
*/
public int getStringConversionColumn() {
return mStringConversionColumn;
}
/**
* Defines the index of the column in the Cursor used to get a String
* representation of that Cursor. The column is used to convert the
* Cursor to a String only when the current CursorToStringConverter
* is null.
*
* @param stringConversionColumn a valid index in the current Cursor or -1 to use the default
* conversion mechanism
*
* @see android.widget.CursorAdapter#convertToString(android.database.Cursor)
* @see #getStringConversionColumn()
* @see #setCursorToStringConverter(android.widget.SimpleCursorAdapter.CursorToStringConverter)
* @see #getCursorToStringConverter()
*/
public void setStringConversionColumn(int stringConversionColumn) {
mStringConversionColumn = stringConversionColumn;
}
/**
* Returns the converter used to convert the filtering Cursor
* into a String.
*
* @return null if the converter does not exist or an instance of
* {@link android.widget.SimpleCursorAdapter.CursorToStringConverter}
*
* @see #setCursorToStringConverter(android.widget.SimpleCursorAdapter.CursorToStringConverter)
* @see #getStringConversionColumn()
* @see #setStringConversionColumn(int)
* @see android.widget.CursorAdapter#convertToString(android.database.Cursor)
*/
public CursorToStringConverter getCursorToStringConverter() {
return mCursorToStringConverter;
}
/**
* Sets the converter used to convert the filtering Cursor
* into a String.
*
* @param cursorToStringConverter the Cursor to String converter, or
* null to remove the converter
*
* @see #setCursorToStringConverter(android.widget.SimpleCursorAdapter.CursorToStringConverter)
* @see #getStringConversionColumn()
* @see #setStringConversionColumn(int)
* @see android.widget.CursorAdapter#convertToString(android.database.Cursor)
*/
public void setCursorToStringConverter(CursorToStringConverter cursorToStringConverter) {
mCursorToStringConverter = cursorToStringConverter;
}
/**
* Returns a CharSequence representation of the specified Cursor as defined
* by the current CursorToStringConverter. If no CursorToStringConverter
* has been set, the String conversion column is used instead. If the
* conversion column is -1, the returned String is empty if the cursor
* is null or Cursor.toString().
*
* @param cursor the Cursor to convert to a CharSequence
*
* @return a non-null CharSequence representing the cursor
*/
@Override
public CharSequence convertToString(Cursor cursor) {
if (mCursorToStringConverter != null) {
return mCursorToStringConverter.convertToString(cursor);
} else if (mStringConversionColumn > -1) {
return cursor.getString(mStringConversionColumn);
}
return super.convertToString(cursor);
}
/**
* Create a map from an array of strings to an array of column-id integers in cursor c.
* If c is null, the array will be discarded.
*
* @param c the cursor to find the columns from
* @param from the Strings naming the columns of interest
*/
private void findColumns(Cursor c, String[] from) {
if (c != null) {
int i;
int count = from.length;
if (mFrom == null || mFrom.length != count) {
mFrom = new int[count];
}
for (i = 0; i < count; i++) {
mFrom[i] = c.getColumnIndexOrThrow(from[i]);
}
} else {
mFrom = null;
}
}
@Override
public Cursor swapCursor(Cursor c) {
// super.swapCursor() will notify observers before we have
// a valid mapping, make sure we have a mapping before this
// happens
findColumns(c, mOriginalFrom);
return super.swapCursor(c);
}
/**
* Change the cursor and change the column-to-view mappings at the same time.
*
* @param c The database cursor. Can be null if the cursor is not available yet.
* @param from A list of column names representing the data to bind to the UI. Can be null
* if the cursor is not available yet.
* @param to The views that should display column in the "from" parameter.
* These should all be TextViews. The first N views in this list
* are given the values of the first N columns in the from
* parameter. Can be null if the cursor is not available yet.
*/
public void changeCursorAndColumns(Cursor c, String[] from, int[] to) {
mOriginalFrom = from;
mTo = to;
// super.changeCursor() will notify observers before we have
// a valid mapping, make sure we have a mapping before this
// happens
findColumns(c, mOriginalFrom);
super.changeCursor(c);
}
/**
* This class can be used by external clients of SimpleCursorAdapter
* to bind values fom the Cursor to views.
*
* You should use this class to bind values from the Cursor to views
* that are not directly supported by SimpleCursorAdapter or to
* change the way binding occurs for views supported by
* SimpleCursorAdapter.
*
* @see SimpleCursorAdapter#bindView(android.view.View, android.content.Context, android.database.Cursor)
* @see SimpleCursorAdapter#setViewImage(ImageView, String)
* @see SimpleCursorAdapter#setViewText(TextView, String)
*/
public static interface ViewBinder {
/**
* Binds the Cursor column defined by the specified index to the specified view.
*
* When binding is handled by this ViewBinder, this method must return true.
* If this method returns false, SimpleCursorAdapter will attempts to handle
* the binding on its own.
*
* @param view the view to bind the data to
* @param cursor the cursor to get the data from
* @param columnIndex the column at which the data can be found in the cursor
*
* @return true if the data was bound to the view, false otherwise
*/
boolean setViewValue(View view, Cursor cursor, int columnIndex);
}
/**
* This class can be used by external clients of SimpleCursorAdapter
* to define how the Cursor should be converted to a String.
*
* @see android.widget.CursorAdapter#convertToString(android.database.Cursor)
*/
public static interface CursorToStringConverter {
/**
* Returns a CharSequence representing the specified Cursor.
*
* @param cursor the cursor for which a CharSequence representation
* is requested
*
* @return a non-null CharSequence representing the cursor
*/
CharSequence convertToString(Cursor cursor);
}
}

View File

@ -0,0 +1,89 @@
package com.mobeta.android.dslv;
import android.graphics.Bitmap;
import android.graphics.Point;
import android.graphics.Color;
import android.widget.ListView;
import android.widget.ImageView;
import android.view.View;
import android.view.ViewGroup;
import android.util.Log;
/**
* Simple implementation of the FloatViewManager class. Uses list
* items as they appear in the ListView to create the floating View.
*/
public class SimpleFloatViewManager implements DragSortListView.FloatViewManager {
private Bitmap mFloatBitmap;
private ImageView mImageView;
private int mFloatBGColor = Color.BLACK;
private ListView mListView;
public SimpleFloatViewManager(ListView lv) {
mListView = lv;
}
public void setBackgroundColor(int color) {
mFloatBGColor = color;
}
/**
* This simple implementation creates a Bitmap copy of the
* list item currently shown at ListView <code>position</code>.
*/
@Override
public View onCreateFloatView(int position) {
// Guaranteed that this will not be null? I think so. Nope, got
// a NullPointerException once...
View v = mListView.getChildAt(position + mListView.getHeaderViewsCount() - mListView.getFirstVisiblePosition());
if (v == null) {
return null;
}
v.setPressed(false);
// Create a copy of the drawing cache so that it does not get
// recycled by the framework when the list tries to clean up memory
//v.setDrawingCacheQuality(View.DRAWING_CACHE_QUALITY_HIGH);
v.setDrawingCacheEnabled(true);
mFloatBitmap = Bitmap.createBitmap(v.getDrawingCache());
v.setDrawingCacheEnabled(false);
if (mImageView == null) {
mImageView = new ImageView(mListView.getContext());
}
mImageView.setBackgroundColor(mFloatBGColor);
mImageView.setPadding(0, 0, 0, 0);
mImageView.setImageBitmap(mFloatBitmap);
mImageView.setLayoutParams(new ViewGroup.LayoutParams(v.getWidth(), v.getHeight()));
return mImageView;
}
/**
* This does nothing
*/
@Override
public void onDragFloatView(View floatView, Point position, Point touch) {
// do nothing
}
/**
* Removes the Bitmap from the ImageView created in
* onCreateFloatView() and tells the system to recycle it.
*/
@Override
public void onDestroyFloatView(View floatView) {
((ImageView) floatView).setImageDrawable(null);
mFloatBitmap.recycle();
mFloatBitmap = null;
}
}

View File

@ -0,0 +1,30 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<declare-styleable name="DragSortListView">
<attr name="collapsed_height" format="dimension" />
<attr name="drag_scroll_start" format="float" />
<attr name="max_drag_scroll_speed" format="float" />
<attr name="float_background_color" format="color" />
<attr name="remove_mode">
<enum name="clickRemove" value="0" />
<enum name="flingRemove" value="1" />
</attr>
<attr name="track_drag_sort" format="boolean"/>
<attr name="float_alpha" format="float"/>
<attr name="slide_shuffle_speed" format="float"/>
<attr name="remove_animation_duration" format="integer"/>
<attr name="drop_animation_duration" format="integer"/>
<attr name="drag_enabled" format="boolean" />
<attr name="sort_enabled" format="boolean" />
<attr name="remove_enabled" format="boolean" />
<attr name="drag_start_mode">
<enum name="onDown" value="0" />
<enum name="onMove" value="1" />
<enum name="onLongPress" value="2"/>
</attr>
<attr name="drag_handle_id" format="integer" />
<attr name="fling_handle_id" format="integer" />
<attr name="click_remove_id" format="integer" />
<attr name="use_default_controller" format="boolean" />
</declare-styleable>
</resources>

View File

@ -1,3 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<lint>
</lint>

View File

@ -1,11 +1,7 @@
## This file is automatically generated by Android Studio.
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
#
# This file must *NOT* be checked into Version Control Systems,
## This file must *NOT* be checked into Version Control Systems,
# as it contains information specific to your local configuration.
#
# Location of the SDK. This is only used by Gradle.
# For customization when using a Version Control System, please read the
# header note.
#Fri Dec 20 10:17:44 MST 2013
sdk.dir=C\:/Program Files (x86)/Android/android-studio/sdk
#
#Sun Jul 26 16:04:03 CEST 2015
sdk.dir=/home/ogarcia/Android/Sdk

View File

@ -1,27 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="FacetManager">
<facet type="android" name="Android">
<configuration>
<option name="GEN_FOLDER_RELATIVE_PATH_APT" value="/menudrawer/menudrawer/library/gen" />
<option name="GEN_FOLDER_RELATIVE_PATH_AIDL" value="/menudrawer/menudrawer/library/gen" />
<option name="MANIFEST_FILE_RELATIVE_PATH" value="/menudrawer/menudrawer/AndroidManifest.xml" />
<option name="RES_FOLDER_RELATIVE_PATH" value="/menudrawer/menudrawer/res" />
<option name="LIBRARY_PROJECT" value="true" />
<proGuardCfgFiles>
<file>file://D:/Data/Android/adt-bundle-windows/sdk/tools/proguard/proguard-android.txt</file>
</proGuardCfgFiles>
</configuration>
</facet>
</component>
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$/menudrawer/menudrawer">
<sourceFolder url="file://$MODULE_DIR$/menudrawer/menudrawer/src" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/menudrawer/menudrawer/library/gen" isTestSource="false" generated="true" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

View File

@ -1,49 +0,0 @@
-optimizationpasses 5
-dontpreverify
-keepattributes SourceFile,LineNumberTable
-optimizations !code/simplification/arithmetic,!code/simplification/cast,!field/*,!class/merging/*
-allowaccessmodification
-dontusemixedcaseclassnames
-dontskipnonpubliclibraryclasses
-verbose
-dontwarn android.support.**
-dontnote android.support.**
-keepattributes *Annotation*
-keep public class * extends android.app.Activity
-keep public class * extends android.app.Application
-keep public class * extends android.app.Service
-keep public class * extends android.content.BroadcastReceiver
-keep public class * extends android.content.ContentProvider
-keep public class * extends android.app.backup.BackupAgentHelper
-keep public class * extends android.preference.Preference
-keep public class com.handmark.pulltorefresh.library.PullToRefreshBase$AnimationStyle
-keep public class com.handmark.pulltorefresh.library.PullToRefreshBase$Mode
-keepclasseswithmembernames class * {
native <methods>;
}
-keepclassmembers class * extends android.app.Activity {
public void *(android.view.View);
}
-keepclassmembers enum * {
public static **[] values();
public static ** valueOf(java.lang.String);
}
-keep class * implements android.os.Parcelable {
public static final android.os.Parcelable$Creator *;
}
-keepclassmembers public class * extends android.view.View {
void set*(***);
*** get*();
}
-keepclassmembers class **.R$* {
public static <fields>;
}

View File

@ -1,17 +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 use,
# "ant.properties", and override values to adapt the script to your
# project structure.
# Project target.
target=android-19
android.library=false
android.library.reference.1=menudrawer/menudrawer
android.library.reference.2=pulltorefresh
android.library.reference.3=drag-sort-listview/library

View File

@ -1,27 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="FacetManager">
<facet type="android" name="Android">
<configuration>
<option name="GEN_FOLDER_RELATIVE_PATH_APT" value="/pulltorefresh/library/gen" />
<option name="GEN_FOLDER_RELATIVE_PATH_AIDL" value="/pulltorefresh/library/gen" />
<option name="MANIFEST_FILE_RELATIVE_PATH" value="/pulltorefresh/library/AndroidManifest.xml" />
<option name="RES_FOLDER_RELATIVE_PATH" value="/pulltorefresh/library/res" />
<option name="LIBRARY_PROJECT" value="true" />
<proGuardCfgFiles>
<file>file://D:/Data/Android/adt-bundle-windows/sdk/tools/proguard/proguard-android.txt</file>
</proGuardCfgFiles>
</configuration>
</facet>
</component>
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$/pulltorefresh">
<sourceFolder url="file://$MODULE_DIR$/pulltorefresh/library/src" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/pulltorefresh/library/gen" isTestSource="false" generated="true" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

4
settings.gradle Normal file
View File

@ -0,0 +1,4 @@
include ':library'
include ':menudrawer'
include ':pulltorefresh'
include ':ultraSonic'

Binary file not shown.

25
ultraSonic/build.gradle Normal file
View File

@ -0,0 +1,25 @@
apply plugin: 'com.android.application'
android {
compileSdkVersion 22
buildToolsVersion "22.0.1"
defaultConfig {
applicationId "com.thejoshwa.ultrasonic.androidapp"
minSdkVersion 14
targetSdkVersion 22
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
}
dependencies {
compile project(':menudrawer')
compile project(':pulltorefresh')
compile project(':library')
}

3
ultraSonic/lint.xml Normal file
View File

@ -0,0 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<lint>
</lint>

View File

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

Some files were not shown because too many files have changed in this diff Show More