Skip to content

Instantly share code, notes, and snippets.

@omayib
Last active December 7, 2017 06:07
Show Gist options
  • Save omayib/43e17c4c3b43c591fcca46ccbb9603ea to your computer and use it in GitHub Desktop.
Save omayib/43e17c4c3b43c591fcca46ccbb9603ea to your computer and use it in GitHub Desktop.
a alyout for displaying the current weather (kuliah pemrograman mobil android amikom yogyakarta)
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:background="#11bcff"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="id.technomotion.simpleweatherapps.MainActivity">
<SearchView
android:elevation="20dp"
android:layout_margin="8dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true"
android:background="#d7d7d7"
android:id="@+id/searchView" />
<TextView
android:id="@+id/textView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignStart="@+id/searchView"
android:layout_below="@+id/searchView"
android:layout_marginTop="18dp"
android:layout_marginBottom="18dp"
android:text="Kamis, 7 Desember 2017" />
<LinearLayout
android:layout_below="@+id/textView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:weightSum="2"
android:orientation="horizontal">
<LinearLayout
android:layout_width="0dp"
android:layout_weight="1"
android:gravity="center"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:id="@+id/textView3"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:gravity="top"
android:textSize="32pt"
android:text="24" />
<TextView
android:id="@+id/textView4"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:gravity="top"
android:text="0"
android:textSize="12pt" />
<TextView
android:id="@+id/textView5"
android:gravity="top"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:textSize="22pt"
android:text="C" />
</LinearLayout>
<LinearLayout
android:layout_width="0dp"
android:layout_weight="1"
android:gravity="center"
android:layout_height="match_parent"
android:orientation="vertical">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/cloudpartial"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="4dp"
android:text="clear sky"/>
</LinearLayout>
</LinearLayout>
</RelativeLayout>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment