Kore/app/src/main/res/layout/grid_item_cast.xml

95 lines
3.6 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2015 Synced Synapse. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="start"
android:layout_margin="@dimen/image_grid_margin">
<ImageView
android:id="@+id/picture"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="centerCrop"
android:adjustViewBounds="true"
android:layout_alignParentStart="true"
android:layout_alignParentLeft="true"
android:contentDescription="@string/poster"/>
<!--android:src="?attr/iconPerson"/>-->
<!--&lt;!&ndash; Shade to make text easier to read &ndash;&gt;-->
<!--<ImageView-->
<!--android:layout_width="match_parent"-->
<!--android:layout_height="match_parent"-->
<!--android:src="?attr/imageViewShade"/>-->
<!--
Somehow i can't make the TextViews work correctly, one below the other when this RelativeLayout is inside a
Gridview, so i resort to a LinearLayout to position them
-->
<LinearLayout
android:id="@+id/cast_name_group"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_alignParentBottom="true"
android:background="?attr/contentBackgroundColor">
<TextView
android:id="@+id/name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="@style/TextAppearance.Media.Cast"/>
<TextView
android:id="@+id/role"
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="@style/TextAppearance.Media.Cast"
android:textColor="?attr/appTextColorSecondary"/>
</LinearLayout>
<RelativeLayout
android:id="@+id/all_cast_group"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="?attr/contentBackgroundColor"
android:visibility="gone">
<ImageView
android:id="@android:id/icon"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:src="?attr/iconOpenInNew"
android:contentDescription="@string/poster"
android:tint="?attr/defaultButtonColorFilter"/>
<TextView
android:id="@+id/remaining_cast_count"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@android:id/icon"
android:gravity="center_horizontal"
style="@style/TextAppearance.Media.Info"/>
</RelativeLayout>
</RelativeLayout>