Skip to content

Instantly share code, notes, and snippets.

@VDenis
Created October 31, 2015 12:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save VDenis/8680dcd06b47b8f7cea3 to your computer and use it in GitHub Desktop.
Save VDenis/8680dcd06b47b8f7cea3 to your computer and use it in GitHub Desktop.
Popular Movie App Stage 1, duplicate my textviews, imageviews when scrolling
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout
android:id="@+id/details_view_container"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
tools:showIn="@layout/activity_details_view"
tools:context="com.denis.home.popularmovies.DetailsViewActivity">
</FrameLayout>
<ScrollView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent">
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
>
<TextView
android:id="@+id/detail_movie_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/colorAccent"
android:padding="30dp"
android:textColor="@android:color/primary_text_dark"
android:textSize="24sp"
tools:text="@string/debug_text"/>
<ImageView
android:id="@+id/detail_movie_image"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/detail_movie_title"
android:padding="5dp"
android:scaleType="center"
tools:src="@mipmap/ic_launcher"
/>
<TextView
android:id="@+id/detail_movie_voteAverage"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/detail_movie_title"
android:layout_toRightOf="@id/detail_movie_image"
android:layout_toEndOf="@id/detail_movie_image"
tools:text="@string/debug_text"/>
<TextView
android:id="@+id/detail_movie_releseDate"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/detail_movie_voteAverage"
android:layout_toRightOf="@id/detail_movie_image"
android:layout_toEndOf="@id/detail_movie_image"
tools:text="@string/debug_text"/>
<TextView
android:id="@+id/detail_movie_overview"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/detail_movie_image"
android:layout_marginTop="@dimen/activity_vertical_margin"
tools:text="@string/debug_text"/>
</RelativeLayout>
</ScrollView>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment