Skip to content

Commit

Permalink
Merge pull request sky-map-team#70 from sky-map-team/fixlayoutandcolo…
Browse files Browse the repository at this point in the history
…roftimetraveldialog

A quick fix to the timetravel dialog.  On some devices it was showing…
  • Loading branch information
jaydeetay committed Mar 9, 2016
2 parents 0023b4b + e721076 commit 874e82a
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 59 deletions.
91 changes: 33 additions & 58 deletions app/src/main/res/layout/time_dialog.xml
Original file line number Diff line number Diff line change
@@ -1,63 +1,42 @@
<?xml version="1.0" encoding="utf-8"?>

<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:stardroid="http://schemas.android.com/apk/res-auto"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/time_dialog_view"
android:background="#00000000"
android:theme="@android:style/Theme.Black"
android:orientation="vertical"
>

<!-- Display the date where the user is right now. -->
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:theme="@android:style/Theme.Black"
android:orientation="horizontal"
android:gravity="center"
android:id="@+id/time_dialog_view"
android:orientation="vertical"
android:paddingLeft="5dip"
android:paddingBottom="10dip">
android:paddingTop="5dip"
android:minWidth="350dip">

<!-- Display the date where the user is right now. -->
<TextView
android:id="@+id/dateDisplay"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/now_visiting"/>
</LinearLayout>
android:id="@+id/dateDisplay"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/now_visiting"
android:paddingBottom="5dip"/>

<!-- Popular dates prompt and drop down -->
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/popular_dates_prompt"
android:paddingLeft="5dip"
android:paddingBottom="5dip"
/>
<!-- Popular dates prompt and drop down -->
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/popular_dates_prompt"
android:paddingBottom="5dip"
android:paddingTop="5dip"/>

<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<LinearLayout
android:layout_height="fill_parent"
android:layout_width="10px"/>
<Spinner
android:id="@+id/popular_dates_spinner"
android:layout_weight="1"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:prompt="@string/popular_dates_prompt"
/>
</LinearLayout>
android:id="@+id/popular_dates_spinner"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:prompt="@string/popular_dates_prompt"/>

<!-- Custom date prompt -->
<!-- Custom date prompt -->
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/custom_date_prompt"
android:paddingLeft="5dip"
android:paddingTop="15dip"
android:paddingBottom="5dip"
/>
Expand All @@ -69,46 +48,42 @@
android:orientation="horizontal"
android:paddingLeft="5dip"
android:paddingRight="5dip"
>
android:gravity="center_horizontal">

<!-- Setting width to 0px and weight to 1 ensures that width is the same for both buttons. -->
<Button android:id="@+id/pickDate"
android:layout_height="wrap_content"
android:layout_width="0px"
android:layout_weight="1"
android:layout_width="wrap_content"
android:text="@string/change_date_prompt"
/>
android:singleLine="true"/>

<Button android:id="@+id/pickTime"
android:layout_height="wrap_content"
android:layout_width="0px"
android:layout_weight="1"
android:layout_width="wrap_content"
android:text="@string/change_time_prompt"
android:singleLine="true"
/>
</LinearLayout>

<!-- Bottom bar with "Go" and "Cancel" buttons. -->
<LinearLayout
android:layout_width="wrap_content"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="@android:drawable/bottom_bar"
android:orientation="horizontal"
android:paddingTop="5dip"
android:paddingLeft="5dip"
android:paddingRight="5dip"
>
android:gravity="center_horizontal">

<Button android:id="@+id/timeTravelGo"
android:layout_height="wrap_content"
android:layout_width="100px"
android:layout_weight="1"
android:layout_width="wrap_content"
android:text="@string/go"
/>

<Button android:id="@+id/timeTravelCancel"
android:layout_height="wrap_content"
android:layout_width="100px"
android:layout_weight="1"
android:layout_width="wrap_content"
android:text="@string/cancel"
/>

Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
<string name="time_travel_close_message">Back to the present ...</string>
<!-- -->
<string name="popular_dates_prompt" translation_description="Label for a list of dates the user can choose from">Popular dates</string>
<string name="custom_date_prompt" translation_description="Label telling the user to manually specify a date">Or select your own date</string>
<string name="custom_date_prompt" translation_description="Label telling the user to manually specify a date">Or select your own date:</string>
<string name="change_date_prompt">Change the date</string>
<string name="change_time_prompt">Change the time</string>
<string name="now_visiting"
Expand Down

0 comments on commit 874e82a

Please sign in to comment.