Skip to content

Instantly share code, notes, and snippets.

@placidrod
Created June 24, 2015 05:37
Show Gist options
  • Select an option

  • Save placidrod/5c8ca58edd41532818be to your computer and use it in GitHub Desktop.

Select an option

Save placidrod/5c8ca58edd41532818be to your computer and use it in GitHub Desktop.
Sunshine first layout without list view
<RelativeLayout 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:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:paddingBottom="@dimen/activity_vertical_margin"
android:background="@android:color/white"
tools:context=".MainActivity$PlaceholderFragment">
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignParentBottom="true"
android:weightSum="1">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
android:text="Today, June 24"
android:id="@+id/textView" />
<LinearLayout
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:weightSum="1"
android:layout_marginTop="15dp">
<LinearLayout
android:orientation="vertical"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceLarge"
android:text="21 &#176;"
android:id="@+id/textView2" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
android:text="8 &#176;"
android:id="@+id/textView3"
android:layout_marginTop="15dp" />
</LinearLayout>
<ImageView
android:layout_width="68dp"
android:layout_height="81dp"
android:id="@+id/imageView"
android:src="@drawable/android_logo" />
</LinearLayout>
</LinearLayout>
</RelativeLayout>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment