ucme316

Untitled

Oct 25th, 2016
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 2.04 KB | None | 0 0
  1. <?xml version="1.0" encoding="utf-8"?>
  2.  
  3. <!--Layout File-->
  4.  
  5. <RelativeLayout
  6.    xmlns:android="http://schemas.android.com/apk/res/android"
  7.    xmlns:tools="http://schemas.android.com/tools"
  8.    android:layout_width="match_parent"
  9.    android:layout_height="match_parent"
  10.    android:paddingLeft="@dimen/activity_horizontal_margin"
  11.    android:paddingRight="@dimen/activity_horizontal_margin"
  12.    android:paddingTop="@dimen/activity_vertical_margin"
  13.    android:paddingBottom="@dimen/activity_vertical_margin"
  14.    tools:context="com.example.varmee.weatherapp.MainActivity"
  15.    android:background="@drawable/download">
  16.  
  17. <!-- Setting the Image which we wanna use for Background of our app-->
  18.     <TextView
  19.        android:layout_width="wrap_content"
  20.        android:layout_height="wrap_content"
  21.        android:text="Enter a City"
  22.        android:textSize="50dp"
  23.        android:textColor="@color/colorPrimary"
  24.        android:id="@+id/textView"
  25.        android:layout_alignParentTop="true"
  26.        android:layout_centerHorizontal="true" />
  27.  
  28.     <EditText
  29.        android:layout_width="230dp"
  30.        android:layout_height="45dp"
  31.        android:id="@+id/cityname"
  32.        android:layout_below="@+id/textView"
  33.        android:layout_alignLeft="@+id/textView"
  34.        android:layout_alignStart="@+id/textView"
  35.        android:layout_marginTop="45dp" />
  36.  
  37.     <Button
  38.        android:layout_width="wrap_content"
  39.        android:layout_height="wrap_content"
  40.        android:text="What's the weather."
  41.        android:id="@+id/button"
  42.        android:onClick="findtheweather"
  43.        android:layout_centerVertical="true"
  44.        android:layout_centerHorizontal="true" />
  45.  
  46.     <!--using onClick to call the method we codded in main Activity earlier -->
  47.  
  48.     <TextView
  49.        android:layout_width="wrap_content"
  50.        android:layout_height="wrap_content"
  51.        android:id="@+id/result"
  52.        android:layout_marginTop="74dp"
  53.        android:layout_below="@+id/button"
  54.        android:layout_centerHorizontal="true" />
  55.  
  56. </RelativeLayout>
Add Comment
Please, Sign In to add comment