first implementation of customize sherpafy. added possibility to selest and download tour and watch detailed information.

This commit is contained in:
unknown 2014-06-01 21:33:29 +03:00
parent 9e622fa9a6
commit 0d4be712ac
18 changed files with 1612 additions and 32 deletions

View file

@ -148,6 +148,7 @@
<activity android:name="net.osmand.plus.activities.search.SearchStreet2ByNameActivity"></activity>
<activity android:name="net.osmand.plus.activities.search.SearchBuildingByNameActivity"></activity>
<activity android:name="net.osmand.plus.sherpafy.TourCommonActivity"></activity>
<activity android:name="net.osmand.plus.sherpafy.SherpafyStartActivity" android:exported="true"></activity>
<activity android:name="net.osmand.plus.activities.EditPOIFilterActivity"></activity>
<activity android:name="net.osmand.plus.activities.search.GeoIntentActivity">
<intent-filter>

View file

@ -26,7 +26,7 @@
<orderEntry type="jdk" jdkName="Android API 19 Platform" jdkType="Android SDK" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="module" module-name="SherlockBar" />
<orderEntry type="library" scope="PROVIDED" name="libs" level="project" />
<orderEntry type="library" name="libs" level="project" />
<orderEntry type="module-library">
<library>
<CLASSES>

4
OsmAnd/osmand.properties Normal file
View file

@ -0,0 +1,4 @@
path.variable.maven_repository=C\:\\Users\\Barsik\\.m2\\repository
jdk.home.1.6=G\:/glassfish3/jdk
jdk.home.android_api_19_platform=H\:/Work/Android SDK/adt-bundle-windows-x86_64-20140321/sdk
javac2.instrumentation.includeJavaRuntime=false

426
OsmAnd/osmand.xml Normal file
View file

@ -0,0 +1,426 @@
<?xml version="1.0" encoding="UTF-8"?>
<project name="osmand" default="all">
<property file="osmand.properties"/>
<!-- Uncomment the following property if no tests compilation is needed -->
<!--
<property name="skip.tests" value="true"/>
-->
<!-- Compiler options -->
<property name="compiler.debug" value="on"/>
<property name="compiler.generate.no.warnings" value="off"/>
<property name="compiler.args" value=""/>
<property name="compiler.max.memory" value="700m"/>
<patternset id="ignored.files">
<exclude name="**/CVS/**"/>
<exclude name="**/SCCS/**"/>
<exclude name="**/RCS/**"/>
<exclude name="**/rcs/**"/>
<exclude name="**/.DS_Store/**"/>
<exclude name="**/.svn/**"/>
<exclude name="**/.pyc/**"/>
<exclude name="**/.pyo/**"/>
<exclude name="**/*.pyc/**"/>
<exclude name="**/*.pyo/**"/>
<exclude name="**/.git/**"/>
<exclude name="**/*.hprof/**"/>
<exclude name="**/_svn/**"/>
<exclude name="**/.hg/**"/>
<exclude name="**/*.lib/**"/>
<exclude name="**/*~/**"/>
<exclude name="**/__pycache__/**"/>
<exclude name="**/.bundle/**"/>
<exclude name="**/*.rbc/**"/>
</patternset>
<patternset id="library.patterns">
<include name="*.zip"/>
<include name="*.apk"/>
<include name="*.war"/>
<include name="*.egg"/>
<include name="*.ear"/>
<include name="*.ane"/>
<include name="*.swc"/>
<include name="*.jar"/>
</patternset>
<patternset id="compiler.resources">
<exclude name="**/?*.java"/>
<exclude name="**/?*.form"/>
<exclude name="**/?*.class"/>
<exclude name="**/?*.groovy"/>
<exclude name="**/?*.scala"/>
<exclude name="**/?*.flex"/>
<exclude name="**/?*.kt"/>
<exclude name="**/?*.clj"/>
</patternset>
<!-- JDK definitions -->
<property name="jdk.bin.1.6" value="${jdk.home.1.6}/bin"/>
<path id="jdk.classpath.1.6">
<fileset dir="${jdk.home.1.6}">
<include name="jre/lib/charsets.jar"/>
<include name="jre/lib/deploy.jar"/>
<include name="jre/lib/javaws.jar"/>
<include name="jre/lib/jce.jar"/>
<include name="jre/lib/jsse.jar"/>
<include name="jre/lib/management-agent.jar"/>
<include name="jre/lib/plugin.jar"/>
<include name="jre/lib/resources.jar"/>
<include name="jre/lib/rt.jar"/>
<include name="jre/lib/ext/dnsns.jar"/>
<include name="jre/lib/ext/localedata.jar"/>
<include name="jre/lib/ext/sunjce_provider.jar"/>
<include name="jre/lib/ext/sunmscapi.jar"/>
</fileset>
</path>
<property name="jdk.bin.android_api_19_platform" value="G:/glassfish3/jdk/bin"/>
<path id="jdk.classpath.android_api_19_platform">
<fileset dir="${jdk.home.android_api_19_platform}">
<include name="platforms/android-19/android.jar"/>
<include name="platforms/android-19/data/res"/>
<include name="tools/support/annotations.jar"/>
</fileset>
</path>
<property name="project.jdk.home" value="${jdk.home.1.6}"/>
<property name="project.jdk.bin" value="${jdk.bin.1.6}"/>
<property name="project.jdk.classpath" value="jdk.classpath.1.6"/>
<!-- Project Libraries -->
<path id="library.libs.classpath">
<pathelement location="${basedir}/libs/bzip2-20090327.jar"/>
<pathelement location="${basedir}/libs/gnu-trove-osmand.jar"/>
<pathelement location="${basedir}/libs/icu4j-49_1.jar"/>
<pathelement location="${basedir}/libs/junidecode-0.1.jar"/>
<pathelement location="${basedir}/libs/tuprolog.jar"/>
<pathelement location="${basedir}/../SherlockBar/libs/android-support-v4.jar"/>
</path>
<!-- Register Custom Compiler Taskdefs -->
<property name="javac2.home" value="${idea.home}/lib"/>
<path id="javac2.classpath">
<pathelement location="${javac2.home}/javac2.jar"/>
<pathelement location="${javac2.home}/jdom.jar"/>
<pathelement location="${javac2.home}/asm4-all.jar"/>
<pathelement location="${javac2.home}/jgoodies-forms.jar"/>
</path>
<target name="register.custom.compilers">
<taskdef name="javac2" classname="com.intellij.ant.Javac2" classpathref="javac2.classpath"/>
<taskdef name="instrumentIdeaExtensions" classname="com.intellij.ant.InstrumentIdeaExtensions" classpathref="javac2.classpath"/>
</target>
<!-- Modules -->
<!-- Module OsmAnd-java -->
<dirname property="module.osmand-java.basedir" file="${ant.file}"/>
<property name="module.jdk.home.osmand-java" value="${jdk.home.1.6}"/>
<property name="module.jdk.bin.osmand-java" value="${jdk.bin.1.6}"/>
<property name="module.jdk.classpath.osmand-java" value="jdk.classpath.1.6"/>
<property name="compiler.args.osmand-java" value="-encoding UTF-8 -source 1.6 ${compiler.args}"/>
<property name="osmand-java.output.dir" value="${module.osmand-java.basedir}/../OsmAnd-java/bin"/>
<property name="osmand-java.testoutput.dir" value="${module.osmand-java.basedir}/../OsmAnd-java/bin"/>
<path id="osmand-java.module.bootclasspath">
<!-- Paths to be included in compilation bootclasspath -->
</path>
<path id="osmand-java.module.production.classpath">
<path refid="${module.jdk.classpath.osmand-java}"/>
<pathelement location="${basedir}/../OsmAnd-java/libs/bsh-core-2.0b4.jar"/>
<pathelement location="${basedir}/../OsmAnd-java/libs/bzip2-20090327.jar"/>
<pathelement location="${basedir}/../OsmAnd-java/libs/commons-logging-1.1.1.jar"/>
<pathelement location="${basedir}/../OsmAnd-java/libs/json-20090211.jar"/>
<pathelement location="${basedir}/../OsmAnd-java/libs/junidecode-0.1.jar"/>
<pathelement location="${basedir}/../OsmAnd-java/libs/kxml2-2.3.0.jar"/>
<pathelement location="${basedir}/../OsmAnd-java/libs/tuprolog.jar"/>
<pathelement location="${basedir}/../OsmAnd-java/libs/icu4j-49_1.jar"/>
<pathelement location="${basedir}/../OsmAnd-java/libs/gnu-trove-osmand.jar"/>
</path>
<path id="osmand-java.runtime.production.module.classpath">
<pathelement location="${osmand-java.output.dir}"/>
<pathelement location="${basedir}/../OsmAnd-java/libs/bsh-core-2.0b4.jar"/>
<pathelement location="${basedir}/../OsmAnd-java/libs/bzip2-20090327.jar"/>
<pathelement location="${basedir}/../OsmAnd-java/libs/commons-logging-1.1.1.jar"/>
<pathelement location="${basedir}/../OsmAnd-java/libs/json-20090211.jar"/>
<pathelement location="${basedir}/../OsmAnd-java/libs/junidecode-0.1.jar"/>
<pathelement location="${basedir}/../OsmAnd-java/libs/kxml2-2.3.0.jar"/>
<pathelement location="${basedir}/../OsmAnd-java/libs/tuprolog.jar"/>
<pathelement location="${basedir}/../OsmAnd-java/libs/icu4j-49_1.jar"/>
<pathelement location="${basedir}/../OsmAnd-java/libs/gnu-trove-osmand.jar"/>
</path>
<path id="osmand-java.module.classpath">
<pathelement location="${osmand-java.output.dir}"/>
<path refid="${module.jdk.classpath.osmand-java}"/>
<pathelement location="${basedir}/../OsmAnd-java/libs/bsh-core-2.0b4.jar"/>
<pathelement location="${basedir}/../OsmAnd-java/libs/bzip2-20090327.jar"/>
<pathelement location="${basedir}/../OsmAnd-java/libs/commons-logging-1.1.1.jar"/>
<pathelement location="${basedir}/../OsmAnd-java/libs/json-20090211.jar"/>
<pathelement location="${basedir}/../OsmAnd-java/libs/junidecode-0.1.jar"/>
<pathelement location="${basedir}/../OsmAnd-java/libs/kxml2-2.3.0.jar"/>
<pathelement location="${basedir}/../OsmAnd-java/libs/tuprolog.jar"/>
<pathelement location="${basedir}/../OsmAnd-java/libs/icu4j-49_1.jar"/>
<pathelement location="${basedir}/../OsmAnd-java/libs/gnu-trove-osmand.jar"/>
</path>
<path id="osmand-java.runtime.module.classpath">
<pathelement location="${osmand-java.output.dir}"/>
<pathelement location="${basedir}/../OsmAnd-java/libs/bsh-core-2.0b4.jar"/>
<pathelement location="${basedir}/../OsmAnd-java/libs/bzip2-20090327.jar"/>
<pathelement location="${basedir}/../OsmAnd-java/libs/commons-logging-1.1.1.jar"/>
<pathelement location="${basedir}/../OsmAnd-java/libs/json-20090211.jar"/>
<pathelement location="${basedir}/../OsmAnd-java/libs/junidecode-0.1.jar"/>
<pathelement location="${basedir}/../OsmAnd-java/libs/kxml2-2.3.0.jar"/>
<pathelement location="${basedir}/../OsmAnd-java/libs/tuprolog.jar"/>
<pathelement location="${basedir}/../OsmAnd-java/libs/icu4j-49_1.jar"/>
<pathelement location="${basedir}/../OsmAnd-java/libs/gnu-trove-osmand.jar"/>
</path>
<patternset id="excluded.from.module.osmand-java">
<patternset refid="ignored.files"/>
</patternset>
<patternset id="excluded.from.compilation.osmand-java">
<patternset refid="excluded.from.module.osmand-java"/>
</patternset>
<path id="osmand-java.module.sourcepath">
<dirset dir="${module.osmand-java.basedir}/../OsmAnd-java">
<include name="src"/>
</dirset>
</path>
<target name="compile.module.osmand-java" depends="compile.module.osmand-java.production,compile.module.osmand-java.tests" description="Compile module OsmAnd-java"/>
<target name="compile.module.osmand-java.production" depends="register.custom.compilers" description="Compile module OsmAnd-java; production classes">
<mkdir dir="${osmand-java.output.dir}"/>
<javac2 destdir="${osmand-java.output.dir}" debug="${compiler.debug}" nowarn="${compiler.generate.no.warnings}" memorymaximumsize="${compiler.max.memory}" fork="true" executable="${module.jdk.bin.osmand-java}/javac">
<compilerarg line="${compiler.args.osmand-java}"/>
<bootclasspath refid="osmand-java.module.bootclasspath"/>
<classpath refid="osmand-java.module.production.classpath"/>
<src refid="osmand-java.module.sourcepath"/>
<patternset refid="excluded.from.compilation.osmand-java"/>
</javac2>
<copy todir="${osmand-java.output.dir}">
<fileset dir="${module.osmand-java.basedir}/../OsmAnd-java/src">
<patternset refid="compiler.resources"/>
<type type="file"/>
</fileset>
</copy>
</target>
<target name="compile.module.osmand-java.tests" depends="register.custom.compilers,compile.module.osmand-java.production" description="compile module OsmAnd-java; test classes" unless="skip.tests"/>
<target name="clean.module.osmand-java" description="cleanup module">
<delete dir="${osmand-java.output.dir}"/>
<delete dir="${osmand-java.testoutput.dir}"/>
</target>
<!-- Module SherlockBar -->
<dirname property="module.sherlockbar.basedir" file="${ant.file}"/>
<property name="module.jdk.home.sherlockbar" value="${jdk.home.android_api_19_platform}"/>
<property name="module.jdk.bin.sherlockbar" value="${jdk.bin.android_api_19_platform}"/>
<property name="module.jdk.classpath.sherlockbar" value="jdk.classpath.android_api_19_platform"/>
<property name="compiler.args.sherlockbar" value="-encoding UTF-8 -source 1.6 ${compiler.args}"/>
<property name="sherlockbar.output.dir" value="${module.sherlockbar.basedir}/../SherlockBar/bin/classes"/>
<property name="sherlockbar.testoutput.dir" value="${module.sherlockbar.basedir}/../SherlockBar/bin/classes"/>
<path id="sherlockbar.module.bootclasspath">
<!-- Paths to be included in compilation bootclasspath -->
</path>
<path id="sherlockbar.module.production.classpath">
<path refid="${module.jdk.classpath.sherlockbar}"/>
<path refid="library.libs.classpath"/>
</path>
<path id="sherlockbar.runtime.production.module.classpath">
<pathelement location="${sherlockbar.output.dir}"/>
<path refid="library.libs.classpath"/>
</path>
<path id="sherlockbar.module.classpath">
<path refid="${module.jdk.classpath.sherlockbar}"/>
<pathelement location="${sherlockbar.output.dir}"/>
<path refid="library.libs.classpath"/>
</path>
<path id="sherlockbar.runtime.module.classpath">
<pathelement location="${sherlockbar.output.dir}"/>
<path refid="library.libs.classpath"/>
</path>
<patternset id="excluded.from.module.sherlockbar">
<patternset refid="ignored.files"/>
</patternset>
<patternset id="excluded.from.compilation.sherlockbar">
<patternset refid="excluded.from.module.sherlockbar"/>
</patternset>
<path id="sherlockbar.module.sourcepath">
<dirset dir="${module.sherlockbar.basedir}/../SherlockBar">
<include name="src"/>
<include name="gen"/>
</dirset>
</path>
<target name="compile.module.sherlockbar" depends="compile.module.sherlockbar.production,compile.module.sherlockbar.tests" description="Compile module SherlockBar"/>
<target name="compile.module.sherlockbar.production" depends="register.custom.compilers" description="Compile module SherlockBar; production classes">
<mkdir dir="${sherlockbar.output.dir}"/>
<javac2 destdir="${sherlockbar.output.dir}" debug="${compiler.debug}" nowarn="${compiler.generate.no.warnings}" memorymaximumsize="${compiler.max.memory}" fork="true" executable="${module.jdk.bin.sherlockbar}/javac">
<compilerarg line="${compiler.args.sherlockbar}"/>
<bootclasspath refid="sherlockbar.module.bootclasspath"/>
<classpath refid="sherlockbar.module.production.classpath"/>
<src refid="sherlockbar.module.sourcepath"/>
<patternset refid="excluded.from.compilation.sherlockbar"/>
</javac2>
<copy todir="${sherlockbar.output.dir}">
<fileset dir="${module.sherlockbar.basedir}/../SherlockBar/src">
<patternset refid="compiler.resources"/>
<type type="file"/>
</fileset>
<fileset dir="${module.sherlockbar.basedir}/../SherlockBar/gen">
<patternset refid="compiler.resources"/>
<type type="file"/>
</fileset>
</copy>
</target>
<target name="compile.module.sherlockbar.tests" depends="register.custom.compilers,compile.module.sherlockbar.production" description="compile module SherlockBar; test classes" unless="skip.tests"/>
<target name="clean.module.sherlockbar" description="cleanup module">
<delete dir="${sherlockbar.output.dir}"/>
<delete dir="${sherlockbar.testoutput.dir}"/>
</target>
<!-- Module OsmAnd -->
<dirname property="module.osmand.basedir" file="${ant.file}"/>
<property name="module.jdk.home.osmand" value="${jdk.home.android_api_19_platform}"/>
<property name="module.jdk.bin.osmand" value="${jdk.bin.android_api_19_platform}"/>
<property name="module.jdk.classpath.osmand" value="jdk.classpath.android_api_19_platform"/>
<property name="compiler.args.osmand" value="-encoding UTF-8 -source 1.6 ${compiler.args}"/>
<property name="osmand.output.dir" value="${module.osmand.basedir}/bin/classes"/>
<property name="osmand.testoutput.dir" value="${module.osmand.basedir}/bin/classes"/>
<path id="osmand.module.bootclasspath">
<!-- Paths to be included in compilation bootclasspath -->
</path>
<path id="osmand.module.production.classpath">
<path refid="${module.jdk.classpath.osmand}"/>
<pathelement location="${sherlockbar.output.dir}"/>
<pathelement location="${osmand-java.output.dir}"/>
<path refid="library.libs.classpath"/>
</path>
<path id="osmand.runtime.production.module.classpath">
<pathelement location="${osmand.output.dir}"/>
<path refid="sherlockbar.runtime.production.module.classpath"/>
<path refid="osmand-java.runtime.production.module.classpath"/>
</path>
<path id="osmand.module.classpath">
<path refid="${module.jdk.classpath.osmand}"/>
<pathelement location="${osmand.output.dir}"/>
<pathelement location="${sherlockbar.output.dir}"/>
<pathelement location="${osmand-java.output.dir}"/>
<path refid="library.libs.classpath"/>
</path>
<path id="osmand.runtime.module.classpath">
<pathelement location="${osmand.output.dir}"/>
<path refid="sherlockbar.runtime.module.classpath"/>
<path refid="osmand-java.runtime.module.classpath"/>
<path refid="library.libs.classpath"/>
</path>
<patternset id="excluded.from.module.osmand">
<patternset refid="ignored.files"/>
</patternset>
<patternset id="excluded.from.compilation.osmand">
<patternset refid="excluded.from.module.osmand"/>
</patternset>
<path id="osmand.module.sourcepath">
<dirset dir="${module.osmand.basedir}">
<include name="src"/>
<include name="gen"/>
</dirset>
</path>
<target name="compile.module.osmand" depends="compile.module.osmand.production,compile.module.osmand.tests" description="Compile module OsmAnd"/>
<target name="compile.module.osmand.production" depends="register.custom.compilers,compile.module.sherlockbar,compile.module.osmand-java" description="Compile module OsmAnd; production classes">
<mkdir dir="${osmand.output.dir}"/>
<javac2 destdir="${osmand.output.dir}" debug="${compiler.debug}" nowarn="${compiler.generate.no.warnings}" memorymaximumsize="${compiler.max.memory}" fork="true" executable="${module.jdk.bin.osmand}/javac">
<compilerarg line="${compiler.args.osmand}"/>
<bootclasspath refid="osmand.module.bootclasspath"/>
<classpath refid="osmand.module.production.classpath"/>
<src refid="osmand.module.sourcepath"/>
<patternset refid="excluded.from.compilation.osmand"/>
</javac2>
<copy todir="${osmand.output.dir}">
<fileset dir="${module.osmand.basedir}/src">
<patternset refid="compiler.resources"/>
<type type="file"/>
</fileset>
<fileset dir="${module.osmand.basedir}/gen">
<patternset refid="compiler.resources"/>
<type type="file"/>
</fileset>
</copy>
</target>
<target name="compile.module.osmand.tests" depends="register.custom.compilers,compile.module.osmand.production" description="compile module OsmAnd; test classes" unless="skip.tests"/>
<target name="clean.module.osmand" description="cleanup module">
<delete dir="${osmand.output.dir}"/>
<delete dir="${osmand.testoutput.dir}"/>
</target>
<target name="init" description="Build initialization">
<!-- Perform any build initialization in this target -->
</target>
<target name="clean" depends="clean.module.osmand-java, clean.module.sherlockbar, clean.module.osmand" description="cleanup all"/>
<target name="build.modules" depends="init, clean, compile.module.osmand-java, compile.module.sherlockbar, compile.module.osmand" description="build all modules"/>
<target name="all" depends="build.modules" description="build all"/>
</project>

