item_forecast.xml 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <LinearLayout
  3. xmlns:android="http://schemas.android.com/apk/res/android"
  4. xmlns:tools="http://schemas.android.com/tools"
  5. android:layout_width="match_parent"
  6. android:layout_height="wrap_content"
  7. android:background="?attr/selectableItemBackground"
  8. android:gravity="center_vertical"
  9. android:orientation="horizontal"
  10. android:padding="@dimen/spacing_xlarge">
  11. <ImageView
  12. android:id="@+id/icon"
  13. android:layout_width="48dp"
  14. android:layout_height="48dp"
  15. tools:src="@mipmap/ic_launcher"/>
  16. <LinearLayout
  17. android:layout_width="0dp"
  18. android:layout_height="wrap_content"
  19. android:layout_marginLeft="@dimen/spacing_xlarge"
  20. android:layout_marginRight="@dimen/spacing_xlarge"
  21. android:layout_weight="1"
  22. android:orientation="vertical">
  23. <TextView
  24. android:id="@+id/date"
  25. android:layout_width="match_parent"
  26. android:layout_height="wrap_content"
  27. android:textAppearance="@style/TextAppearance.AppCompat.Medium"
  28. tools:text="May 14, 2015"/>
  29. <TextView
  30. android:id="@+id/description"
  31. android:layout_width="match_parent"
  32. android:layout_height="wrap_content"
  33. android:textAppearance="@style/TextAppearance.AppCompat.Caption"
  34. tools:text="Light Rain"/>
  35. </LinearLayout>
  36. <LinearLayout
  37. android:layout_width="wrap_content"
  38. android:layout_height="wrap_content"
  39. android:gravity="center_horizontal"
  40. android:orientation="vertical">
  41. <TextView
  42. android:id="@+id/maxTemperature"
  43. android:layout_width="wrap_content"
  44. android:layout_height="wrap_content"
  45. android:textAppearance="@style/TextAppearance.AppCompat.Medium"
  46. tools:text="30º"/>
  47. <TextView
  48. android:id="@+id/minTemperature"
  49. android:layout_width="wrap_content"
  50. android:layout_height="wrap_content"
  51. android:textAppearance="@style/TextAppearance.AppCompat.Caption"
  52. tools:text="15º"/>
  53. </LinearLayout>
  54. </LinearLayout>