Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?xml version="1.0" encoding="utf-8"?>
- <!--Layout File-->
- <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"
- tools:context="com.example.varmee.weatherapp.MainActivity"
- android:background="@drawable/download">
- <!-- Setting the Image which we wanna use for Background of our app-->
- <TextView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="Enter a City"
- android:textSize="50dp"
- android:textColor="@color/colorPrimary"
- android:id="@+id/textView"
- android:layout_alignParentTop="true"
- android:layout_centerHorizontal="true" />
- <EditText
- android:layout_width="230dp"
- android:layout_height="45dp"
- android:id="@+id/cityname"
- android:layout_below="@+id/textView"
- android:layout_alignLeft="@+id/textView"
- android:layout_alignStart="@+id/textView"
- android:layout_marginTop="45dp" />
- <Button
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="What's the weather."
- android:id="@+id/button"
- android:onClick="findtheweather"
- android:layout_centerVertical="true"
- android:layout_centerHorizontal="true" />
- <!--using onClick to call the method we codded in main Activity earlier -->
- <TextView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:id="@+id/result"
- android:layout_marginTop="74dp"
- android:layout_below="@+id/button"
- android:layout_centerHorizontal="true" />
- </RelativeLayout>
Add Comment
Please, Sign In to add comment