Skip to content

Instantly share code, notes, and snippets.

@Bradleycorn
Last active January 18, 2019 03:22
Show Gist options
  • Save Bradleycorn/638a3ae4cc8c8ee168a06b63b292d381 to your computer and use it in GitHub Desktop.
Save Bradleycorn/638a3ae4cc8c8ee168a06b63b292d381 to your computer and use it in GitHub Desktop.
MotionLayout - Main Activity Layout
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.motion.widget.MotionLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/activity_container"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:focusableInTouchMode="true"
app:layoutDescription="@xml/main_activity_motion_scene"
app:currentState="@id/video_state_embedded_stopped">
<net.bradball.motionvideo.customViews.ControlledVideoView
android:id="@+id/video_player"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:outlineProvider="paddedBounds"
app:autoPlay="false" />
<com.google.android.material.tabs.TabLayout
android:id="@+id/list_tabs"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<androidx.viewpager.widget.ViewPager
android:id="@+id/list_view_pager"
android:layout_width="match_parent"
android:layout_height="0dp" />
</androidx.constraintlayout.motion.widget.MotionLayout>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment