Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Simplify cast view by using ConstraintLayout Fix GridLayout cell dimensions, by specifying weight and gravity on each cell, compute slightly smaller image sizes and let the ImageView adjust when the image is set
- Loading branch information
1 parent
7bb1b47
commit 0665552
Showing
8 changed files
with
125 additions
and
130 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
<?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. | ||
--> | ||
|
||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:app="http://schemas.android.com/apk/res-auto" | ||
android:layout_width="0dp" | ||
android:layout_height="wrap_content" | ||
android:layout_columnWeight="1" | ||
android:layout_gravity="fill" | ||
android:foreground="?android:selectableItemBackground"> | ||
|
||
<ImageView | ||
android:id="@+id/picture" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
android:adjustViewBounds="true" | ||
android:contentDescription="@string/poster" | ||
android:scaleType="centerCrop" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintTop_toTopOf="parent" /> | ||
|
||
<TextView | ||
android:id="@+id/name" | ||
style="@style/Widget.Kore.TextView.MediaCast" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:background="?attr/colorSurface" | ||
app:layout_constraintBottom_toTopOf="@id/role" | ||
app:layout_constraintStart_toStartOf="parent" /> | ||
|
||
<TextView | ||
android:id="@+id/role" | ||
style="@style/Widget.Kore.TextView.MediaCast" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:background="?attr/colorSurface" | ||
android:textColor="?attr/colorOnSurface" | ||
app:layout_constraintBottom_toBottomOf="parent" | ||
app:layout_constraintStart_toStartOf="parent" /> | ||
|
||
<TextView | ||
android:id="@+id/remaining_cast_count" | ||
style="@style/Widget.Kore.TextView.MediaInfo" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
android:background="?attr/colorSurface" | ||
android:gravity="center" | ||
android:visibility="gone" | ||
android:paddingTop="48dp" | ||
app:drawableTopCompat="@drawable/ic_open_in_new_white_24dp" | ||
app:drawableTint="?attr/colorOnSurface" /> | ||
|
||
</androidx.constraintlayout.widget.ConstraintLayout> |
Oops, something went wrong.