Skip to content

new feature add calibration support #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added res/drawable-hdpi/calibrate_1.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 res/drawable-hdpi/calibrate_2.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 res/drawable-hdpi/calibrate_3.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 res/drawable-hdpi/calibrate_4.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 res/drawable-hdpi/calibrate_5.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 res/drawable-hdpi/calibrate_6.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 res/drawable-hdpi/calibrate_7.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 res/drawable-hdpi/guide.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 res/drawable-xhdpi/app_icon.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 res/drawable-xhdpi/background_bottom.9.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 res/drawable-xhdpi/background_compass.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 res/drawable-xhdpi/background_light.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 res/drawable-xhdpi/background_texture.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 res/drawable-xhdpi/calibrate_1.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 res/drawable-xhdpi/calibrate_2.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 res/drawable-xhdpi/calibrate_3.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 res/drawable-xhdpi/calibrate_4.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 res/drawable-xhdpi/calibrate_5.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 res/drawable-xhdpi/calibrate_6.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 res/drawable-xhdpi/calibrate_7.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 res/drawable-xhdpi/compass.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 res/drawable-xhdpi/degree.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 res/drawable-xhdpi/e.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 res/drawable-xhdpi/guide.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 res/drawable-xhdpi/miui_cover.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 res/drawable-xhdpi/n.png
Binary file added res/drawable-xhdpi/number_0.png
Binary file added res/drawable-xhdpi/number_1.png
Binary file added res/drawable-xhdpi/number_2.png
Binary file added res/drawable-xhdpi/number_3.png
Binary file added res/drawable-xhdpi/number_4.png
Binary file added res/drawable-xhdpi/number_5.png
Binary file added res/drawable-xhdpi/number_6.png
Binary file added res/drawable-xhdpi/number_7.png
Binary file added res/drawable-xhdpi/number_8.png
Binary file added res/drawable-xhdpi/number_9.png
Binary file added res/drawable-xhdpi/prompt.png
Binary file added res/drawable-xhdpi/s.png
Binary file added res/drawable-xhdpi/w.png
File renamed without changes
Binary file added res/drawable-zh-rCN-hdpi/guide.png
File renamed without changes
File renamed without changes
File renamed without changes
Binary file added res/drawable-zh-rCN-xhdpi/compass.png
Binary file added res/drawable-zh-rCN-xhdpi/e.png
Binary file added res/drawable-zh-rCN-xhdpi/guide.png
Binary file added res/drawable-zh-rCN-xhdpi/n.png
Binary file added res/drawable-zh-rCN-xhdpi/s.png
Binary file added res/drawable-zh-rCN-xhdpi/w.png
Binary file added res/drawable-zh-rTW-hdpi/compass.png
Binary file added res/drawable-zh-rTW-hdpi/e.png
Binary file added res/drawable-zh-rTW-hdpi/guide.png
Binary file added res/drawable-zh-rTW-hdpi/n.png
Binary file added res/drawable-zh-rTW-hdpi/s.png
Binary file added res/drawable-zh-rTW-hdpi/w.png
Binary file added res/drawable-zh-rTW-xhdpi/compass.png
Binary file added res/drawable-zh-rTW-xhdpi/e.png
Binary file added res/drawable-zh-rTW-xhdpi/guide.png
Binary file added res/drawable-zh-rTW-xhdpi/n.png
Binary file added res/drawable-zh-rTW-xhdpi/s.png
Binary file added res/drawable-zh-rTW-xhdpi/w.png
11 changes: 11 additions & 0 deletions res/drawable/calibrate_animation.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<animation-list android:oneshot="false"
xmlns:android="http://schemas.android.com/apk/res/android">
<item android:duration="250" android:drawable="@drawable/calibrate_1" />
<item android:duration="250" android:drawable="@drawable/calibrate_2" />
<item android:duration="250" android:drawable="@drawable/calibrate_3" />
<item android:duration="250" android:drawable="@drawable/calibrate_4" />
<item android:duration="250" android:drawable="@drawable/calibrate_5" />
<item android:duration="250" android:drawable="@drawable/calibrate_6" />
<item android:duration="250" android:drawable="@drawable/calibrate_7" />
</animation-list>
33 changes: 23 additions & 10 deletions res/layout/main.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>

<!-- Copyright (c) 2010-2011, The MiCode Open Source Community (www.micode.net)
<!--
Copyright (c) 2010-2011, The MiCode Open Source Community (www.micode.net)

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -131,13 +131,26 @@
</LinearLayout>
</FrameLayout>

<include
android:id="@+id/low_accuracy_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|center_horizontal"
android:layout_marginBottom="35dip"
layout="@*android:layout/transient_notification"
android:visibility="gone" />
<FrameLayout
android:id="@+id/view_guide"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:visibility="gone" >

<ImageView
android:id="@+id/guide_description"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:background="@drawable/guide" />

<ImageView
android:id="@+id/guide_animation"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="top|center"
android:layout_marginTop="195.0dip"
android:src="@drawable/calibrate_animation" />
</FrameLayout>

</FrameLayout>
4 changes: 2 additions & 2 deletions res/values-zh-rCN/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android">

<string name="app_label">指南针</string>
<string name="getting_location">正在获取经纬度...</string>
<string name="getting_location">正在获取经纬度&#8230;</string>
<string name="cannot_get_location">无法获取经纬度</string>
<string name="location_north">北纬 %s</string>
<string name="location_south">南纬 %sS</string>
<string name="location_east">东经 %s</string>
<string name="location_west">西经 %s</string>

<string name="calibrate_success">校准成功</string>
</resources>
28 changes: 28 additions & 0 deletions res/values-zh-rTW/strings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="utf-8"?>

<!-- Copyright (c) 2010-2011, The MiCode Open Source Community (www.micode.net)

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

<resources xmlns:android="http://schemas.android.com/apk/res/android">

<string name="app_label">指南针</string>
<string name="getting_location">正在讀取經緯度&#8230;</string>
<string name="cannot_get_location">無法讀取經緯度</string>
<string name="location_north">北 %s</string>
<string name="location_south">南 %sS</string>
<string name="location_east">东 %s</string>
<string name="location_west">西 %s</string>
<string name="calibrate_success">校正成功</string>
</resources>
4 changes: 2 additions & 2 deletions res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android">

<string name="app_label">Compass</string>
<string name="getting_location">Getting location...</string>
<string name="getting_location">Getting location&#8230;</string>
<string name="cannot_get_location">Cannot get your location</string>
<string name="location_north">%s N</string>
<string name="location_south">%s S</string>
<string name="location_east">%s E</string>
<string name="location_west">%s W</string>

<string name="calibrate_success">Calibration complete</string>
</resources>
Loading