Skip to content

Instantly share code, notes, and snippets.

@erdalkaymak
Created July 5, 2021 12:46
Show Gist options
  • Select an option

  • Save erdalkaymak/74f2c038e30a95bf3e9ef1f7a9398a27 to your computer and use it in GitHub Desktop.

Select an option

Save erdalkaymak/74f2c038e30a95bf3e9ef1f7a9398a27 to your computer and use it in GitHub Desktop.
<androidx.cardview.widget.CardView 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:layout_width="match_parent"
android:layout_height="wrap_content"
app:cardElevation="2dp"
android:elevation="10dp"
app:cardBackgroundColor="@color/colorEditTextBackground">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:orientation="horizontal"
android:weightSum="2">
<ImageView
android:id="@+id/img_weather_hourly"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_gravity="center"
android:layout_marginStart="30dp"
android:layout_marginTop="10dp"
android:layout_marginBottom="10dp" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginStart="30dp"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="left"
android:orientation="horizontal"
android:weightSum="2"
tools:ignore="RtlHardcoded">
<TextView
android:id="@+id/txt_hour"
android:layout_width="60dp"
android:layout_height="wrap_content"
style="@style/TextAppearance.HiA.Body1"
android:layout_weight="1"
/>
<TextView
android:id="@+id/txt_rain_probability"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="left"
style="@style/TextAppearance.HiA.Body1"
/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="start"
android:orientation="horizontal"
android:weightSum="2">
<TextView
android:id="@+id/txt_tempC"
android:layout_width="60dp"
android:layout_height="wrap_content"
android:layout_weight="1"
style="@style/TextAppearance.HiA.Body1"
/>
<TextView
android:id="@+id/txt_tempF"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="start"
style="@style/TextAppearance.HiA.Body1"
/>
</LinearLayout>
</LinearLayout>
</LinearLayout>
</androidx.cardview.widget.CardView>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment