Skip to content

Instantly share code, notes, and snippets.

@samiuelson
Created May 6, 2020 12:34
Show Gist options
  • Save samiuelson/3ca36cf963ee807ab0fdb1d7df9525bf to your computer and use it in GitHub Desktop.
Save samiuelson/3ca36cf963ee807ab0fdb1d7df9525bf to your computer and use it in GitHub Desktop.
Add chat list widget with translucent gradient
...
<com.pierfrancescosoffritti.androidyoutubeplayer.core.player.views.YouTubePlayerView ... />
<!-- Translucent gradient overlay background to make chat more visible -->
<View
android:layout_width="match_parent"
android:layout_height="0dp"
android:background="@drawable/bg_chat"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toTopOf="@+id/messagesList" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/messagesList"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_marginBottom="@dimen/margin_x_small"
android:orientation="vertical"
android:overScrollMode="never"
android:paddingLeft="@dimen/margin_small"
android:paddingRight="@dimen/margin_small"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
app:layout_constraintBottom_toTopOf="@+id/sendMessageButton"
app:layout_constraintHeight_percent="0.35" />
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment