Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?xml version="1.0" encoding="utf-8"?>
- <layout 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"
- tools:context=".ui.detail.DetailFragment">
- <data>
- <variable
- name="movie"
- type="com.sample.android.tmdb.vo.Movie" />
- <variable
- name="vm"
- type="com.sample.android.tmdb.ui.detail.MovieDetailViewModel" />
- </data>
- <android.support.constraint.motion.MotionLayout
- android:id="@+id/details_motion"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- app:layoutDescription="@xml/scene_show_details">
- <ImageView
- android:id="@+id/details_backdrop"
- android:layout_width="0dp"
- android:layout_height="0dp"
- android:scaleType="centerCrop"
- app:imageUrl="@{movie.backdropPath}"
- tools:ignore="ContentDescription" />
- <View
- android:id="@+id/details_backdrop_scrim"
- android:layout_width="0dp"
- android:layout_height="0dp"
- app:layout_constraintBottom_toBottomOf="@id/details_backdrop"
- app:layout_constraintEnd_toEndOf="@id/details_backdrop"
- app:layout_constraintStart_toStartOf="@id/details_backdrop"
- app:layout_constraintTop_toTopOf="@id/details_backdrop" />
- <android.support.v7.widget.AppCompatImageView
- android:id="@+id/details_poster"
- android:layout_width="0dp"
- android:layout_height="0dp"
- android:background="@drawable/placeholder"
- android:scaleType="centerCrop"
- android:transformPivotX="0px"
- android:transformPivotY="0px"
- android:transitionName="@string/view_name_header_image"
- app:imageUrl="@{movie.posterPath}" />
- <!-- Needed to fill a rounding error gap in MotionLayout. See https://issuetracker.google.com/112728689 -->
- <View
- android:id="@+id/details_gap_filler"
- android:layout_width="match_parent"
- android:layout_height="2px"
- android:background="@color/window_background"
- app:layout_constraintBottom_toTopOf="@id/details_rv"
- tools:ignore="PxUsage" />
- <com.sample.android.tmdb.widget.TopLeftCutoutBackgroundView
- android:id="@+id/details_appbar_background"
- android:layout_width="0dp"
- android:layout_height="0dp"
- app:backgroundColor="@color/window_background"
- app:topLeftCutSize="@dimen/details_corner_cutout" />
- <android.support.v7.widget.AppCompatTextView
- android:id="@+id/details_title"
- android:layout_width="0dp"
- android:layout_height="0dp"
- android:ellipsize="end"
- android:text="@{movie.title}"
- android:textAppearance="@style/TextAppearance.AppCompat.Title"
- android:transitionName="@string/view_name_header_title" />
- <android.support.v7.widget.Toolbar
- android:id="@+id/details_toolbar"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:minHeight="?attr/actionBarSize"
- app:theme="@style/Toolbar" />
- <android.support.v4.widget.NestedScrollView
- android:id="@+id/details_rv"
- android:layout_width="0dp"
- android:layout_height="0dp"
- android:background="@color/window_background"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintEnd_toEndOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toBottomOf="@id/details_appbar_background">
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:orientation="vertical">
- <TextView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_marginLeft="@dimen/padding_normal"
- android:layout_marginTop="@dimen/padding_normal"
- android:layout_marginRight="@dimen/padding_normal"
- android:layout_marginBottom="@dimen/padding_micro"
- android:fontFamily="sans-serif-light"
- android:text="@{@string/release_date(movie.releaseDate)}"
- android:textAppearance="@style/TextAppearance.AppCompat.Small" />
- <TextView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_marginLeft="@dimen/padding_normal"
- android:layout_marginRight="@dimen/padding_normal"
- android:fontFamily="sans-serif-light"
- android:text="@{@string/rating(movie.voteAverage)}"
- android:textAppearance="@style/TextAppearance.AppCompat.Small" />
- <TextView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_marginLeft="@dimen/padding_normal"
- android:layout_marginTop="@dimen/padding_large"
- android:layout_marginRight="@dimen/padding_normal"
- android:text="@string/summary"
- android:textAppearance="@style/TextAppearance.AppCompat.Title" />
- <TextView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_margin="@dimen/padding_normal"
- android:fontFamily="sans-serif-light"
- android:text="@{movie.overview}"
- android:textAppearance="@style/TextAppearance.AppCompat.Body1" />
- <include
- layout="@layout/trailers"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_marginLeft="@dimen/padding_normal"
- android:layout_marginTop="@dimen/padding_normal"
- android:layout_marginBottom="@dimen/padding_normal"
- app:vm="@{vm}"
- tools:ignore="RtlHardcoded" />
- <TextView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_marginLeft="@dimen/padding_normal"
- android:layout_marginRight="@dimen/padding_normal"
- android:layout_marginBottom="12dp"
- android:text="@string/actors"
- android:textAppearance="@style/TextAppearance.AppCompat.Title"
- app:visibleGone="@{vm.isActorsVisible}" />
- <android.support.v7.widget.RecyclerView
- android:id="@+id/actors"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- app:items="@{vm.casts}"
- app:layout_behavior="@string/appbar_scrolling_view_behavior" />
- </LinearLayout>
- </android.support.v4.widget.NestedScrollView>
- <!-- This needs to be updated to use WindowInsets. See https://issuetracker.google.com/issues/112605433 -->
- <View
- android:id="@+id/details_status_bar_anchor"
- android:layout_width="match_parent"
- android:layout_height="24dp"
- android:background="@color/status_bar_scrim_translucent_dark" />
- </android.support.constraint.motion.MotionLayout>
- </layout>
Add Comment
Please, Sign In to add comment