View file

@ -0,0 +1,4 @@
path.variable.maven_repository=C\:\\Users\\Barsik\\.m2\\repository
jdk.home.1.6=G\:/glassfish3/jdk
jdk.home.android_api_19_platform=H\:/Work/Android SDK/adt-bundle-windows-x86_64-20140321/sdk
javac2.instrumentation.includeJavaRuntime=false

View file

@ -0,0 +1,434 @@
<?xml version="1.0" encoding="UTF-8"?>
<project name="osmand" default="all">
<property file="osmand.properties"/>
<!-- Uncomment the following property if no tests compilation is needed -->
<!--
<property name="skip.tests" value="true"/>
-->
<!-- Compiler options -->
<property name="compiler.debug" value="on"/>
<property name="compiler.generate.no.warnings" value="off"/>
<property name="compiler.args" value=""/>
<property name="compiler.max.memory" value="700m"/>
<patternset id="ignored.files">
<exclude name="**/CVS/**"/>
<exclude name="**/SCCS/**"/>
<exclude name="**/RCS/**"/>
<exclude name="**/rcs/**"/>
<exclude name="**/.DS_Store/**"/>
<exclude name="**/.svn/**"/>
<exclude name="**/.pyc/**"/>
<exclude name="**/.pyo/**"/>
<exclude name="**/*.pyc/**"/>
<exclude name="**/*.pyo/**"/>
<exclude name="**/.git/**"/>
<exclude name="**/*.hprof/**"/>
<exclude name="**/_svn/**"/>
<exclude name="**/.hg/**"/>
<exclude name="**/*.lib/**"/>
<exclude name="**/*~/**"/>
<exclude name="**/__pycache__/**"/>
<exclude name="**/.bundle/**"/>
<exclude name="**/*.rbc/**"/>
</patternset>
<patternset id="library.patterns">
<include name="*.zip"/>
<include name="*.apk"/>
<include name="*.war"/>
<include name="*.egg"/>
<include name="*.ear"/>
<include name="*.ane"/>
<include name="*.swc"/>
<include name="*.jar"/>
</patternset>
<patternset id="compiler.resources">
<exclude name="**/?*.java"/>
<exclude name="**/?*.form"/>
<exclude name="**/?*.class"/>
<exclude name="**/?*.groovy"/>
<exclude name="**/?*.scala"/>
<exclude name="**/?*.flex"/>
<exclude name="**/?*.kt"/>
<exclude name="**/?*.clj"/>
</patternset>
<!-- JDK definitions -->
<property name="jdk.bin.1.6" value="${jdk.home.1.6}/bin"/>
<path id="jdk.classpath.1.6">
<fileset dir="${jdk.home.1.6}">
<include name="jre/lib/charsets.jar"/>
<include name="jre/lib/deploy.jar"/>
<include name="jre/lib/javaws.jar"/>
<include name="jre/lib/jce.jar"/>
<include name="jre/lib/jsse.jar"/>
<include name="jre/lib/management-agent.jar"/>
<include name="jre/lib/plugin.jar"/>
<include name="jre/lib/resources.jar"/>
<include name="jre/lib/rt.jar"/>
<include name="jre/lib/ext/dnsns.jar"/>
<include name="jre/lib/ext/localedata.jar"/>
<include name="jre/lib/ext/sunjce_provider.jar"/>
<include name="jre/lib/ext/sunmscapi.jar"/>
</fileset>
</path>
<property name="jdk.bin.android_api_19_platform" value="G:/glassfish3/jdk/bin"/>
<path id="jdk.classpath.android_api_19_platform">
<fileset dir="${jdk.home.android_api_19_platform}">
<include name="platforms/android-19/android.jar"/>
<include name="platforms/android-19/data/res"/>
<include name="tools/support/annotations.jar"/>
</fileset>
</path>
<property name="project.jdk.home" value="${jdk.home.1.6}"/>
<property name="project.jdk.bin" value="${jdk.bin.1.6}"/>
<property name="project.jdk.classpath" value="jdk.classpath.1.6"/>
<!-- Project Libraries -->
<!-- Register Custom Compiler Taskdefs -->
<property name="javac2.home" value="${idea.home}/lib"/>
<path id="javac2.classpath">
<pathelement location="${javac2.home}/javac2.jar"/>
<pathelement location="${javac2.home}/jdom.jar"/>
<pathelement location="${javac2.home}/asm4-all.jar"/>
<pathelement location="${javac2.home}/jgoodies-forms.jar"/>
</path>
<target name="register.custom.compilers">
<taskdef name="javac2" classname="com.intellij.ant.Javac2" classpathref="javac2.classpath"/>
<taskdef name="instrumentIdeaExtensions" classname="com.intellij.ant.InstrumentIdeaExtensions" classpathref="javac2.classpath"/>
</target>
<!-- Modules -->
<!-- Module OsmAnd-java -->
<dirname property="module.osmand-java.basedir" file="${ant.file}"/>
<property name="module.jdk.home.osmand-java" value="${jdk.home.1.6}"/>
<property name="module.jdk.bin.osmand-java" value="${jdk.bin.1.6}"/>
<property name="module.jdk.classpath.osmand-java" value="jdk.classpath.1.6"/>
<property name="compiler.args.osmand-java" value="-encoding UTF-8 -source 1.6 ${compiler.args}"/>
<property name="osmand-java.output.dir" value="${module.osmand-java.basedir}/../OsmAnd-java/bin"/>
<property name="osmand-java.testoutput.dir" value="${module.osmand-java.basedir}/../OsmAnd-java/bin"/>
<path id="osmand-java.module.bootclasspath">
<!-- Paths to be included in compilation bootclasspath -->
</path>
<path id="osmand-java.module.production.classpath">
<path refid="${module.jdk.classpath.osmand-java}"/>
<pathelement location="${basedir}/../OsmAnd-java/libs/bsh-core-2.0b4.jar"/>
<pathelement location="${basedir}/../OsmAnd-java/libs/bzip2-20090327.jar"/>
<pathelement location="${basedir}/../OsmAnd-java/libs/commons-logging-1.1.1.jar"/>
<pathelement location="${basedir}/../OsmAnd-java/libs/json-20090211.jar"/>
<pathelement location="${basedir}/../OsmAnd-java/libs/junidecode-0.1.jar"/>
<pathelement location="${basedir}/../OsmAnd-java/libs/kxml2-2.3.0.jar"/>
<pathelement location="${basedir}/../OsmAnd-java/libs/tuprolog.jar"/>
<pathelement location="${basedir}/../OsmAnd-java/libs/icu4j-49_1.jar"/>
<pathelement location="${basedir}/../OsmAnd-java/libs/gnu-trove-osmand.jar"/>
</path>
<path id="osmand-java.runtime.production.module.classpath">
<pathelement location="${osmand-java.output.dir}"/>
<pathelement location="${basedir}/../OsmAnd-java/libs/bsh-core-2.0b4.jar"/>
<pathelement location="${basedir}/../OsmAnd-java/libs/bzip2-20090327.jar"/>
<pathelement location="${basedir}/../OsmAnd-java/libs/commons-logging-1.1.1.jar"/>
<pathelement location="${basedir}/../OsmAnd-java/libs/json-20090211.jar"/>
<pathelement location="${basedir}/../OsmAnd-java/libs/junidecode-0.1.jar"/>
<pathelement location="${basedir}/../OsmAnd-java/libs/kxml2-2.3.0.jar"/>
<pathelement location="${basedir}/../OsmAnd-java/libs/tuprolog.jar"/>
<pathelement location="${basedir}/../OsmAnd-java/libs/icu4j-49_1.jar"/>
<pathelement location="${basedir}/../OsmAnd-java/libs/gnu-trove-osmand.jar"/>
</path>
<path id="osmand-java.module.classpath">
<pathelement location="${osmand-java.output.dir}"/>
<path refid="${module.jdk.classpath.osmand-java}"/>
<pathelement location="${basedir}/../OsmAnd-java/libs/bsh-core-2.0b4.jar"/>
<pathelement location="${basedir}/../OsmAnd-java/libs/bzip2-20090327.jar"/>
<pathelement location="${basedir}/../OsmAnd-java/libs/commons-logging-1.1.1.jar"/>
<pathelement location="${basedir}/../OsmAnd-java/libs/json-20090211.jar"/>
<pathelement location="${basedir}/../OsmAnd-java/libs/junidecode-0.1.jar"/>
<pathelement location="${basedir}/../OsmAnd-java/libs/kxml2-2.3.0.jar"/>
<pathelement location="${basedir}/../OsmAnd-java/libs/tuprolog.jar"/>
<pathelement location="${basedir}/../OsmAnd-java/libs/icu4j-49_1.jar"/>
<pathelement location="${basedir}/../OsmAnd-java/libs/gnu-trove-osmand.jar"/>
</path>
<path id="osmand-java.runtime.module.classpath">
<pathelement location="${osmand-java.output.dir}"/>
<pathelement location="${basedir}/../OsmAnd-java/libs/bsh-core-2.0b4.jar"/>
<pathelement location="${basedir}/../OsmAnd-java/libs/bzip2-20090327.jar"/>
<pathelement location="${basedir}/../OsmAnd-java/libs/commons-logging-1.1.1.jar"/>
<pathelement location="${basedir}/../OsmAnd-java/libs/json-20090211.jar"/>
<pathelement location="${basedir}/../OsmAnd-java/libs/junidecode-0.1.jar"/>
<pathelement location="${basedir}/../OsmAnd-java/libs/kxml2-2.3.0.jar"/>
<pathelement location="${basedir}/../OsmAnd-java/libs/tuprolog.jar"/>
<pathelement location="${basedir}/../OsmAnd-java/libs/icu4j-49_1.jar"/>
<pathelement location="${basedir}/../OsmAnd-java/libs/gnu-trove-osmand.jar"/>
</path>
<patternset id="excluded.from.module.osmand-java">
<patternset refid="ignored.files"/>
</patternset>
<patternset id="excluded.from.compilation.osmand-java">
<patternset refid="excluded.from.module.osmand-java"/>
</patternset>
<path id="osmand-java.module.sourcepath">
<dirset dir="${module.osmand-java.basedir}/../OsmAnd-java">
<include name="src"/>
</dirset>
</path>
<target name="compile.module.osmand-java" depends="compile.module.osmand-java.production,compile.module.osmand-java.tests" description="Compile module OsmAnd-java"/>
<target name="compile.module.osmand-java.production" depends="register.custom.compilers" description="Compile module OsmAnd-java; production classes">
<mkdir dir="${osmand-java.output.dir}"/>
<javac2 destdir="${osmand-java.output.dir}" debug="${compiler.debug}" nowarn="${compiler.generate.no.warnings}" memorymaximumsize="${compiler.max.memory}" fork="true" executable="${module.jdk.bin.osmand-java}/javac">
<compilerarg line="${compiler.args.osmand-java}"/>
<bootclasspath refid="osmand-java.module.bootclasspath"/>
<classpath refid="osmand-java.module.production.classpath"/>
<src refid="osmand-java.module.sourcepath"/>
<patternset refid="excluded.from.compilation.osmand-java"/>
</javac2>
<copy todir="${osmand-java.output.dir}">
<fileset dir="${module.osmand-java.basedir}/../OsmAnd-java/src">
<patternset refid="compiler.resources"/>
<type type="file"/>
</fileset>
</copy>
</target>
<target name="compile.module.osmand-java.tests" depends="register.custom.compilers,compile.module.osmand-java.production" description="compile module OsmAnd-java; test classes" unless="skip.tests"/>
<target name="clean.module.osmand-java" description="cleanup module">
<delete dir="${osmand-java.output.dir}"/>
<delete dir="${osmand-java.testoutput.dir}"/>
</target>
<!-- Module SherlockBar -->
<dirname property="module.sherlockbar.basedir" file="${ant.file}"/>
<property name="module.jdk.home.sherlockbar" value="${jdk.home.android_api_19_platform}"/>
<property name="module.jdk.bin.sherlockbar" value="${jdk.bin.android_api_19_platform}"/>
<property name="module.jdk.classpath.sherlockbar" value="jdk.classpath.android_api_19_platform"/>
<property name="compiler.args.sherlockbar" value="-encoding UTF-8 -source 1.6 ${compiler.args}"/>
<property name="sherlockbar.output.dir" value="${module.sherlockbar.basedir}/../SherlockBar/bin/classes"/>
<property name="sherlockbar.testoutput.dir" value="${module.sherlockbar.basedir}/../SherlockBar/bin/classes"/>
<path id="sherlockbar.module.bootclasspath">
<!-- Paths to be included in compilation bootclasspath -->
</path>
<path id="sherlockbar.module.production.classpath">
<path refid="${module.jdk.classpath.sherlockbar}"/>
<pathelement location="${basedir}/../SherlockBar/libs/android-support-v4.jar"/>
</path>
<path id="sherlockbar.runtime.production.module.classpath">
<pathelement location="${sherlockbar.output.dir}"/>
<pathelement location="${basedir}/../SherlockBar/libs/android-support-v4.jar"/>
</path>
<path id="sherlockbar.module.classpath">
<path refid="${module.jdk.classpath.sherlockbar}"/>
<pathelement location="${sherlockbar.output.dir}"/>
<pathelement location="${basedir}/../SherlockBar/libs/android-support-v4.jar"/>
</path>
<path id="sherlockbar.runtime.module.classpath">
<pathelement location="${sherlockbar.output.dir}"/>
<pathelement location="${basedir}/../SherlockBar/libs/android-support-v4.jar"/>
</path>
<patternset id="excluded.from.module.sherlockbar">
<patternset refid="ignored.files"/>
</patternset>
<patternset id="excluded.from.compilation.sherlockbar">
<patternset refid="excluded.from.module.sherlockbar"/>
</patternset>
<path id="sherlockbar.module.sourcepath">
<dirset dir="${module.sherlockbar.basedir}/../SherlockBar">
<include name="src"/>
<include name="gen"/>
</dirset>
</path>
<target name="compile.module.sherlockbar" depends="compile.module.sherlockbar.production,compile.module.sherlockbar.tests" description="Compile module SherlockBar"/>
<target name="compile.module.sherlockbar.production" depends="register.custom.compilers" description="Compile module SherlockBar; production classes">
<mkdir dir="${sherlockbar.output.dir}"/>
<javac2 destdir="${sherlockbar.output.dir}" debug="${compiler.debug}" nowarn="${compiler.generate.no.warnings}" memorymaximumsize="${compiler.max.memory}" fork="true" executable="${module.jdk.bin.sherlockbar}/javac">
<compilerarg line="${compiler.args.sherlockbar}"/>
<bootclasspath refid="sherlockbar.module.bootclasspath"/>
<classpath refid="sherlockbar.module.production.classpath"/>
<src refid="sherlockbar.module.sourcepath"/>
<patternset refid="excluded.from.compilation.sherlockbar"/>
</javac2>
<copy todir="${sherlockbar.output.dir}">
<fileset dir="${module.sherlockbar.basedir}/../SherlockBar/src">
<patternset refid="compiler.resources"/>
<type type="file"/>
</fileset>
<fileset dir="${module.sherlockbar.basedir}/../SherlockBar/gen">
<patternset refid="compiler.resources"/>
<type type="file"/>
</fileset>
</copy>
</target>
<target name="compile.module.sherlockbar.tests" depends="register.custom.compilers,compile.module.sherlockbar.production" description="compile module SherlockBar; test classes" unless="skip.tests"/>
<target name="clean.module.sherlockbar" description="cleanup module">
<delete dir="${sherlockbar.output.dir}"/>
<delete dir="${sherlockbar.testoutput.dir}"/>
</target>
<!-- Module OsmAnd -->
<dirname property="module.osmand.basedir" file="${ant.file}"/>
<property name="module.jdk.home.osmand" value="${jdk.home.android_api_19_platform}"/>
<property name="module.jdk.bin.osmand" value="${jdk.bin.android_api_19_platform}"/>
<property name="module.jdk.classpath.osmand" value="jdk.classpath.android_api_19_platform"/>
<property name="compiler.args.osmand" value="-encoding UTF-8 -source 1.6 ${compiler.args}"/>
<property name="osmand.output.dir" value="${module.osmand.basedir}/bin/classes"/>
<property name="osmand.testoutput.dir" value="${module.osmand.basedir}/bin/classes"/>
<path id="osmand.module.bootclasspath">
<!-- Paths to be included in compilation bootclasspath -->
</path>
<path id="osmand.module.production.classpath">
<path refid="${module.jdk.classpath.osmand}"/>
<pathelement location="${sherlockbar.output.dir}"/>
<pathelement location="${basedir}/../../../../Program Files/IntelliJ IDEA Community Edition 13.1.2/jre/jre/bin/$OSMAND_TRUNK$/OsmAnd-java/OsmAnd-core-android.jar"/>
<fileset dir="${basedir}/libs">
<patternset refid="library.patterns"/>
</fileset>
<pathelement location="${osmand-java.output.dir}"/>
<pathelement location="${basedir}/../SherlockBar/libs/android-support-v4.jar"/>
</path>
<path id="osmand.runtime.production.module.classpath">
<pathelement location="${osmand.output.dir}"/>
<path refid="sherlockbar.runtime.production.module.classpath"/>
<pathelement location="${basedir}/../../../../Program Files/IntelliJ IDEA Community Edition 13.1.2/jre/jre/bin/$OSMAND_TRUNK$/OsmAnd-java/OsmAnd-core-android.jar"/>
<fileset dir="${basedir}/libs">
<patternset refid="library.patterns"/>
</fileset>
<path refid="osmand-java.runtime.production.module.classpath"/>
<pathelement location="${basedir}/../SherlockBar/libs/android-support-v4.jar"/>
</path>
<path id="osmand.module.classpath">
<path refid="${module.jdk.classpath.osmand}"/>
<pathelement location="${osmand.output.dir}"/>
<pathelement location="${sherlockbar.output.dir}"/>
<pathelement location="${basedir}/../../../../Program Files/IntelliJ IDEA Community Edition 13.1.2/jre/jre/bin/$OSMAND_TRUNK$/OsmAnd-java/OsmAnd-core-android.jar"/>
<fileset dir="${basedir}/libs">
<patternset refid="library.patterns"/>
</fileset>
<pathelement location="${osmand-java.output.dir}"/>
<pathelement location="${basedir}/../SherlockBar/libs/android-support-v4.jar"/>
</path>
<path id="osmand.runtime.module.classpath">
<pathelement location="${osmand.output.dir}"/>
<path refid="sherlockbar.runtime.module.classpath"/>
<pathelement location="${basedir}/../../../../Program Files/IntelliJ IDEA Community Edition 13.1.2/jre/jre/bin/$OSMAND_TRUNK$/OsmAnd-java/OsmAnd-core-android.jar"/>
<fileset dir="${basedir}/libs">
<patternset refid="library.patterns"/>
</fileset>
<path refid="osmand-java.runtime.module.classpath"/>
<pathelement location="${basedir}/../SherlockBar/libs/android-support-v4.jar"/>
</path>
<patternset id="excluded.from.module.osmand">
<patternset refid="ignored.files"/>
</patternset>
<patternset id="excluded.from.compilation.osmand">
<patternset refid="excluded.from.module.osmand"/>
</patternset>
<path id="osmand.module.sourcepath">
<dirset dir="${module.osmand.basedir}">
<include name="src"/>
<include name="gen"/>
</dirset>
</path>
<target name="compile.module.osmand" depends="compile.module.osmand.production,compile.module.osmand.tests" description="Compile module OsmAnd"/>
<target name="compile.module.osmand.production" depends="register.custom.compilers,compile.module.sherlockbar,compile.module.osmand-java" description="Compile module OsmAnd; production classes">
<mkdir dir="${osmand.output.dir}"/>
<javac2 destdir="${osmand.output.dir}" debug="${compiler.debug}" nowarn="${compiler.generate.no.warnings}" memorymaximumsize="${compiler.max.memory}" fork="true" executable="${module.jdk.bin.osmand}/javac">
<compilerarg line="${compiler.args.osmand}"/>
<bootclasspath refid="osmand.module.bootclasspath"/>
<classpath refid="osmand.module.production.classpath"/>
<src refid="osmand.module.sourcepath"/>
<patternset refid="excluded.from.compilation.osmand"/>
</javac2>
<copy todir="${osmand.output.dir}">
<fileset dir="${module.osmand.basedir}/src">
<patternset refid="compiler.resources"/>
<type type="file"/>
</fileset>
<fileset dir="${module.osmand.basedir}/gen">
<patternset refid="compiler.resources"/>
<type type="file"/>
</fileset>
</copy>
</target>
<target name="compile.module.osmand.tests" depends="register.custom.compilers,compile.module.osmand.production" description="compile module OsmAnd; test classes" unless="skip.tests"/>
<target name="clean.module.osmand" description="cleanup module">
<delete dir="${osmand.output.dir}"/>
<delete dir="${osmand.testoutput.dir}"/>
</target>
<target name="init" description="Build initialization">
<!-- Perform any build initialization in this target -->
</target>
<target name="clean" depends="clean.module.osmand-java, clean.module.sherlockbar, clean.module.osmand" description="cleanup all"/>
<target name="build.modules" depends="init, clean, compile.module.osmand-java, compile.module.sherlockbar, compile.module.osmand" description="build all modules"/>
<target name="all" depends="build.modules" description="build all"/>
</project>

View file

@ -0,0 +1,4 @@
path.variable.maven_repository=C\:\\Users\\Barsik\\.m2\\repository
jdk.home.1.6=G\:/glassfish3/jdk
jdk.home.android_api_19_platform=H\:/Work/Android SDK/adt-bundle-windows-x86_64-20140321/sdk
javac2.instrumentation.includeJavaRuntime=false

View file

@ -0,0 +1,426 @@
<?xml version="1.0" encoding="UTF-8"?>
<project name="osmand" default="all">
<property file="osmand.properties"/>
<!-- Uncomment the following property if no tests compilation is needed -->
<!--
<property name="skip.tests" value="true"/>
-->
<!-- Compiler options -->
<property name="compiler.debug" value="on"/>
<property name="compiler.generate.no.warnings" value="off"/>
<property name="compiler.args" value=""/>
<property name="compiler.max.memory" value="700m"/>
<patternset id="ignored.files">
<exclude name="**/CVS/**"/>
<exclude name="**/SCCS/**"/>
<exclude name="**/RCS/**"/>
<exclude name="**/rcs/**"/>
<exclude name="**/.DS_Store/**"/>
<exclude name="**/.svn/**"/>
<exclude name="**/.pyc/**"/>
<exclude name="**/.pyo/**"/>
<exclude name="**/*.pyc/**"/>
<exclude name="**/*.pyo/**"/>
<exclude name="**/.git/**"/>
<exclude name="**/*.hprof/**"/>
<exclude name="**/_svn/**"/>
<exclude name="**/.hg/**"/>
<exclude name="**/*.lib/**"/>
<exclude name="**/*~/**"/>
<exclude name="**/__pycache__/**"/>
<exclude name="**/.bundle/**"/>
<exclude name="**/*.rbc/**"/>
</patternset>
<patternset id="library.patterns">
<include name="*.zip"/>
<include name="*.apk"/>
<include name="*.war"/>
<include name="*.egg"/>
<include name="*.ear"/>
<include name="*.ane"/>
<include name="*.swc"/>
<include name="*.jar"/>
</patternset>
<patternset id="compiler.resources">
<exclude name="**/?*.java"/>
<exclude name="**/?*.form"/>
<exclude name="**/?*.class"/>
<exclude name="**/?*.groovy"/>
<exclude name="**/?*.scala"/>
<exclude name="**/?*.flex"/>
<exclude name="**/?*.kt"/>
<exclude name="**/?*.clj"/>
</patternset>
<!-- JDK definitions -->
<property name="jdk.bin.1.6" value="${jdk.home.1.6}/bin"/>
<path id="jdk.classpath.1.6">
<fileset dir="${jdk.home.1.6}">
<include name="jre/lib/charsets.jar"/>
<include name="jre/lib/deploy.jar"/>
<include name="jre/lib/javaws.jar"/>
<include name="jre/lib/jce.jar"/>
<include name="jre/lib/jsse.jar"/>
<include name="jre/lib/management-agent.jar"/>
<include name="jre/lib/plugin.jar"/>
<include name="jre/lib/resources.jar"/>
<include name="jre/lib/rt.jar"/>
<include name="jre/lib/ext/dnsns.jar"/>
<include name="jre/lib/ext/localedata.jar"/>
<include name="jre/lib/ext/sunjce_provider.jar"/>
<include name="jre/lib/ext/sunmscapi.jar"/>
</fileset>
</path>
<property name="jdk.bin.android_api_19_platform" value="G:/glassfish3/jdk/bin"/>
<path id="jdk.classpath.android_api_19_platform">
<fileset dir="${jdk.home.android_api_19_platform}">
<include name="platforms/android-19/android.jar"/>
<include name="platforms/android-19/data/res"/>
<include name="tools/support/annotations.jar"/>
</fileset>
</path>
<property name="project.jdk.home" value="${jdk.home.1.6}"/>
<property name="project.jdk.bin" value="${jdk.bin.1.6}"/>
<property name="project.jdk.classpath" value="jdk.classpath.1.6"/>
<!-- Project Libraries -->
<path id="library.libs.classpath">
<pathelement location="${basedir}/libs/bzip2-20090327.jar"/>
<pathelement location="${basedir}/libs/gnu-trove-osmand.jar"/>
<pathelement location="${basedir}/libs/icu4j-49_1.jar"/>
<pathelement location="${basedir}/libs/junidecode-0.1.jar"/>
<pathelement location="${basedir}/libs/tuprolog.jar"/>
<pathelement location="${basedir}/../SherlockBar/libs/android-support-v4.jar"/>
</path>
<!-- Register Custom Compiler Taskdefs -->
<property name="javac2.home" value="${idea.home}/lib"/>
<path id="javac2.classpath">
<pathelement location="${javac2.home}/javac2.jar"/>
<pathelement location="${javac2.home}/jdom.jar"/>
<pathelement location="${javac2.home}/asm4-all.jar"/>
<pathelement location="${javac2.home}/jgoodies-forms.jar"/>
</path>
<target name="register.custom.compilers">
<taskdef name="javac2" classname="com.intellij.ant.Javac2" classpathref="javac2.classpath"/>
<taskdef name="instrumentIdeaExtensions" classname="com.intellij.ant.InstrumentIdeaExtensions" classpathref="javac2.classpath"/>
</target>
<!-- Modules -->
<!-- Module OsmAnd-java -->
<dirname property="module.osmand-java.basedir" file="${ant.file}"/>
<property name="module.jdk.home.osmand-java" value="${jdk.home.1.6}"/>
<property name="module.jdk.bin.osmand-java" value="${jdk.bin.1.6}"/>
<property name="module.jdk.classpath.osmand-java" value="jdk.classpath.1.6"/>
<property name="compiler.args.osmand-java" value="-encoding UTF-8 -source 1.6 ${compiler.args}"/>
<property name="osmand-java.output.dir" value="${module.osmand-java.basedir}/../OsmAnd-java/bin"/>
<property name="osmand-java.testoutput.dir" value="${module.osmand-java.basedir}/../OsmAnd-java/bin"/>
<path id="osmand-java.module.bootclasspath">
<!-- Paths to be included in compilation bootclasspath -->
</path>
<path id="osmand-java.module.production.classpath">
<path refid="${module.jdk.classpath.osmand-java}"/>
<pathelement location="${basedir}/../OsmAnd-java/libs/bsh-core-2.0b4.jar"/>
<pathelement location="${basedir}/../OsmAnd-java/libs/bzip2-20090327.jar"/>
<pathelement location="${basedir}/../OsmAnd-java/libs/commons-logging-1.1.1.jar"/>
<pathelement location="${basedir}/../OsmAnd-java/libs/json-20090211.jar"/>
<pathelement location="${basedir}/../OsmAnd-java/libs/junidecode-0.1.jar"/>
<pathelement location="${basedir}/../OsmAnd-java/libs/kxml2-2.3.0.jar"/>
<pathelement location="${basedir}/../OsmAnd-java/libs/tuprolog.jar"/>
<pathelement location="${basedir}/../OsmAnd-java/libs/icu4j-49_1.jar"/>
<pathelement location="${basedir}/../OsmAnd-java/libs/gnu-trove-osmand.jar"/>
</path>
<path id="osmand-java.runtime.production.module.classpath">
<pathelement location="${osmand-java.output.dir}"/>
<pathelement location="${basedir}/../OsmAnd-java/libs/bsh-core-2.0b4.jar"/>
<pathelement location="${basedir}/../OsmAnd-java/libs/bzip2-20090327.jar"/>
<pathelement location="${basedir}/../OsmAnd-java/libs/commons-logging-1.1.1.jar"/>
<pathelement location="${basedir}/../OsmAnd-java/libs/json-20090211.jar"/>
<pathelement location="${basedir}/../OsmAnd-java/libs/junidecode-0.1.jar"/>
<pathelement location="${basedir}/../OsmAnd-java/libs/kxml2-2.3.0.jar"/>
<pathelement location="${basedir}/../OsmAnd-java/libs/tuprolog.jar"/>
<pathelement location="${basedir}/../OsmAnd-java/libs/icu4j-49_1.jar"/>
<pathelement location="${basedir}/../OsmAnd-java/libs/gnu-trove-osmand.jar"/>
</path>
<path id="osmand-java.module.classpath">
<pathelement location="${osmand-java.output.dir}"/>
<path refid="${module.jdk.classpath.osmand-java}"/>
<pathelement location="${basedir}/../OsmAnd-java/libs/bsh-core-2.0b4.jar"/>
<pathelement location="${basedir}/../OsmAnd-java/libs/bzip2-20090327.jar"/>
<pathelement location="${basedir}/../OsmAnd-java/libs/commons-logging-1.1.1.jar"/>
<pathelement location="${basedir}/../OsmAnd-java/libs/json-20090211.jar"/>
<pathelement location="${basedir}/../OsmAnd-java/libs/junidecode-0.1.jar"/>
<pathelement location="${basedir}/../OsmAnd-java/libs/kxml2-2.3.0.jar"/>
<pathelement location="${basedir}/../OsmAnd-java/libs/tuprolog.jar"/>
<pathelement location="${basedir}/../OsmAnd-java/libs/icu4j-49_1.jar"/>
<pathelement location="${basedir}/../OsmAnd-java/libs/gnu-trove-osmand.jar"/>
</path>
<path id="osmand-java.runtime.module.classpath">
<pathelement location="${osmand-java.output.dir}"/>
<pathelement location="${basedir}/../OsmAnd-java/libs/bsh-core-2.0b4.jar"/>
<pathelement location="${basedir}/../OsmAnd-java/libs/bzip2-20090327.jar"/>
<pathelement location="${basedir}/../OsmAnd-java/libs/commons-logging-1.1.1.jar"/>
<pathelement location="${basedir}/../OsmAnd-java/libs/json-20090211.jar"/>
<pathelement location="${basedir}/../OsmAnd-java/libs/junidecode-0.1.jar"/>
<pathelement location="${basedir}/../OsmAnd-java/libs/kxml2-2.3.0.jar"/>
<pathelement location="${basedir}/../OsmAnd-java/libs/tuprolog.jar"/>
<pathelement location="${basedir}/../OsmAnd-java/libs/icu4j-49_1.jar"/>
<pathelement location="${basedir}/../OsmAnd-java/libs/gnu-trove-osmand.jar"/>
</path>
<patternset id="excluded.from.module.osmand-java">
<patternset refid="ignored.files"/>
</patternset>
<patternset id="excluded.from.compilation.osmand-java">
<patternset refid="excluded.from.module.osmand-java"/>
</patternset>
<path id="osmand-java.module.sourcepath">
<dirset dir="${module.osmand-java.basedir}/../OsmAnd-java">
<include name="src"/>
</dirset>
</path>
<target name="compile.module.osmand-java" depends="compile.module.osmand-java.production,compile.module.osmand-java.tests" description="Compile module OsmAnd-java"/>
<target name="compile.module.osmand-java.production" depends="register.custom.compilers" description="Compile module OsmAnd-java; production classes">
<mkdir dir="${osmand-java.output.dir}"/>
<javac2 destdir="${osmand-java.output.dir}" debug="${compiler.debug}" nowarn="${compiler.generate.no.warnings}" memorymaximumsize="${compiler.max.memory}" fork="true" executable="${module.jdk.bin.osmand-java}/javac">
<compilerarg line="${compiler.args.osmand-java}"/>
<bootclasspath refid="osmand-java.module.bootclasspath"/>
<classpath refid="osmand-java.module.production.classpath"/>
<src refid="osmand-java.module.sourcepath"/>
<patternset refid="excluded.from.compilation.osmand-java"/>
</javac2>
<copy todir="${osmand-java.output.dir}">
<fileset dir="${module.osmand-java.basedir}/../OsmAnd-java/src">
<patternset refid="compiler.resources"/>
<type type="file"/>
</fileset>
</copy>
</target>
<target name="compile.module.osmand-java.tests" depends="register.custom.compilers,compile.module.osmand-java.production" description="compile module OsmAnd-java; test classes" unless="skip.tests"/>
<target name="clean.module.osmand-java" description="cleanup module">
<delete dir="${osmand-java.output.dir}"/>
<delete dir="${osmand-java.testoutput.dir}"/>
</target>
<!-- Module SherlockBar -->
<dirname property="module.sherlockbar.basedir" file="${ant.file}"/>
<property name="module.jdk.home.sherlockbar" value="${jdk.home.android_api_19_platform}"/>
<property name="module.jdk.bin.sherlockbar" value="${jdk.bin.android_api_19_platform}"/>
<property name="module.jdk.classpath.sherlockbar" value="jdk.classpath.android_api_19_platform"/>
<property name="compiler.args.sherlockbar" value="-encoding UTF-8 -source 1.6 ${compiler.args}"/>
<property name="sherlockbar.output.dir" value="${module.sherlockbar.basedir}/../SherlockBar/bin/classes"/>
<property name="sherlockbar.testoutput.dir" value="${module.sherlockbar.basedir}/../SherlockBar/bin/classes"/>
<path id="sherlockbar.module.bootclasspath">
<!-- Paths to be included in compilation bootclasspath -->
</path>
<path id="sherlockbar.module.production.classpath">
<path refid="${module.jdk.classpath.sherlockbar}"/>
<path refid="library.libs.classpath"/>
</path>
<path id="sherlockbar.runtime.production.module.classpath">
<pathelement location="${sherlockbar.output.dir}"/>
<path refid="library.libs.classpath"/>
</path>
<path id="sherlockbar.module.classpath">
<path refid="${module.jdk.classpath.sherlockbar}"/>
<pathelement location="${sherlockbar.output.dir}"/>
<path refid="library.libs.classpath"/>
</path>
<path id="sherlockbar.runtime.module.classpath">
<pathelement location="${sherlockbar.output.dir}"/>
<path refid="library.libs.classpath"/>
</path>
<patternset id="excluded.from.module.sherlockbar">
<patternset refid="ignored.files"/>
</patternset>
<patternset id="excluded.from.compilation.sherlockbar">
<patternset refid="excluded.from.module.sherlockbar"/>
</patternset>
<path id="sherlockbar.module.sourcepath">
<dirset dir="${module.sherlockbar.basedir}/../SherlockBar">
<include name="src"/>
<include name="gen"/>
</dirset>
</path>
<target name="compile.module.sherlockbar" depends="compile.module.sherlockbar.production,compile.module.sherlockbar.tests" description="Compile module SherlockBar"/>
<target name="compile.module.sherlockbar.production" depends="register.custom.compilers" description="Compile module SherlockBar; production classes">
<mkdir dir="${sherlockbar.output.dir}"/>
<javac2 destdir="${sherlockbar.output.dir}" debug="${compiler.debug}" nowarn="${compiler.generate.no.warnings}" memorymaximumsize="${compiler.max.memory}" fork="true" executable="${module.jdk.bin.sherlockbar}/javac">
<compilerarg line="${compiler.args.sherlockbar}"/>
<bootclasspath refid="sherlockbar.module.bootclasspath"/>
<classpath refid="sherlockbar.module.production.classpath"/>
<src refid="sherlockbar.module.sourcepath"/>
<patternset refid="excluded.from.compilation.sherlockbar"/>
</javac2>
<copy todir="${sherlockbar.output.dir}">
<fileset dir="${module.sherlockbar.basedir}/../SherlockBar/src">
<patternset refid="compiler.resources"/>
<type type="file"/>
</fileset>
<fileset dir="${module.sherlockbar.basedir}/../SherlockBar/gen">
<patternset refid="compiler.resources"/>
<type type="file"/>
</fileset>
</copy>
</target>
<target name="compile.module.sherlockbar.tests" depends="register.custom.compilers,compile.module.sherlockbar.production" description="compile module SherlockBar; test classes" unless="skip.tests"/>
<target name="clean.module.sherlockbar" description="cleanup module">
<delete dir="${sherlockbar.output.dir}"/>
<delete dir="${sherlockbar.testoutput.dir}"/>
</target>
<!-- Module OsmAnd -->
<dirname property="module.osmand.basedir" file="${ant.file}"/>
<property name="module.jdk.home.osmand" value="${jdk.home.android_api_19_platform}"/>
<property name="module.jdk.bin.osmand" value="${jdk.bin.android_api_19_platform}"/>
<property name="module.jdk.classpath.osmand" value="jdk.classpath.android_api_19_platform"/>
<property name="compiler.args.osmand" value="-encoding UTF-8 -source 1.6 ${compiler.args}"/>
<property name="osmand.output.dir" value="${module.osmand.basedir}/bin/classes"/>
<property name="osmand.testoutput.dir" value="${module.osmand.basedir}/bin/classes"/>
<path id="osmand.module.bootclasspath">
<!-- Paths to be included in compilation bootclasspath -->
</path>
<path id="osmand.module.production.classpath">
<path refid="${module.jdk.classpath.osmand}"/>
<pathelement location="${sherlockbar.output.dir}"/>
<pathelement location="${osmand-java.output.dir}"/>
<path refid="library.libs.classpath"/>
</path>
<path id="osmand.runtime.production.module.classpath">
<pathelement location="${osmand.output.dir}"/>
<path refid="sherlockbar.runtime.production.module.classpath"/>
<path refid="osmand-java.runtime.production.module.classpath"/>
</path>
<path id="osmand.module.classpath">
<path refid="${module.jdk.classpath.osmand}"/>
<pathelement location="${osmand.output.dir}"/>
<pathelement location="${sherlockbar.output.dir}"/>
<pathelement location="${osmand-java.output.dir}"/>
<path refid="library.libs.classpath"/>
</path>
<path id="osmand.runtime.module.classpath">
<pathelement location="${osmand.output.dir}"/>
<path refid="sherlockbar.runtime.module.classpath"/>
<path refid="osmand-java.runtime.module.classpath"/>
<path refid="library.libs.classpath"/>
</path>
<patternset id="excluded.from.module.osmand">
<patternset refid="ignored.files"/>
</patternset>
<patternset id="excluded.from.compilation.osmand">
<patternset refid="excluded.from.module.osmand"/>
</patternset>
<path id="osmand.module.sourcepath">
<dirset dir="${module.osmand.basedir}">
<include name="src"/>
<include name="gen"/>
</dirset>
</path>
<target name="compile.module.osmand" depends="compile.module.osmand.production,compile.module.osmand.tests" description="Compile module OsmAnd"/>
<target name="compile.module.osmand.production" depends="register.custom.compilers,compile.module.sherlockbar,compile.module.osmand-java" description="Compile module OsmAnd; production classes">
<mkdir dir="${osmand.output.dir}"/>
<javac2 destdir="${osmand.output.dir}" debug="${compiler.debug}" nowarn="${compiler.generate.no.warnings}" memorymaximumsize="${compiler.max.memory}" fork="true" executable="${module.jdk.bin.osmand}/javac">
<compilerarg line="${compiler.args.osmand}"/>
<bootclasspath refid="osmand.module.bootclasspath"/>
<classpath refid="osmand.module.production.classpath"/>
<src refid="osmand.module.sourcepath"/>
<patternset refid="excluded.from.compilation.osmand"/>
</javac2>
<copy todir="${osmand.output.dir}">
<fileset dir="${module.osmand.basedir}/src">
<patternset refid="compiler.resources"/>
<type type="file"/>
</fileset>
<fileset dir="${module.osmand.basedir}/gen">
<patternset refid="compiler.resources"/>
<type type="file"/>
</fileset>
</copy>
</target>
<target name="compile.module.osmand.tests" depends="register.custom.compilers,compile.module.osmand.production" description="compile module OsmAnd; test classes" unless="skip.tests"/>
<target name="clean.module.osmand" description="cleanup module">
<delete dir="${osmand.output.dir}"/>
<delete dir="${osmand.testoutput.dir}"/>
</target>
<target name="init" description="Build initialization">
<!-- Perform any build initialization in this target -->
</target>
<target name="clean" depends="clean.module.osmand-java, clean.module.sherlockbar, clean.module.osmand" description="cleanup all"/>
<target name="build.modules" depends="init, clean, compile.module.osmand-java, compile.module.sherlockbar, compile.module.osmand" description="build all modules"/>
<target name="all" depends="build.modules" description="build all"/>
</project>

