Skip to content
Snippets Groups Projects
Verified Commit d6c88bc3 authored by Andrew Churyla's avatar Andrew Churyla
Browse files

Use FrameLayout for player_ui_container

parent 687986d1
No related branches found
No related tags found
1 merge request!1379Optimize UI performance
......@@ -62,7 +62,7 @@
android:background="@drawable/gradient_title_player"
android:visibility="gone"/>
<RelativeLayout
<FrameLayout
android:id="@+id/player_ui_container"
android:layout_width="match_parent"
android:layout_height="match_parent"
......@@ -78,8 +78,7 @@
android:id="@+id/player_overlay_loading"
android:layout_width="80dp"
android:layout_height="80dp"
android:layout_centerHorizontal="true"
android:layout_centerInParent="true"
android:layout_gravity="center"
android:visibility="invisible"
app:srcCompat="@drawable/ic_cone_o" />
......@@ -87,7 +86,7 @@
android:id="@+id/player_info_stub"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:layout_gravity="center"
android:layout_marginBottom="@dimen/default_margin"
android:layout="@layout/player_overlay_info" />
......@@ -96,15 +95,13 @@
android:layout="@layout/player_overlay_settings"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_alignParentRight="true"/>
android:layout_gravity="center_vertical|end"/>
<androidx.appcompat.widget.ViewStubCompat
android:id="@+id/player_hud_right_stub"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_alignParentEnd="true"
android:layout_gravity="end"
android:layout="@layout/player_hud_right" />
<androidx.appcompat.widget.ViewStubCompat
......@@ -112,14 +109,13 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout="@layout/player_hud"
android:layout_alignParentBottom="true" />
android:layout_gravity="bottom" />
<ImageView
android:id="@+id/hinge_go_left"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_centerVertical="true"
android:layout_gravity="center_vertical"
android:clickable="true"
android:focusable="true"
android:visibility="gone"
......@@ -130,15 +126,13 @@
android:id="@+id/hinge_go_right"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_gravity="center_vertical|right"
android:clickable="true"
android:focusable="true"
android:visibility="gone"
android:foreground="?attr/selectableItemBackgroundBorderless"
app:srcCompat="@drawable/ic_arrow_right" />
</RelativeLayout>
</FrameLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
......
......@@ -32,6 +32,7 @@ import android.content.pm.ActivityInfo
import android.content.res.Configuration
import android.os.Build
import android.view.View
import android.view.ViewGroup
import android.view.WindowManager
import android.view.animation.AnimationUtils
import android.widget.*
......@@ -92,7 +93,7 @@ class VideoPlayerOverlayDelegate (private val player: VideoPlayerActivity) {
var info: TextView? = null
var subinfo: TextView? = null
var overlayInfo: View? = null
lateinit var playerUiContainer:RelativeLayout
lateinit var playerUiContainer: ViewGroup
lateinit var hudBinding: PlayerHudBinding
lateinit var hudRightBinding: PlayerHudRightBinding
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment