Advertisement
Guest User

Layout

a guest
May 8th, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MXML 8.01 KB | None | 0 0
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
  3.    xmlns:app="http://schemas.android.com/apk/res-auto"
  4.    xmlns:tools="http://schemas.android.com/tools"
  5.    android:layout_width="match_parent"
  6.    android:layout_height="match_parent"
  7.    tools:context=".activities.MainActivity">
  8.  
  9.     <TextView
  10.        android:id="@+id/tvLocationName"
  11.        android:layout_width="match_parent"
  12.        android:layout_height="wrap_content"
  13.        android:text="@string/location"
  14.        android:theme="@style/StyleLocation" />
  15.  
  16.     <LinearLayout
  17.        android:layout_width="match_parent"
  18.        android:layout_height="match_parent"
  19.        android:layout_marginTop="@dimen/circle_margin"
  20.        android:orientation="vertical"
  21.        app:layout_constraintTop_toBottomOf="@+id/tvLocationName">
  22.  
  23.         <android.support.constraint.ConstraintLayout
  24.            android:id="@+id/circleLayout"
  25.            android:layout_width="match_parent"
  26.            android:layout_height="0dp"
  27.            android:layout_margin="@dimen/circle_margin"
  28.            android:layout_weight="1">
  29.  
  30.             <ImageView
  31.                android:id="@+id/imgCircle"
  32.                android:layout_width="wrap_content"
  33.                android:layout_height="wrap_content"
  34.                android:src="@drawable/circle_shape"
  35.                app:layout_constraintLeft_toLeftOf="parent"
  36.                app:layout_constraintRight_toRightOf="parent"
  37.                app:layout_constraintTop_toTopOf="parent" />
  38.  
  39.             <ImageView
  40.                android:id="@+id/imgWeatherCircle"
  41.                android:layout_width="@dimen/image_size"
  42.                android:layout_height="@dimen/image_size"
  43.                android:layout_marginTop="@dimen/circle_margin"
  44.                android:src="@drawable/sunny"
  45.                app:layout_constraintLeft_toLeftOf="parent"
  46.                app:layout_constraintRight_toRightOf="parent"
  47.                app:layout_constraintTop_toTopOf="parent" />
  48.  
  49.             <TextView
  50.                android:id="@+id/tvTemperatureCircle"
  51.                android:layout_width="wrap_content"
  52.                android:layout_height="wrap_content"
  53.                android:layout_below="@+id/imgWeatherCircle"
  54.                android:layout_centerHorizontal="true"
  55.                android:layout_marginBottom="@dimen/temp_padding_bottom"
  56.                android:text="@string/temp"
  57.                android:theme="@style/StyleTitleInfo"
  58.                app:layout_constraintBottom_toBottomOf="@id/imgCircle"
  59.                app:layout_constraintLeft_toLeftOf="@id/imgCircle"
  60.                app:layout_constraintRight_toRightOf="@id/imgCircle" />
  61.  
  62.             <TextView
  63.                android:id="@+id/tvDateCircle"
  64.                android:layout_width="wrap_content"
  65.                android:layout_height="wrap_content"
  66.                android:layout_below="@+id/imgWeatherCircle"
  67.                android:layout_marginBottom="@dimen/space_between_items"
  68.                android:layout_marginEnd="@dimen/circle_margin"
  69.                android:text="@string/date"
  70.                android:theme="@style/StyleTitleInfo"
  71.                app:layout_constraintBottom_toBottomOf="parent"
  72.                app:layout_constraintBottom_toTopOf="@+id/tvTemperatureCircle"
  73.                app:layout_constraintRight_toRightOf="@id/imgCircle" />
  74.  
  75.             <TextView
  76.                android:id="@+id/tvDayCircle"
  77.                android:layout_width="wrap_content"
  78.                android:layout_height="wrap_content"
  79.                android:layout_marginBottom="@dimen/space_between_items"
  80.                android:layout_marginStart="@dimen/circle_margin"
  81.                android:text="@string/day"
  82.                android:theme="@style/StyleTitleInfo"
  83.                app:layout_constraintBottom_toBottomOf="parent"
  84.                app:layout_constraintBottom_toTopOf="@+id/tvTemperatureCircle"
  85.                app:layout_constraintLeft_toLeftOf="parent"
  86.                app:layout_constraintStart_toStartOf="@id/imgCircle" />
  87.  
  88.  
  89.         </android.support.constraint.ConstraintLayout>
  90.  
  91.         <android.support.constraint.ConstraintLayout
  92.            android:id="@+id/infoLayout"
  93.            android:layout_width="match_parent"
  94.            android:layout_height="0dp"
  95.            android:layout_weight="1">
  96.  
  97.             <TextView
  98.                android:id="@+id/tvPrecipitationTitle"
  99.                android:layout_width="wrap_content"
  100.                android:layout_height="wrap_content"
  101.                android:layout_marginStart="@dimen/item_padding"
  102.                android:text="@string/precipitation"
  103.                android:theme="@style/StyleTitleInfo"
  104.                app:layout_constraintLeft_toLeftOf="parent" />
  105.  
  106.             <TextView
  107.                android:id="@+id/tvPrecipitation"
  108.                android:layout_width="wrap_content"
  109.                android:layout_height="wrap_content"
  110.                android:layout_marginStart="@dimen/item_padding"
  111.                android:layout_marginTop="@dimen/space_between_items"
  112.                android:text="@string/precipitation"
  113.                android:theme="@style/StyleInfo"
  114.                app:layout_constraintLeft_toLeftOf="parent"
  115.                app:layout_constraintTop_toBottomOf="@+id/tvPrecipitationTitle" />
  116.  
  117.             <TextView
  118.                android:id="@+id/tvHumidityTitle"
  119.                android:layout_width="wrap_content"
  120.                android:layout_height="wrap_content"
  121.                android:layout_marginStart="@dimen/space_between_items"
  122.                android:text="@string/humidity"
  123.                android:theme="@style/StyleTitleInfo"
  124.                app:layout_constraintLeft_toLeftOf="parent"
  125.                app:layout_constraintRight_toRightOf="parent"
  126.                app:layout_constraintTop_toTopOf="parent" />
  127.  
  128.             <TextView
  129.                android:id="@+id/tvHumidity"
  130.                android:layout_width="wrap_content"
  131.                android:layout_height="wrap_content"
  132.                android:layout_marginStart="@dimen/space_between_items"
  133.                android:layout_marginTop="@dimen/space_between_items"
  134.                android:text="@string/humidity"
  135.                android:theme="@style/StyleInfo"
  136.                app:layout_constraintLeft_toLeftOf="parent"
  137.                app:layout_constraintRight_toRightOf="parent"
  138.                app:layout_constraintTop_toBottomOf="@+id/tvHumidityTitle" />
  139.  
  140.             <TextView
  141.                android:id="@+id/tvWindTitle"
  142.                android:layout_width="wrap_content"
  143.                android:layout_height="wrap_content"
  144.                android:layout_marginEnd="@dimen/item_padding"
  145.                android:text="@string/wind"
  146.                android:theme="@style/StyleTitleInfo"
  147.                app:layout_constraintRight_toRightOf="parent" />
  148.  
  149.             <TextView
  150.                android:id="@+id/tvWind"
  151.                android:layout_width="wrap_content"
  152.                android:layout_height="wrap_content"
  153.                android:layout_marginEnd="@dimen/item_padding"
  154.                android:layout_marginTop="@dimen/space_between_items"
  155.                android:text="@string/wind"
  156.                android:theme="@style/StyleInfo"
  157.                app:layout_constraintRight_toRightOf="parent"
  158.                app:layout_constraintTop_toBottomOf="@+id/tvWindTitle" />
  159.  
  160.             <com.devsmart.android.ui.HorizontalListView
  161.                android:id="@+id/hlistview"
  162.                android:layout_width="match_parent"
  163.                android:layout_height="match_parent"
  164.                android:layout_marginTop="@dimen/space_between_items"
  165.                android:scrollbars="horizontal"
  166.                app:layout_constraintBottom_toBottomOf="parent"
  167.                app:layout_constraintTop_toBottomOf="@+id/tvPrecipitation" />
  168.  
  169.  
  170.         </android.support.constraint.ConstraintLayout>
  171.     </LinearLayout>
  172.  
  173. </android.support.constraint.ConstraintLayout>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement