Skip to content

Commit

Permalink
高德demo
Browse files Browse the repository at this point in the history
  • Loading branch information
dongweiq committed Jun 4, 2015
1 parent 3d50ca6 commit cbc78f6
Show file tree
Hide file tree
Showing 34 changed files with 1,281 additions and 0 deletions.
9 changes: 9 additions & 0 deletions NavDemo/.classpath
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="gen"/>
<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.DEPENDENCIES"/>
<classpathentry kind="output" path="bin/classes"/>
</classpath>
33 changes: 33 additions & 0 deletions NavDemo/.project
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>NavDemo</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>
2 changes: 2 additions & 0 deletions NavDemo/.settings/org.eclipse.core.resources.prefs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
eclipse.preferences.version=1
encoding/<project>=UTF-8
4 changes: 4 additions & 0 deletions NavDemo/.settings/org.eclipse.jdt.core.prefs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
org.eclipse.jdt.core.compiler.compliance=1.6
org.eclipse.jdt.core.compiler.source=1.6
46 changes: 46 additions & 0 deletions NavDemo/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.honghe.navdemo"
android:versionCode="1"
android:versionName="1.0" >

<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="22" />

<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name" >
<meta-data
android:name="com.amap.api.v2.apikey"
android:value="e68942233ad546daad325dc9a0c3bf73" />

<activity
android:name="com.honghe.navdemo.activity.MainActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".activity.SimpleHudActivity"
android:screenOrientation="sensorLandscape" >
</activity>
</application>

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.CHANGE_CONFIGURATION" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.WRITE_SETTINGS" />

</manifest>
Binary file added NavDemo/ic_launcher-web.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added NavDemo/libs/AMap_3DMap_V2.4.1.jar
Binary file not shown.
Binary file added NavDemo/libs/Android_Location_V1.3.2.jar
Binary file not shown.
Binary file added NavDemo/libs/Android_Navi_V1.1.2.jar
Binary file not shown.
Binary file added NavDemo/libs/Msc.jar
Binary file not shown.
Binary file added NavDemo/libs/android-support-v4.jar
Binary file not shown.
Binary file added NavDemo/libs/armeabi/libamapv304.so
Binary file not shown.
Binary file added NavDemo/libs/armeabi/libamapv304ex.so
Binary file not shown.
Binary file added NavDemo/libs/armeabi/libmsc.so
Binary file not shown.
Binary file added NavDemo/libs/armeabi/libtbt.so
Binary file not shown.
Binary file added NavDemo/libs/armeabi/libwtbt.so
Binary file not shown.
20 changes: 20 additions & 0 deletions NavDemo/proguard-project.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# To enable ProGuard in your project, edit project.properties
# to define the proguard.config property as described in that file.
#
# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in ${sdk.dir}/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the ProGuard
# include property in project.properties.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html

# Add any project specific keep options here:

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
14 changes: 14 additions & 0 deletions NavDemo/project.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# This file is automatically generated by Android Tools.
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
#
# This file must be checked in Version Control Systems.
#
# To customize properties used by the Ant build system edit
# "ant.properties", and override values to adapt the script to your
# project structure.
#
# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):
#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt

# Project target.
target=android-22
Binary file added NavDemo/res/drawable-hdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added NavDemo/res/drawable-mdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added NavDemo/res/drawable-xhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added NavDemo/res/drawable-xxhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
123 changes: 123 additions & 0 deletions NavDemo/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/activity_vertical_margin" >

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/activity_horizontal_margin"
android:text="@string/navi_start" />

<TextView
android:id="@+id/start_position_textview"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/activity_horizontal_margin"
android:text="39.989614, 116.481763" />
</LinearLayout>

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/activity_vertical_margin" >

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/activity_horizontal_margin"
android:text="@string/navi_end" />

<TextView
android:id="@+id/end_position_textview"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/activity_horizontal_margin"
android:text="39.989614, 116.481763" />
</LinearLayout>

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/activity_vertical_margin" >

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/activity_horizontal_margin"
android:text="@string/navi_empty_car" />

<Button
android:id="@+id/car_navi_route"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/activity_horizontal_margin"
android:text="@string/navibar_title" />

<Button
android:id="@+id/car_navi_hud_navi"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/start_hud_navi" />

<Button
android:id="@+id/car_navi_emulator"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/navi_navi"
android:visibility="gone" />

<Button
android:id="@+id/car_navi_navi"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/start_navi_navi"
android:visibility="gone" />
</LinearLayout>

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/activity_vertical_margin" >

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/activity_horizontal_margin"
android:text="@string/navi_empty_foot" />

<Button
android:id="@+id/foot_navi_route"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/activity_horizontal_margin"
android:text="@string/navibar_title" />

<Button
android:id="@+id/foot_navi_emulator"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/navi_navi"
android:visibility="gone" />

<Button
android:id="@+id/foot_navi_navi"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/start_navi_navi"
android:visibility="gone" />
</LinearLayout>