View file

@ -0,0 +1,71 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<RelativeLayout android:layout_width="match_parent" android:layout_height="wrap_content">
<Button android:id="@+id/start_tour"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Start tour"/>
<Button android:id="@+id/itenerary"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:text="Itenerary"/>
</RelativeLayout>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >
<TextView
android:id="@+id/tour_name"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:textSize="25sp" >
</TextView>
<TextView
android:id="@+id/tour_description"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="2dp"
android:layout_marginTop="2dp"
android:textSize="18sp" >
</TextView>
<ImageView
android:id="@+id/tour_image"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingLeft="8dp"
android:paddingRight="8dp"
android:paddingTop="4dp" />
<TextView
android:id="@+id/tour_fulldescription"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="2dp"
android:layout_marginTop="2dp"
android:textSize="18sp" >
</TextView>
<Button android:id="@+id/settings"
android:text="Settings"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</LinearLayout>
</ScrollView>
</LinearLayout>

View file

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<Button android:id="@+id/select_tour"
android:layout_centerHorizontal="true"
android:layout_width="wrap_content"
android:text="Select tour"
android:layout_centerVertical="true"
android:layout_height="wrap_content"/>
<Button android:id="@+id/download_tour"
android:layout_below="@+id/select_tour"
android:layout_centerHorizontal="true"
android:layout_width="wrap_content"
android:text="Download tour"
android:layout_height="wrap_content"/>
</RelativeLayout>

View file

@ -43,6 +43,7 @@ import android.view.animation.Animation;
import android.view.animation.Transformation;
import android.view.animation.TranslateAnimation;
import android.widget.TextView;
import net.osmand.plus.sherpafy.SherpafyStartActivity;
public class MainMenuActivity extends Activity {

View file

@ -63,17 +63,19 @@ public class SherpafyCustomization extends OsmAndAppCustomization {
TextView v = (TextView) window.findViewById(R.id.AppName);
v.setText("Sherpafy");
TextView toursButtonText = (TextView) window.findViewById(R.id.SettingsButtonText);
toursButtonText.setText(R.string.tour);
View toursButton = window.findViewById(R.id.SettingsButton);
toursButton.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
final Intent search = new Intent(activity, getTourSelectionActivity());
search.setFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
activity.startActivity(search);
}
});
// TextView toursButtonText = (TextView) window.findViewById(R.id.SettingsButtonText);
// toursButtonText.setText(R.string.tour);
// View toursButton = window.findViewById(R.id.SettingsButton);
// toursButton.setOnClickListener(new OnClickListener() {
// @Override
// public void onClick(View v) {
// final Intent search = new Intent(activity, getTourSelectionActivity());
// search.setFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
// activity.startActivity(search);
// }
// });
// the image could be also updated
}
@ -88,8 +90,8 @@ public class SherpafyCustomization extends OsmAndAppCustomization {
}
public void updatedLoadedFiles(java.util.Map<String,String> indexFileNames, java.util.Map<String,String> indexActivatedFileNames) {
// DownloadIndexActivity.listWithAlternatives(app.getResourceManager().getDateFormat(),
// toursFolder, "", indexFileNames);
DownloadIndexActivity.listWithAlternatives(app.getResourceManager().getDateFormat(),
toursFolder, "", indexFileNames);
}
public List<String> onIndexingFiles(IProgress progress, Map<String, String> indexFileNames) {

View file

@ -0,0 +1,179 @@
package net.osmand.plus.sherpafy;
import android.app.ProgressDialog;
import android.content.Intent;
import android.content.pm.ActivityInfo;
import android.graphics.Bitmap;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView;
import com.actionbarsherlock.app.SherlockFragmentActivity;
import net.osmand.IProgress;
import net.osmand.plus.OsmandApplication;
import net.osmand.plus.R;
import net.osmand.plus.activities.DownloadIndexActivity;
import java.util.List;
import java.util.concurrent.ConcurrentHashMap;
/**
* Created by Barsik on 30.05.2014.
*/
public class SherpafyStartActivity extends SherlockFragmentActivity {
private ProgressDialog startProgressDialog;
private SherpafyCustomization customization;
@Override
protected void onCreate(Bundle savedInstanceState) {
((OsmandApplication) getApplication()).applyTheme(this);
super.onCreate(savedInstanceState);
getSherlock().setUiOptions(ActivityInfo.UIOPTION_SPLIT_ACTION_BAR_WHEN_NARROW);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
getSupportActionBar().setTitle("Sherpafy");
if (!(getMyApplication().getAppCustomization() instanceof SherpafyCustomization)) {
getMyApplication().setAppCustomization(new SherpafyCustomization());
}
customization = (SherpafyCustomization) getMyApplication().getAppCustomization();
if (customization.getTourInformations().isEmpty())
{
customization.onIndexingFiles(new IProgress() {
@Override
public void startTask(String taskName, int work) {
}
@Override
public void startWork(int work) {
}
@Override
public void progress(int deltaWork) {
}
@Override
public void remaining(int remainingWork) {
}
@Override
public void finishTask() {
}
@Override
public boolean isIndeterminate() {
return false;
}
@Override
public boolean isInterrupted() {
return false;
}
}, new ConcurrentHashMap<String, String>() );
}
if (customization.getSelectedTour() == null) {
startProgressDialog = new ProgressDialog(this);
getMyApplication().checkApplicationIsBeingInitialized(this, startProgressDialog);
updateDefaultView();
} else {
super.setContentView(R.layout.custom_tour_info);
updateTourView();
}
}
@Override
protected void onResume() {
super.onResume();
if (customization.getSelectedTour() != null)
{
super.setContentView(R.layout.custom_tour_info);
updateTourView();
}
}
@Override
protected void onPause() {
super.onPause();
}
private OsmandApplication getMyApplication() {
return (OsmandApplication) getApplication();
}
private void updateDefaultView(){
super.setContentView(R.layout.sherpafy_start);
Button selectTour = (Button) findViewById(R.id.select_tour);
selectTour.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
final Intent select = new Intent(v.getContext(), TourCommonActivity.class);
select.setFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
v.getContext().startActivity(select);
}
});
Button downloadTour = (Button) findViewById(R.id.download_tour);
downloadTour.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
final Intent download = new Intent(v.getContext(), DownloadIndexActivity.class);
download.setFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
v.getContext().startActivity(download);
}
});
}
private void updateTourView() {
ImageView img = (ImageView) findViewById(R.id.tour_image);
TextView description = (TextView) findViewById(R.id.tour_description);
TextView fullDescription = (TextView) findViewById(R.id.tour_fulldescription);
TextView name = (TextView) findViewById(R.id.tour_name);
Button start_tour = (Button) findViewById(R.id.start_tour);
Button itenerary = (Button) findViewById(R.id.itenerary);
Button settings = (Button) findViewById(R.id.settings);
settings.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
updateDefaultView();
}
});
TourInformation tour = customization.getSelectedTour();
List<TourInformation.StageInformation> stages = tour.getStageInformation();
name.setText(tour.getName());
description.setText(tour.getShortDescription());
description.setVisibility(View.VISIBLE);
fullDescription.setText(tour.getFulldescription());
fullDescription.setVisibility(View.VISIBLE);
final Bitmap imageBitmap = tour.getImageBitmap();
if (imageBitmap != null) {
img.setImageBitmap(imageBitmap);
img.setAdjustViewBounds(true);
img.setScaleType(ImageView.ScaleType.CENTER_INSIDE);
img.setCropToPadding(true);
img.setVisibility(View.VISIBLE);
} else {
img.setVisibility(View.GONE);
}
}
}

