aboutsummaryrefslogtreecommitdiffstats
path: root/res/layout/forecast_activity.xml
diff options
context:
space:
mode:
Diffstat (limited to 'res/layout/forecast_activity.xml')
-rw-r--r--res/layout/forecast_activity.xml212
1 files changed, 212 insertions, 0 deletions
diff --git a/res/layout/forecast_activity.xml b/res/layout/forecast_activity.xml
new file mode 100644
index 0000000..77840f5
--- /dev/null
+++ b/res/layout/forecast_activity.xml
@@ -0,0 +1,212 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2013 David van Tonder
+
+ 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.
+-->
+<LinearLayout 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:gravity="center"
+ android:orientation="vertical"
+ android:fitsSystemWindows="true" >
+
+ <!-- This linearlayout is used to display a 'fake' dialog box over the
+ full screen background. This is neccesary to be able to show over
+ the lock screen -->
+ <LinearLayout
+ android:layout_width="@dimen/forecast_dialog_width"
+ android:layout_height="wrap_content"
+ android:background="@drawable/dialog_full_holo_dark"
+ android:gravity="center_vertical"
+ android:orientation="vertical" >
+
+ <RelativeLayout
+ android:layout_width="match_parent"
+ android:layout_height="48dp"
+ android:gravity="center_horizontal">
+
+ <TextView
+ android:id="@+id/weather_source"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:gravity="center|center_horizontal"
+ android:singleLine="true"
+ android:textAppearance="?android:attr/textAppearanceMedium" />
+
+ <ImageView
+ android:id="@+id/weather_refresh"
+ android:layout_width="wrap_content"
+ android:layout_height="match_parent"
+ android:layout_alignParentRight="true"
+ android:layout_centerVertical="true"
+ android:padding="8dp"
+ android:src="@drawable/ic_menu_refresh_holo_dark"
+ android:background="?android:attr/selectableItemBackground" />
+ </RelativeLayout>
+
+ <ImageView
+ android:layout_width="match_parent"
+ android:layout_height="1dip"
+ android:paddingTop="4dip"
+ android:background="@android:drawable/divider_horizontal_dark" />
+
+ <RelativeLayout
+ android:id="@+id/current_view"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="vertical"
+ android:paddingTop="4dip" >
+
+ <ImageView
+ android:id="@+id/weather_image"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_centerHorizontal="true"
+ android:padding="4dip"
+ android:gravity="center"
+ android:src="@android:drawable/ic_dialog_alert" />
+
+ <RelativeLayout
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_centerVertical="true"
+ android:layout_toLeftOf="@id/weather_image"
+ android:orientation="horizontal"
+ android:padding="4dip" >
+
+ <TextView
+ android:id="@+id/weather_city"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_centerHorizontal="true"
+ android:ellipsize="marquee"
+ android:gravity="center_horizontal"
+ android:maxLines="2"
+ android:textColor="?android:attr/textColorPrimary"
+ android:textSize="14sp"
+ android:textStyle="bold" />
+
+ <TextView
+ android:id="@+id/update_time"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_below="@id/weather_city"
+ android:layout_centerHorizontal="true"
+ android:gravity="center_horizontal"
+ android:textColor="?android:attr/textColorSecondary"
+ android:textSize="10sp" />
+ </RelativeLayout>
+
+ <RelativeLayout
+ android:id="@+id/weather_temps_panel"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_centerVertical="true"
+ android:layout_toRightOf="@id/weather_image"
+ android:orientation="horizontal" >
+
+ <TextView
+ android:id="@+id/weather_temp"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_centerHorizontal="true"
+ android:textAppearance="?android:attr/textAppearanceLarge" />
+
+ <ImageView
+ android:id="@+id/weather_divider"
+ android:layout_below="@id/weather_temp"
+ android:layout_width="44dip"
+ android:layout_height="1dip"
+ android:layout_centerHorizontal="true"
+ android:background="@android:drawable/divider_horizontal_dark" />
+
+ <TextView
+ android:id="@+id/weather_low_high"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_below="@id/weather_divider"
+ android:layout_centerHorizontal="true"
+ android:paddingTop="2dip"
+ android:textSize="12sp"
+ android:textColor="?android:attr/textColorPrimary" />
+ </RelativeLayout>
+
+ <TextView
+ android:id="@+id/weather_condition"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_below="@id/weather_image"
+ android:layout_centerHorizontal="true"
+ android:ellipsize="marquee"
+ android:singleLine="true"
+ android:textAppearance="?android:attr/textAppearanceMedium"
+ android:paddingBottom="8dp" />
+ </RelativeLayout>
+
+ <LinearLayout
+ android:id="@+id/forecast_view"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginLeft="12dip"
+ android:layout_marginRight="12dip"
+ android:paddingBottom="16dp"
+ android:gravity="center_horizontal"
+ android:orientation="horizontal" />
+
+ <ProgressBar
+ android:id="@+id/progress_indicator"
+ android:layout_width="match_parent"
+ android:layout_height="48dp"
+ android:gravity="center" />
+
+ <TextView
+ android:id="@+id/no_network"
+ android:layout_width="match_parent"
+ android:layout_height="48dp"
+ android:gravity="center"
+ android:textAppearance="?android:attr/textAppearanceSmall"
+ android:padding="8dp"
+ android:visibility="gone" />
+
+ <LinearLayout android:id="@+id/buttonPanel"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:minHeight="48dp"
+ android:orientation="vertical"
+ android:divider="?android:attr/dividerHorizontal"
+ android:showDividers="beginning"
+ android:dividerPadding="0dip">
+
+ <LinearLayout
+ style="?android:attr/buttonBarStyle"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="horizontal"
+ android:layoutDirection="locale"
+ android:measureWithLargestChild="true">
+
+ <Button android:id="@+id/button"
+ android:layout_width="0dip"
+ android:layout_gravity="center_horizontal"
+ android:layout_weight="1"
+ android:maxLines="2"
+ android:text="@string/menu_done"
+ style="?android:attr/buttonBarButtonStyle"
+ android:textSize="14sp"
+ android:minHeight="48dp"
+ android:layout_height="wrap_content" />
+ </LinearLayout>
+ </LinearLayout>
+ </LinearLayout>
+</LinearLayout>