<com.amap.api.maps.MapView
android:id="@+id/simple_route_map"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1" />

</LinearLayout>
19 changes: 19 additions & 0 deletions NavDemo/res/layout/activity_simple_hud.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal" >

<com.honghe.navdemo.view.PathView
android:id="@+id/pathView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1" />

<com.amap.api.navi.AMapHudView
android:id="@+id/hudview"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1" />

</LinearLayout>
7 changes: 7 additions & 0 deletions NavDemo/res/values/dimens.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<resources>

<!-- Default screen margins, per the Android Design guidelines. -->
<dimen name="activity_horizontal_margin">16dp</dimen>
<dimen name="activity_vertical_margin">16dp</dimen>

</resources>
94 changes: 94 additions & 0 deletions NavDemo/res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>

<string name="app_name">NavDemo</string>
<string name="hello_world">Hello world!</string>
<string name="action_settings">Settings</string>
<string name="start_title">示例代码</string>
<string name="base_function">基本功能</string>
<string name="hud_title">HUD显示</string>
<string name="extend_title">扩展功能</string>
<string name="extend_navi_navi">自定义导航</string>
<string name="navibar_title">路径规划</string>
<string name="navi_car">驾车</string>
<string name="navi_foot">步行</string>
<string name="start_hud_navi">HUD显示</string>
<string name="complex_function">综合展示</string>
<string name="navi_empty_car">"驾 车"</string>
<string name="navi_empty_foot">"步 行"</string>
<string name="navi_start">"起 点"</string>
<string name="navi_middle">途经点</string>
<string name="navi_end">"终 点"</string>
<string name="navi_strategy">"策 略"</string>
<string name="navi_route">路径规划</string>
<string name="navi_navi">模拟导航</string>
<string name="start_navi_navi">实时导航</string>
<string name="navi_strategy_speed">速度最快</string>
<string name="navi_strategy_cost">避免收费</string>
<string name="navi_strategy_distance">距离最短</string>
<string name="navi_strategy_nohighway">不走高速快速路</string>
<string name="navi_strategy_timenojam">时间最短且躲避拥堵</string>
<string name="navi_strategy_costnojam">避免收费且躲避拥堵</string>
<string name="theme_blue">经典蓝</string>
<string name="theme_pink">可爱粉</string>
<string name="theme_white">简约白</string>
<string name="setting">设置</string>
<string name="day">白天</string>
<string name="night">夜间</string>
<string name="yes">" 是 "</string>
<string name="no">" 否 "</string>
<string name="open">打开</string>
<string name="close">关闭</string>
<string name="daynightmode">"昼夜模式 "</string>
<string name="deviationrecalculation">"偏航重算 "</string>
<string name="jamrecalculation">"拥堵重算 "</string>
<string name="trafficbroadcast">"交通播报 "</string>
<string name="camerabroadcast">摄像头播报</string>
<string name="screenon">"屏幕常亮 "</string>
<string name="routeshow">线路展示</string>
<string name="tapmap">点击地图设置</string>
<string name="starttapmap">我的位置(可点击地图设置)</string>
<string name="walkdescription">步行状态不可用</string>
<string name="routeinfo">全程 --公里/--分钟 收费 --元</string>
<string name="routeinfo_1">全程 </string>
<string name="routeinfo_2">公里/</string>
<string name="routeinfo_3">"分钟 收费"</string>
<string name="routeinfo_4">元</string>
<string name="routeinfo_default">--</string>
<string name="app_id">输入您讯飞的appid</string>
<string name="mypoistion">我的位置</string>
<string name="mappoistion">地图点选</string>
<string name="positioninfo">位置信息</string>

<string-array name="preference_values_tts_role">
z <item>xiaoyan</item>
<item>xiaoyu</item>
<item>vixy</item>
<item>vixq</item>
<item>vixf</item>
<item>vixm</item>
<item>vixl</item>
<item>vixr</item>
<item>vixyun</item>
<item>vixk</item>
<item>vixqa</item>
<item>vixying</item>
<item>vixx</item>
<item>vinn</item>
<item>vils</item>
</string-array>

<string name="preference_default_tts_role">xiaoyan</string>
<string name="preference_key_tts_speed">tts_speed</string>
<string name="preference_title_tts_speed">语速</string>
<string name="preference_default_tts_speed">50</string>
<string name="preference_dialog_title_tts_speed">选择语速</string>
<string name="preference_key_tts_volume">tts_volume</string>
<string name="preference_title_tts_volume">音量</string>
<string name="preference_default_tts_volume">50</string>
<string name="preference_dialog_title_tts_volume">选择音量</string>
<string name="preference_key_tts_pitch">tts_pitch</string>
<string name="preference_title_tts_pitch">语调</string>
<string name="preference_default_tts_pitch">50</string>

</resources>
4 changes: 4 additions & 0 deletions NavDemo/res/values/styles.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<resources>


</resources>
Loading

0 comments on commit cbc78f6

Please sign in to comment.