View file

@ -49,10 +49,10 @@ public class TourCommonActivity extends SherlockFragmentActivity {
ViewPager mViewPager = (ViewPager)findViewById(R.id.pager);
mTabsAdapter = new TabsAdapter(this, tabHost, mViewPager);
mTabsAdapter.addTab(tabHost.newTabSpec(TOUR_INFO).setIndicator(getString(R.string.tab_current_tour)),
TourInformationFragment.class, null);
mTabsAdapter.addTab(tabHost.newTabSpec(TOUR_STAGE).setIndicator(getString(R.string.tab_stages)),
TourStageFragment.class, null);
// mTabsAdapter.addTab(tabHost.newTabSpec(TOUR_INFO).setIndicator(getString(R.string.tab_current_tour)),
// TourInformationFragment.class, null);
// mTabsAdapter.addTab(tabHost.newTabSpec(TOUR_STAGE).setIndicator(getString(R.string.tab_stages)),
// TourStageFragment.class, null);
mTabsAdapter.addTab(tabHost.newTabSpec(TOUR_SELECTION).setIndicator(getString(R.string.tab_tours)),
TourSelectionFragment.class, null);
if (savedInstanceState != null) {

View file

@ -4,8 +4,13 @@
package net.osmand.plus.sherpafy;
import java.util.List;
import java.util.concurrent.ConcurrentHashMap;
import android.app.ProgressDialog;
import android.widget.*;
import net.osmand.IProgress;
import net.osmand.plus.OsmandApplication;
import net.osmand.plus.ProgressDialogImplementation;
import net.osmand.plus.R;
import net.osmand.plus.sherpafy.TourCommonActivity.TourFragment;
import android.content.Intent;
@ -13,10 +18,6 @@ import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.ImageView;
import android.widget.ListView;
import android.widget.TextView;
import com.actionbarsherlock.app.SherlockListFragment;
import com.actionbarsherlock.view.Menu;
@ -31,13 +32,13 @@ public class TourSelectionFragment extends SherlockListFragment implements TourF
private SherpafyCustomization appCtx;
private boolean lightContent;
@Override
public void onActivityCreated(Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
appCtx = (SherpafyCustomization) getApp().getAppCustomization();
lightContent = getApp().getSettings().isLightContent();
setHasOptionsMenu(true);
// ListActivity has a ListView, which you can get with:
//ListView lv = getListView();
// Then you can create a listener like so:
@ -77,8 +78,6 @@ public class TourSelectionFragment extends SherlockListFragment implements TourF
final TourInformation tour = ((LocalAdapter) getListAdapter()).getItem(position);
if(appCtx.getSelectedTour() != tour) {
((TourCommonActivity) getActivity()).selectTour(tour);
} else {
((TourCommonActivity) getActivity()).selectTour(null);
}
}

View file

@ -0,0 +1,10 @@
# This file is automatically generated by Android Tools.
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
#
# This file must *NOT* be checked in Version Control Systems,
# as it contains information specific to your local configuration.
# location of the SDK. This is only used by Ant
# For customization when using a Version Control System, please read the
# header note.
sdk.dir=H:\\Work\\Android SDK\\adt-bundle-windows-x86_64-20140321\\sdk\\

View file

@ -19,9 +19,9 @@
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/gen" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/gen" isTestSource="false" generated="true" />
</content>
<orderEntry type="jdk" jdkName="Android 4.1.2 Platform" jdkType="Android SDK" />
<orderEntry type="jdk" jdkName="Android API 19 Platform" jdkType="Android SDK" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

View file

@ -14,7 +14,7 @@ import android.os.Bundle;
public class SherpafyPluginActivity extends Activity {
private static final String OSMAND_COMPONENT = "net.osmand"; //$NON-NLS-1$
private static final String OSMAND_COMPONENT_PLUS = "net.osmand.plus"; //$NON-NLS-1$
private static final String OSMAND_ACTIVITY = "net.osmand.plus.activities.MainMenuActivity"; //$NON-NLS-1$
private static final String OSMAND_ACTIVITY = "net.osmand.plus.sherpafy.SherpafyStartActivity"; //$NON-NLS-1$
/** Called when the activity is first created. */
@Override
@ -28,7 +28,6 @@ public class SherpafyPluginActivity extends Activity {
ResolveInfo resolved = getPackageManager().resolveActivity(intentPlus, PackageManager.MATCH_DEFAULT_ONLY);
if(resolved != null) {
stopService(intentPlus);
intentPlus.putExtra("SHERPAFY", true);
startActivity(intentPlus);
finish();
} else {