TheMovieDb API – Part 5 – Movie Layouts

Hey there! welcome back to this series on implementing TheMovieDb API. As always remember all the code for this series will be in this GitHub repo today we are getting away from Java code for a while and jumping to layout creation and xml files. We are going to set up a toolbar layout file so it can be reused, then prepare the activity_main needed views and finally a layout representation of a Movie item that later on our adapter will use to display sample movie information.

Let’s get started! Under app/src/main/res/layout create the following toolbar layout:

<?xml version="1.0" encoding="utf-8"?>
<android.support.v7.widget.Toolbar xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:id="@+id/toolbar"
    android:layout_width="match_parent"
    android:layout_height="?attr/actionBarSize"
    android:background="?attr/colorPrimary"
    android:elevation="6dp"
    android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
    app:layout_collapseMode="pin"
    app:popupTheme="@style/ThemeOverlay.AppCompat.Light" />

Continue reading “TheMovieDb API – Part 5 – Movie Layouts”