Skip to content

Instantly share code, notes, and snippets.

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

  • Save erdalkaymak/1b6e85f8ea3dd2bf355cbbc1fe6d4035 to your computer and use it in GitHub Desktop.

Select an option

Save erdalkaymak/1b6e85f8ea3dd2bf355cbbc1fe6d4035 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="3">
<ImageView
android:id="@+id/img_weather"
android:layout_width="60dp"
android:layout_height="70dp"
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_wind_speed"
android:layout_width="60dp"
android:layout_height="wrap_content"
android:layout_weight="1"
style="@style/TextAppearance.HiA.Body1"
/>
<TextView
android:id="@+id/txt_day_name"
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_wind_direction"
android:layout_width="60dp"
android:layout_height="wrap_content"
android:layout_weight="1"
style="@style/TextAppearance.HiA.Body1"
/>
<TextView
android:id="@+id/txt_moon_phase"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="start"
style="@style/TextAppearance.HiA.Body1"
/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:weightSum="2">
<TextView
android:id="@+id/txt_min_temp"
android:layout_width="60dp"
android:layout_height="wrap_content"
android:layout_weight="1"
style="@style/TextAppearance.HiA.Body1"
/>
<TextView
android:id="@+id/txt_max_temp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
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