Skip to content

Commit

Permalink
fixed nav bar bottom padding for apod list items
Browse files Browse the repository at this point in the history
  • Loading branch information
llopisdon committed Dec 21, 2021
1 parent 9c3d619 commit 5ef3dba
Show file tree
Hide file tree
Showing 2 changed files with 77 additions and 68 deletions.
4 changes: 3 additions & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

141 changes: 74 additions & 67 deletions app/src/main/res/layout/list_item_apod.xml
Original file line number Diff line number Diff line change
@@ -1,86 +1,93 @@
<?xml version="1.0" encoding="utf-8"?>
<com.google.android.material.card.MaterialCardView
xmlns:android="http://schemas.android.com/apk/res/android"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:card_view="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
xmlns:card_view="http://schemas.android.com/apk/res-auto"
android:clickable="false"
android:focusable="true"
android:checkable="false"
android:id="@+id/apod"
android:layout_margin="8dp"
card_view:cardCornerRadius="16dp">
android:orientation="vertical">

<LinearLayout
<com.google.android.material.card.MaterialCardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="@dimen/apod_list_item_height"
android:orientation="vertical">
android:clickable="false"
android:focusable="true"
android:checkable="false"
android:id="@+id/apod"
android:layout_margin="8dp"
card_view:cardCornerRadius="16dp">

<FrameLayout
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
android:layout_height="wrap_content"
android:minHeight="@dimen/apod_list_item_height"
android:orientation="vertical">

<ImageView
android:id="@+id/image"
<FrameLayout
android:layout_width="match_parent"
android:layout_height="196dp"
android:scaleType="centerCrop"
tools:src="@drawable/donald_giannatti_very_large_array_socorro_usa_unsplash_1232x820_blur" />
android:layout_height="wrap_content">

<ImageView
android:id="@+id/video_indicator"
android:layout_width="@dimen/video_indicator_size"
android:layout_height="@dimen/video_indicator_size"
android:src="@drawable/ic_baseline_play_circle_filled_24"
card_view:tint="@color/video_indicator_tint"
android:layout_gravity="center" />
<ImageView
android:id="@+id/image"
android:layout_width="match_parent"
android:layout_height="196dp"
android:scaleType="centerCrop"
tools:src="@drawable/donald_giannatti_very_large_array_socorro_usa_unsplash_1232x820_blur" />

</FrameLayout>
<ImageView
android:id="@+id/video_indicator"
android:layout_width="@dimen/video_indicator_size"
android:layout_height="@dimen/video_indicator_size"
android:src="@drawable/ic_baseline_play_circle_filled_24"
card_view:tint="@color/video_indicator_tint"
android:layout_gravity="center" />

<TextView
android:id="@+id/title"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="start|center_vertical"
android:textAppearance="?attr/textAppearanceHeadline5"
android:autoSizeTextType="uniform"
android:autoSizeMaxTextSize="36sp"
android:paddingStart="16dp"
android:paddingEnd="16dp"
android:paddingTop="8dp"
android:paddingBottom="4dp"
tools:text="TITLE GOES HERE"/>
</FrameLayout>

<TextView
android:id="@+id/date"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="start|center_vertical"
android:textAppearance="?attr/textAppearanceSubtitle1"
android:autoSizeTextType="uniform"
android:autoSizeMaxTextSize="36sp"
android:layout_marginBottom="8dp"
android:paddingStart="16dp"
tools:text="06.16.1995"/>
<TextView
android:id="@+id/title"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="start|center_vertical"
android:textAppearance="?attr/textAppearanceHeadline5"
card_view:autoSizeTextType="uniform"
card_view:autoSizeMaxTextSize="36sp"
android:paddingStart="16dp"
android:paddingEnd="16dp"
android:paddingTop="8dp"
android:paddingBottom="4dp"
tools:text="TITLE GOES HERE"/>

<View
android:id="@+id/bottom_spacer"
android:layout_width="match_parent"
android:layout_height="@dimen/bottom_nav_bar_height"
android:background="?colorSurface"
android:visibility="invisible"
tools:visibility="visible"
tools:background="#f0f" />
<TextView
android:id="@+id/date"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="start|center_vertical"
android:textAppearance="?attr/textAppearanceSubtitle1"
card_view:autoSizeTextType="uniform"
card_view:autoSizeMaxTextSize="36sp"
android:layout_marginBottom="8dp"
android:paddingStart="16dp"
android:paddingEnd="16dp"
tools:text="06.16.1995"/>

<View
android:layout_width="0dp"
android:layout_height="0dp" />
<View
android:layout_width="0dp"
android:layout_height="0dp" />

<View
android:layout_width="0dp"
android:layout_height="0dp" />
<View
android:layout_width="0dp"
android:layout_height="0dp" />
</LinearLayout>

</LinearLayout>
</com.google.android.material.card.MaterialCardView>

<View
android:id="@+id/bottom_spacer"
android:layout_width="match_parent"
android:layout_height="@dimen/bottom_nav_bar_height"
android:background="?colorSurface"
android:visibility="invisible"
tools:visibility="visible"
tools:background="#f0f" />

</com.google.android.material.card.MaterialCardView>
</LinearLayout>

0 comments on commit 5ef3dba

Please sign in to comment.