forked from sky-map-team/stardroid
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update the calibration dialog. (sky-map-team#453)
* Change the calibration video. * Reword the calibration dialog, especially when it's user-initiated and move the text out of the html to make it translatable. * Updates the calibration dialog again. Provides a landscape version. Have been unable to get the imaged properly centered though and need to test this on different form factors. * Remove the code that hacked the calibration dialog's appearance. * Crop the image a bit.
- Loading branch information
Showing
8 changed files
with
145 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<html style="margin: 0;"> | ||
<body"> | ||
<!-- To work around Android's rubbish animated gif support --> | ||
<img src="file:///android_asset/html/calib.gif"/> | ||
</body> | ||
</html> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
89 changes: 89 additions & 0 deletions
89
app/src/main/res/layout-land/activity_compass_calibration.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<androidx.core.widget.NestedScrollView | ||
xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:tools="http://schemas.android.com/tools" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
android:paddingBottom="@dimen/activity_vertical_margin" | ||
android:paddingLeft="@dimen/activity_horizontal_margin" | ||
android:paddingRight="@dimen/activity_horizontal_margin" | ||
android:paddingTop="@dimen/activity_vertical_margin" | ||
tools:context="com.google.android.stardroid.activities.CompassCalibrationActivity"> | ||
<LinearLayout | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
android:orientation="horizontal"> | ||
|
||
<WebView | ||
android:id="@+id/compass_calib_activity_webview" | ||
android:layout_width="0dp" | ||
android:layout_height="wrap_content" | ||
android:layout_weight="1" | ||
android:background="@android:color/white" /> | ||
|
||
<LinearLayout | ||
android:layout_width="0dp" | ||
android:layout_height="wrap_content" | ||
android:orientation="vertical" | ||
android:padding="@dimen/text_margin" | ||
android:layout_weight="2"> | ||
|
||
<TextView | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:textAppearance="?android:attr/textAppearanceLarge" | ||
android:text="@string/compass_calibration_activity_warning" | ||
android:id="@+id/compass_calib_activity_explain_why"/> | ||
|
||
<LinearLayout | ||
android:orientation="horizontal" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content"> | ||
|
||
<TextView | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:textAppearance="?android:attr/textAppearanceMedium" | ||
android:text="@string/compass_calibration_activity_heading_compass" | ||
/> | ||
|
||
<TextView | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:textAppearance="?android:attr/textAppearanceMedium" | ||
android:id="@+id/compass_calib_activity_compass_accuracy" | ||
android:text="accuracy: unknown" | ||
android:paddingBottom="10dp" | ||
android:paddingLeft="5dp" | ||
android:paddingTop="5dp" | ||
android:paddingRight="5dp"/> | ||
|
||
</LinearLayout> | ||
|
||
<TextView | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:textAppearance="?android:attr/textAppearanceMedium" | ||
android:text="@string/compass_calibration_activity_warning" | ||
android:autoLink="web" | ||
android:id="@+id/compass_calib_what_to_do"/> | ||
|
||
<CheckBox | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:text="@string/compass_calibration_activity_do_not_show_this_again" | ||
android:id="@+id/compass_calib_activity_donotshow"/> | ||
|
||
<Button | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:text="@android:string/ok" | ||
android:layout_gravity="center_horizontal" | ||
android:nestedScrollingEnabled="false" | ||
android:onClick="onOkClicked"/> | ||
|
||
</LinearLayout> | ||
|
||
|
||
</LinearLayout> | ||
</androidx.core.widget.NestedScrollView> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters