Simplified Layout Files and Added Favorite Button
This commit is contained in:
@@ -10,7 +10,7 @@ import com.example.android.popularmovies.data.MovieContract.*;
|
||||
*/
|
||||
//TODO: Create Tests for MovieDbHelper
|
||||
public class MovieDbHelper extends SQLiteOpenHelper {
|
||||
private static final int DB_VER = 2;
|
||||
private static final int DB_VER = 3;
|
||||
static final String DB_NAME = "popular_movies.db";
|
||||
|
||||
public MovieDbHelper(Context context) {
|
||||
@@ -38,10 +38,6 @@ public class MovieDbHelper extends SQLiteOpenHelper {
|
||||
|
||||
@Override
|
||||
public void onUpgrade(SQLiteDatabase sqLiteDatabase, int oldVersion, int newVersion) {
|
||||
if(oldVersion == 1 && newVersion >= 2) {
|
||||
final String ADD_FAVORITES = "ALTER TABLE " + MovieEntry.TABLE_NAME + " ADD COLUMN "
|
||||
+ MovieEntry.COLUMN_FAVORITE + " INTEGER NOT NULL DEFAULT 0";
|
||||
sqLiteDatabase.execSQL(ADD_FAVORITES);
|
||||
}
|
||||
//No upgrade because no public version of the app has been released
|
||||
}
|
||||
}
|
||||
@@ -25,77 +25,50 @@
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/white"
|
||||
android:clipToPadding="false">
|
||||
<LinearLayout
|
||||
android:id="@+id/detailLinear"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
<RelativeLayout
|
||||
android:id="@id/detailRelative"
|
||||
<RelativeLayout
|
||||
android:id="@+id/detailRelative"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
<ImageView
|
||||
style="@style/Poster_Image_Details"
|
||||
android:id="@+id/posterImage"
|
||||
android:layout_width="wrap_content"
|
||||
android:src="@mipmap/ic_launcher" />
|
||||
<include layout="@layout/detail_text_fields"
|
||||
android:id="@+id/text_fields"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignTop="@id/posterImage"
|
||||
android:layout_toRightOf="@id/posterImage"
|
||||
android:layout_toEndOf="@id/posterImage"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginEnd="10dp" />
|
||||
<include layout="@layout/favorite_button"
|
||||
android:id="@+id/favoriteButton"
|
||||
android:layout_width="1px"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignLeft="@id/posterImage"
|
||||
android:layout_alignStart="@id/posterImage"
|
||||
android:layout_alignEnd="@id/posterImage"
|
||||
android:layout_alignRight="@id/posterImage"
|
||||
android:layout_below="@id/posterImage"
|
||||
android:layout_marginBottom="5dp"/>
|
||||
<TextView
|
||||
android:id="@+id/overview"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
<TextView
|
||||
android:id="@+id/releaseDate"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_toRightOf="@id/releaseHeader"
|
||||
android:layout_toEndOf="@id/releaseHeader"
|
||||
android:layout_alignTop="@id/releaseHeader"
|
||||
/>
|
||||
<TextView
|
||||
android:id="@+id/releaseHeader"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_toRightOf="@id/posterImage"
|
||||
android:layout_toEndOf="@id/posterImage"
|
||||
android:layout_alignTop="@id/posterImage"
|
||||
android:textStyle="bold"
|
||||
android:text="@string/release_header"/>
|
||||
<TextView
|
||||
android:id="@+id/ratingHeader"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/releaseHeader"
|
||||
android:layout_alignStart="@id/releaseHeader"
|
||||
android:layout_alignLeft="@id/releaseHeader"
|
||||
android:textStyle="bold"
|
||||
android:text="@string/rating_header"/>
|
||||
<TextView
|
||||
android:id="@+id/rating"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_toEndOf="@id/ratingHeader"
|
||||
android:layout_toRightOf="@id/ratingHeader"
|
||||
android:layout_alignTop="@id/ratingHeader"/>
|
||||
<ImageView
|
||||
android:id="@+id/posterImage"
|
||||
android:adjustViewBounds="true"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="200dp"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_margin="20dp"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@mipmap/ic_launcher" />
|
||||
<TextView
|
||||
android:id="@+id/overview"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="10dp"
|
||||
android:layout_toRightOf="@id/posterImage"
|
||||
android:layout_toEndOf="@id/posterImage"
|
||||
android:layout_below="@id/ratingHeader"
|
||||
android:padding="10dp"
|
||||
android:elevation="4dp"
|
||||
android:background="@color/colorPrimary"
|
||||
android:textColor="@color/white"/>
|
||||
</RelativeLayout>
|
||||
<FrameLayout
|
||||
android:id="@+id/reviewContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"/>
|
||||
</LinearLayout>
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/text_fields"
|
||||
android:layout_toRightOf="@id/posterImage"
|
||||
android:layout_toEndOf="@id/posterImage"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:padding="10dp"
|
||||
android:elevation="4dp"
|
||||
android:background="@color/colorPrimary"
|
||||
android:textColor="@color/white"
|
||||
android:text="In a land long ago and far far away."/>
|
||||
</RelativeLayout>
|
||||
</ScrollView>
|
||||
|
||||
</RelativeLayout>
|
||||
@@ -29,62 +29,43 @@
|
||||
android:id="@+id/detailRelative"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
<TextView
|
||||
android:id="@+id/releaseDate"
|
||||
android:layout_marginTop="25dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_alignParentRight="true"
|
||||
android:text="2016-01-29"/>
|
||||
<TextView
|
||||
android:id="@+id/releaseHeader"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignTop="@id/releaseDate"
|
||||
android:layout_toLeftOf="@id/releaseDate"
|
||||
android:textStyle="bold"
|
||||
android:text="Release Date: "/>
|
||||
<TextView
|
||||
android:id="@+id/ratingHeader"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/releaseHeader"
|
||||
android:layout_alignStart="@id/releaseHeader"
|
||||
android:layout_alignLeft="@id/releaseHeader"
|
||||
android:textStyle="bold"
|
||||
android:text="Rating: "/>
|
||||
<TextView
|
||||
android:id="@+id/rating"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_toEndOf="@id/ratingHeader"
|
||||
android:layout_toRightOf="@id/ratingHeader"
|
||||
android:layout_alignTop="@id/ratingHeader"
|
||||
android:text="7.7/10"/>
|
||||
<ImageView
|
||||
style="@style/Poster_Image_Details"
|
||||
android:id="@+id/posterImage"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="200dp"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_toLeftOf="@id/releaseHeader"
|
||||
android:layout_toStartOf="@id/releaseHeader"
|
||||
android:layout_margin="20dp"
|
||||
android:scaleType="fitXY"
|
||||
android:layout_width="1dp"
|
||||
android:layout_toLeftOf="@id/text_fields"
|
||||
android:layout_toStartOf="@id/text_fields"
|
||||
android:src="@mipmap/ic_launcher" />
|
||||
<include layout="@layout/detail_text_fields"
|
||||
android:id="@+id/text_fields"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginEnd="10dp" />
|
||||
<include layout="@layout/favorite_button"
|
||||
android:id="@+id/favoriteButton"
|
||||
android:layout_width="1px"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignRight="@id/posterImage"
|
||||
android:layout_alignEnd="@id/posterImage"
|
||||
android:layout_alignStart="@id/posterImage"
|
||||
android:layout_alignLeft="@id/posterImage"
|
||||
android:layout_below="@id/posterImage"/>
|
||||
<!-- Mock Divider View. 1px to avoid half-pixel sizes on low-dpi screens! -->
|
||||
<View
|
||||
android:id="@+id/divider"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1px"
|
||||
android:layout_marginTop="5dp"
|
||||
android:paddingLeft="5dp"
|
||||
android:paddingRight="5dp"
|
||||
android:background="@color/dividerColor"
|
||||
android:layout_alignLeft="@+id/overview"
|
||||
android:layout_alignStart="@+id/overview"
|
||||
android:layout_below="@+id/posterImage"
|
||||
android:layout_below="@+id/favoriteButton"
|
||||
android:layout_alignRight="@+id/overview"
|
||||
android:layout_alignEnd="@+id/overview" />
|
||||
<TextView
|
||||
@@ -93,7 +74,6 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/divider"
|
||||
android:layout_margin="10dp"
|
||||
android:layout_marginLeft="0dp"
|
||||
android:padding="10dp"
|
||||
android:elevation="4dp"
|
||||
android:background="@color/colorPrimary"
|
||||
@@ -101,5 +81,4 @@
|
||||
android:text="In a land long ago and far far away."/>
|
||||
</RelativeLayout>
|
||||
</ScrollView>
|
||||
|
||||
</RelativeLayout>
|
||||
</RelativeLayout>
|
||||
@@ -29,64 +29,46 @@
|
||||
android:id="@+id/detailRelative"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
<TextView
|
||||
android:id="@+id/releaseDate"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_toRightOf="@id/releaseHeader"
|
||||
android:layout_toEndOf="@id/releaseHeader"
|
||||
android:layout_alignTop="@id/releaseHeader"
|
||||
/>
|
||||
<TextView
|
||||
android:id="@+id/releaseHeader"
|
||||
<ImageView
|
||||
style="@style/Poster_Image_Details"
|
||||
android:id="@+id/posterImage"
|
||||
android:layout_width="wrap_content"
|
||||
android:src="@mipmap/ic_launcher" />
|
||||
<include layout="@layout/detail_text_fields"
|
||||
android:id="@+id/text_fields"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignTop="@id/posterImage"
|
||||
android:layout_toRightOf="@id/posterImage"
|
||||
android:layout_toEndOf="@id/posterImage"
|
||||
android:layout_alignTop="@id/posterImage"
|
||||
android:textStyle="bold"
|
||||
android:text="@string/release_header"/>
|
||||
<TextView
|
||||
android:id="@+id/ratingHeader"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginEnd="10dp" />
|
||||
<include layout="@layout/favorite_button"
|
||||
android:id="@+id/favoriteButton"
|
||||
android:layout_width="1px"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/releaseHeader"
|
||||
android:layout_alignStart="@id/releaseHeader"
|
||||
android:layout_alignLeft="@id/releaseHeader"
|
||||
android:textStyle="bold"
|
||||
android:text="@string/rating_header"/>
|
||||
<TextView
|
||||
android:id="@+id/rating"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_toEndOf="@id/ratingHeader"
|
||||
android:layout_toRightOf="@id/ratingHeader"
|
||||
android:layout_alignTop="@id/ratingHeader"/>
|
||||
<ImageView
|
||||
android:id="@+id/posterImage"
|
||||
android:adjustViewBounds="true"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="200dp"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_margin="20dp"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@mipmap/ic_launcher" />
|
||||
android:layout_alignLeft="@id/posterImage"
|
||||
android:layout_alignStart="@id/posterImage"
|
||||
android:layout_alignEnd="@id/posterImage"
|
||||
android:layout_alignRight="@id/posterImage"
|
||||
android:layout_below="@id/posterImage"
|
||||
android:layout_marginBottom="5dp"/>
|
||||
<TextView
|
||||
android:id="@+id/overview"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="10dp"
|
||||
android:layout_marginLeft="0dp"
|
||||
android:layout_below="@id/text_fields"
|
||||
android:layout_toRightOf="@id/posterImage"
|
||||
android:layout_toEndOf="@id/posterImage"
|
||||
android:layout_below="@id/ratingHeader"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:padding="10dp"
|
||||
android:elevation="4dp"
|
||||
android:background="@color/colorPrimary"
|
||||
android:textColor="@color/white"/>
|
||||
android:textColor="@color/white"
|
||||
android:text="In a land long ago and far far away."/>
|
||||
</RelativeLayout>
|
||||
</ScrollView>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
48
app/src/main/res/layout/detail_text_fields.xml
Normal file
48
app/src/main/res/layout/detail_text_fields.xml
Normal file
@@ -0,0 +1,48 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
<TextView
|
||||
android:id="@+id/releaseHeader"
|
||||
style="@style/HeaderText"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:text="Release Date: "/>
|
||||
<TextView
|
||||
android:id="@+id/releaseDate"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_toRightOf="@id/releaseHeader"
|
||||
android:text="2016-01-29"/>
|
||||
<TextView
|
||||
style="@style/HeaderText"
|
||||
android:id="@+id/ratingHeader"
|
||||
android:layout_below="@id/releaseHeader"
|
||||
android:layout_alignStart="@id/releaseHeader"
|
||||
android:layout_alignLeft="@id/releaseHeader"
|
||||
android:text="Rating: "/>
|
||||
<TextView
|
||||
android:id="@+id/rating"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_toEndOf="@id/ratingHeader"
|
||||
android:layout_toRightOf="@id/ratingHeader"
|
||||
android:layout_alignTop="@id/ratingHeader"
|
||||
android:text="7.7/10"/>
|
||||
<TextView
|
||||
style="@style/HeaderText"
|
||||
android:id="@+id/runtimeHeader"
|
||||
android:layout_below="@id/ratingHeader"
|
||||
android:layout_alignStart="@id/ratingHeader"
|
||||
android:layout_alignLeft="@id/ratingHeader"
|
||||
android:text="Runtime: "/>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_toRightOf="@id/runtimeHeader"
|
||||
android:layout_toEndOf="@id/runtimeHeader"
|
||||
android:layout_alignTop="@id/runtimeHeader"
|
||||
android:text="123 minutes"/>
|
||||
</RelativeLayout>
|
||||
29
app/src/main/res/layout/favorite_button.xml
Normal file
29
app/src/main/res/layout/favorite_button.xml
Normal file
@@ -0,0 +1,29 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- 1px layout because the actual size will be adjusted by the RL -->
|
||||
<RelativeLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/favoriteButton"
|
||||
android:background="@color/colorAccent"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="32dp"
|
||||
android:layout_marginBottom="5dp">
|
||||
<ImageView
|
||||
android:id="@+id/star_icon"
|
||||
android:layout_width="32dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_alignParentTop="true"
|
||||
android:padding="0dp"
|
||||
android:adjustViewBounds="true"
|
||||
android:src="@drawable/star_not_favorite"/>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:padding="0dp"
|
||||
android:layout_margin="0dp"
|
||||
android:textSize="20sp"
|
||||
android:text="Favorite"/>
|
||||
</RelativeLayout>
|
||||
@@ -25,86 +25,61 @@
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/white"
|
||||
android:clipToPadding="false">
|
||||
<LinearLayout
|
||||
android:id="@+id/detailLinear"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
<RelativeLayout
|
||||
android:id="@+id/detailRelative"
|
||||
<RelativeLayout
|
||||
android:id="@+id/detailRelative"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
<include layout="@layout/detail_text_fields"
|
||||
android:id="@+id/text_fields"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
<TextView
|
||||
android:id="@+id/releaseDate"
|
||||
android:layout_marginTop="25dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_alignParentRight="true"
|
||||
android:text="2016-01-29"/>
|
||||
<TextView
|
||||
android:id="@+id/releaseHeader"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignTop="@id/releaseDate"
|
||||
android:layout_toLeftOf="@id/releaseDate"
|
||||
android:textStyle="bold"
|
||||
android:text="Release Date: "/>
|
||||
<TextView
|
||||
android:id="@+id/ratingHeader"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/releaseHeader"
|
||||
android:layout_alignStart="@id/releaseHeader"
|
||||
android:layout_alignLeft="@id/releaseHeader"
|
||||
android:textStyle="bold"
|
||||
android:text="Rating: "/>
|
||||
<TextView
|
||||
android:id="@+id/rating"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_toEndOf="@id/ratingHeader"
|
||||
android:layout_toRightOf="@id/ratingHeader"
|
||||
android:layout_alignTop="@id/ratingHeader"
|
||||
android:text="7.7/10"/>
|
||||
<ImageView
|
||||
android:id="@+id/posterImage"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="200dp"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_toLeftOf="@id/releaseHeader"
|
||||
android:layout_toStartOf="@id/releaseHeader"
|
||||
android:layout_margin="20dp"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@mipmap/ic_launcher" />
|
||||
<View
|
||||
android:id="@+id/divider"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1px"
|
||||
android:paddingLeft="5dp"
|
||||
android:paddingRight="5dp"
|
||||
android:background="@color/dividerColor"
|
||||
android:layout_alignLeft="@+id/overview"
|
||||
android:layout_alignStart="@+id/overview"
|
||||
android:layout_below="@+id/posterImage"
|
||||
android:layout_alignRight="@+id/overview"
|
||||
android:layout_alignEnd="@+id/overview" />
|
||||
<TextView
|
||||
android:id="@+id/overview"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/divider"
|
||||
android:layout_margin="10dp"
|
||||
android:padding="10dp"
|
||||
android:elevation="4dp"
|
||||
android:background="@color/colorPrimary"
|
||||
android:textColor="@color/white"
|
||||
android:text="In a land long ago and far far away."/>
|
||||
</RelativeLayout>
|
||||
</LinearLayout>
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginEnd="10dp" />
|
||||
<ImageView
|
||||
style="@style/Poster_Image_Details"
|
||||
android:id="@+id/posterImage"
|
||||
android:layout_width="1dp"
|
||||
android:layout_toLeftOf="@id/text_fields"
|
||||
android:layout_toStartOf="@id/text_fields"
|
||||
android:src="@mipmap/ic_launcher" />
|
||||
<include layout="@layout/favorite_button"
|
||||
android:id="@+id/favoriteButton"
|
||||
android:layout_width="1px"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignLeft="@id/posterImage"
|
||||
android:layout_alignStart="@id/posterImage"
|
||||
android:layout_alignRight="@id/posterImage"
|
||||
android:layout_alignEnd="@id/posterImage"
|
||||
android:layout_below="@id/posterImage"/>
|
||||
<!-- Mock Divider View. 1px to avoid half-pixel sizes on low-dpi screens! -->
|
||||
<View
|
||||
android:id="@+id/divider"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1px"
|
||||
android:layout_marginTop="5dp"
|
||||
android:paddingLeft="5dp"
|
||||
android:paddingRight="5dp"
|
||||
android:background="@color/dividerColor"
|
||||
android:layout_alignLeft="@+id/overview"
|
||||
android:layout_alignStart="@+id/overview"
|
||||
android:layout_below="@+id/favoriteButton"
|
||||
android:layout_alignRight="@+id/overview"
|
||||
android:layout_alignEnd="@+id/overview" />
|
||||
<TextView
|
||||
android:id="@+id/overview"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/divider"
|
||||
android:layout_margin="10dp"
|
||||
android:padding="10dp"
|
||||
android:elevation="4dp"
|
||||
android:background="@color/colorPrimary"
|
||||
android:textColor="@color/white"
|
||||
android:text="In a land long ago and far far away."/>
|
||||
</RelativeLayout>
|
||||
</ScrollView>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="colorPrimary">#F44336</color>
|
||||
<color name="colorPrimaryDark">#D32F2F</color>
|
||||
<color name="colorPrimaryLight">#FFCDD2</color>
|
||||
<color name="colorAccent">#8BC34A</color>
|
||||
<color name="colorPrimary">#009688</color>
|
||||
<color name="colorPrimaryDark">#00796B</color>
|
||||
<color name="colorPrimaryLight">#B2DFDB</color>
|
||||
<color name="colorAccent">#00BCD4</color>
|
||||
<color name="black">#212121</color>
|
||||
<color name="primaryText">@color/black</color>
|
||||
<color name="secondaryText">#727272</color>
|
||||
|
||||
@@ -17,4 +17,23 @@
|
||||
|
||||
<style name="AppTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Light" />
|
||||
|
||||
<style name="HeaderText">
|
||||
<item name="android:textStyle">bold</item>
|
||||
<item name="android:layout_width">wrap_content</item>
|
||||
<item name="android:layout_height">wrap_content</item>
|
||||
<item name="android:textSize">12sp</item>
|
||||
</style>
|
||||
|
||||
<style name="Poster_Image_Details">
|
||||
<item name="android:layout_height">200dp</item>
|
||||
<item name="android:layout_marginLeft">20dp</item>
|
||||
<item name="android:layout_marginTop">20dp</item>
|
||||
<item name="android:layout_marginRight">20dp</item>
|
||||
<item name="android:layout_marginBottom">5dp</item>
|
||||
<item name="android:layout_alignParentLeft">true</item>
|
||||
<item name="android:layout_alignParentStart">true</item>
|
||||
<item name="android:adjustViewBounds">true</item>
|
||||
<item name="android:scaleType">fitXY</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
||||
|
||||
Reference in New Issue
Block a user