Skip to content

Instantly share code, notes, and snippets.

@haristhohir
Created May 22, 2015 22:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save haristhohir/94f36bb77555c03e8801 to your computer and use it in GitHub Desktop.
Save haristhohir/94f36bb77555c03e8801 to your computer and use it in GitHub Desktop.
<!-- Master layout. -->
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="16dp">
<!-- Header: Day, Date -->
<TextView
android:id="@+id/detail_day_textview"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Tomorrow" />
<TextView
android:id="@+id/detail_date_textview"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="June 24"/>
<!-- Main content: high, low, art, weather state -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="16dp"
android:orientation="horizontal">
<LinearLayout
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:id="@+id/detail_high_textview"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="21°"/>
<TextView
android:id="@+id/detail_low_textview"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="11°" />
</LinearLayout>
<LinearLayout
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:orientation="vertical">
<ImageView
android:id="@+id/detail_icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_launcher" />
<TextView
android:id="@+id/detail_forecast_textview"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Clear" />
</LinearLayout>
</LinearLayout>
<!-- Humidity, wind, pressure -->
<TextView
android:id="@+id/detail_humidity_textview"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="48%" />
<TextView
android:id="@+id/detail_wind_textview"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="6 km/h NW" />
<TextView
android:id="@+id/detail_pressure_textview"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="1014" />
</LinearLayout>
</ScrollView>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment