Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DrawerLayout with SlidingUpPanel doesn't fit system windows #983

Open
dexion opened this issue Apr 14, 2020 · 1 comment
Open

DrawerLayout with SlidingUpPanel doesn't fit system windows #983

dexion opened this issue Apr 14, 2020 · 1 comment

Comments

@dexion
Copy link

dexion commented Apr 14, 2020

with this layout

<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    xmlns:sothree="http://schemas.android.com/tools"
    android:fitsSystemWindows="true">

    <androidx.drawerlayout.widget.DrawerLayout

        android:id="@+id/root"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:fitsSystemWindows="true">

        <androidx.appcompat.widget.Toolbar
            android:id="@+id/toolbar"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:background="@android:color/transparent"
            android:elevation="0dp"
            android:theme="@style/ThemeOverlay.MaterialComponents.Dark"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent" />


            <FrameLayout
                android:id="@+id/frame_container2"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:background="@color/aqi_51"
                android:fitsSystemWindows="true"
                app:layout_constraintBottom_toBottomOf="parent"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toStartOf="parent">

                <TextView
                    android:id="@+id/txtLabel2"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_gravity="center"
                    android:text="Test"
                    android:textSize="16sp" />
            </FrameLayout>

        <com.mikepenz.materialdrawer.widget.MaterialDrawerSliderView
            android:id="@+id/slider"
            android:layout_width="wrap_content"
            android:layout_height="match_parent"
            android:layout_gravity="start"
            android:fitsSystemWindows="true" />
    </androidx.drawerlayout.widget.DrawerLayout>

</androidx.coordinatorlayout.widget.CoordinatorLayout>

all works fine, layout fits system windows

with this layout (AndroidSlidingPanel added):

<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    xmlns:sothree="http://schemas.android.com/tools"
    android:fitsSystemWindows="true">

    <androidx.drawerlayout.widget.DrawerLayout

        android:id="@+id/root"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:fitsSystemWindows="true">

        <androidx.appcompat.widget.Toolbar
            android:id="@+id/toolbar"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:background="@android:color/transparent"
            android:elevation="0dp"
            android:theme="@style/ThemeOverlay.MaterialComponents.Dark"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent" />

        <com.sothree.slidinguppanel.SlidingUpPanelLayout
            android:id="@+id/sliding_layout"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:gravity="bottom"
            sothree:umanoPanelHeight="96dp"
            sothree:umanoShadowHeight="4dp"
            sothree:umanoOverlay="true"
            android:fitsSystemWindows="true">

            <FrameLayout
                android:id="@+id/frame_container"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:background="@color/aqi_0"
                android:fitsSystemWindows="true"
                app:layout_constraintBottom_toBottomOf="parent"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toStartOf="parent">

                <TextView
                    android:id="@+id/txtLabel"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_gravity="center"
                    android:text="Test"
                    android:textSize="16sp" />
            </FrameLayout>

            <FrameLayout
                android:id="@+id/frame_container2"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:background="@color/aqi_51"
                android:fitsSystemWindows="true"
                app:layout_constraintBottom_toBottomOf="parent"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toStartOf="parent">

                <TextView
                    android:id="@+id/txtLabel2"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_gravity="center"
                    android:text="Test"
                    android:textSize="16sp" />
            </FrameLayout>

        </com.sothree.slidinguppanel.SlidingUpPanelLayout>

        <com.mikepenz.materialdrawer.widget.MaterialDrawerSliderView
            android:id="@+id/slider"
            android:layout_width="wrap_content"
            android:layout_height="match_parent"
            android:layout_gravity="start"
            android:fitsSystemWindows="true" />
    </androidx.drawerlayout.widget.DrawerLayout>

</androidx.coordinatorlayout.widget.CoordinatorLayout>

whole layout wont fits system window

@khushbuvadi
Copy link

khushbuvadi commented Jul 21, 2023

try this.

main.xml

<?xml version="1.0" encoding="utf-8"?>
<androidx.drawerlayout.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:id="@+id/drawer_layout"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <com.sothree.slidinguppanel.SlidingUpPanelLayout
        android:id="@+id/sliding_layout"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:gravity="bottom"
        app:umanoPanelHeight="@dimen/_43sdp">

        <FrameLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent">

            <RelativeLayout
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:orientation="vertical">

                <LinearLayout
                    android:id="@+id/llTop"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:orientation="vertical">

                    <RelativeLayout
                        android:id="@+id/rlTop"
                        android:layout_width="match_parent"
                        android:layout_height="?android:attr/actionBarSize"
                        android:background="@android:color/transparent"
                        android:orientation="horizontal">

                        <ImageView
                            android:id="@+id/ivDrawer"
                            android:layout_width="@dimen/_25sdp"
                            android:layout_height="match_parent"
                            android:layout_centerVertical="true"
                            android:layout_marginLeft="@dimen/_10sdp"
                            android:src="@drawable/drawer_t" />

                        <TextView
                            android:id="@+id/tvHeader"
                            android:layout_width="match_parent"
                            android:layout_height="match_parent"
                            android:layout_gravity="center"
                            android:fontFamily="@font/proximanovasoftbold"
                            android:gravity="center"
                            android:text="@string/app_name"
                            android:textColor="@color/black"
                            android:textSize="@dimen/_14sdp" />

                        <ImageView
                            android:id="@+id/search"
                            android:layout_width="@dimen/_25sdp"
                            android:layout_height="match_parent"
                            android:layout_alignParentRight="true"
                            android:layout_centerVertical="true"
                            android:layout_marginRight="@dimen/_10sdp"
                            android:src="@drawable/nav_search" />
                    </RelativeLayout>

                    <RelativeLayout
                        android:id="@+id/rlSearch"
                        android:layout_width="match_parent"
                        android:layout_height="?android:attr/actionBarSize"
                        android:layout_marginTop="@dimen/_2sdp"
                        android:visibility="gone">

                        <ImageView
                            android:id="@+id/ivBack"
                            android:layout_width="@dimen/_17sdp"
                            android:layout_height="match_parent"
                            android:layout_centerVertical="true"
                            android:layout_marginLeft="@dimen/_5sdp"
                            android:rotation="90"
                            android:src="@drawable/down" />

                        <EditText
                            android:id="@+id/txtSearch"
                            android:layout_width="match_parent"
                            android:layout_height="@dimen/_35sdp"
                            android:layout_centerInParent="true"
                            android:layout_gravity="center"
                            android:layout_marginLeft="@dimen/_5sdp"
                            android:layout_marginRight="@dimen/_5sdp"
                            android:layout_toLeftOf="@+id/ivCancel"
                            android:layout_toRightOf="@+id/ivBack"
                            android:background="@drawable/editext_bg"
                            android:fontFamily="@font/proximanovasoftbold"
                            android:gravity="center|left"
                            android:hint="@string/search"
                            android:paddingLeft="@dimen/_10sdp"
                            android:singleLine="true"
                            android:textColor="@color/black"
                            android:textCursorDrawable="@drawable/color_cursor"
                            android:textSize="@dimen/_14sdp" />

                        <ImageView
                            android:id="@+id/ivCancel"
                            android:layout_width="@dimen/_13sdp"
                            android:layout_height="match_parent"
                            android:layout_alignParentRight="true"
                            android:layout_centerVertical="true"
                            android:layout_marginRight="@dimen/_8sdp"
                            android:src="@drawable/cancel"
                            android:visibility="gone" />
                    </RelativeLayout>
                </LinearLayout>

                <com.google.android.material.tabs.TabLayout
                    android:id="@+id/tablayout"
                    android:layout_width="match_parent"
                    android:layout_height="58dp"
                    android:layout_below="@+id/llTop"
                    android:layout_marginLeft="5dp"
                    android:layout_marginRight="5dp"
                    android:background="@android:color/transparent"
                    app:tabBackground="@drawable/tab_selector"
                    app:tabGravity="fill"
                    app:tabIndicatorHeight="0dp"
                    app:tabMode="scrollable"
                    app:tabPaddingEnd="@dimen/_25sdp"
                    app:tabPaddingStart="@dimen/_25sdp"
                    app:tabRippleColor="@null"
                    app:tabTextAppearance="@style/TabLayoutStyle"
                    app:tabTextColor="@color/tab_color_selector" />

                <LinearLayout
                    android:id="@+id/llContent"
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:layout_below="@+id/tablayout"
                    android:orientation="vertical"
                    app:layout_behavior="@string/appbar_scrolling_view_behavior">

                    <FrameLayout
                        android:layout_width="match_parent"
                        android:layout_height="match_parent">

                        <androidx.viewpager2.widget.ViewPager2
                            android:id="@+id/viewpager"
                            android:layout_width="match_parent"
                            android:layout_height="match_parent" />
                    </FrameLayout>
                </LinearLayout>
            </RelativeLayout>
        </FrameLayout>

        <include layout="@layout/sliding_window_layout" />
    </com.sothree.slidinguppanel.SlidingUpPanelLayout>

    <ListView
        android:id="@+id/left_drawer"
        android:layout_width="@dimen/_210sdp"
        android:layout_height="match_parent"
        android:layout_gravity="start"
        android:background="@drawable/main_bg"
        android:choiceMode="singleChoice"
        android:clickable="true"
        android:divider="@color/divider_color1"
        android:dividerHeight="1dp"
        android:focusable="true"
        android:paddingTop="@dimen/_15sdp" />
</androidx.drawerlayout.widget.DrawerLayout>


sliding_window_layout.xml

<LinearLayout
    android:id="@+id/image_above"
    android:layout_width="wrap_content"
    android:layout_height="match_parent"
    android:orientation="vertical">

    <RelativeLayout
        android:id="@+id/upperLayout"
        android:layout_width="match_parent"
        android:layout_height="?android:actionBarSize"
        android:background="@android:color/transparent">

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:orientation="vertical">

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:orientation="horizontal">

                <ImageView
                    android:id="@+id/below_arrow"
                    android:layout_width="@dimen/_17sdp"
                    android:layout_height="@dimen/_20sdp"
                    android:layout_gravity="center"
                    android:layout_marginStart="@dimen/_10sdp"
                    android:src="@drawable/bottom_arrow" />

                <LinearLayout
                    android:id="@+id/text_layout"
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:layout_alignTop="@+id/manulayout"
                    android:layout_alignBottom="@+id/manulayout"
                    android:layout_centerInParent="true"
                    android:layout_toLeftOf="@+id/manulayout"
                    android:layout_toRightOf="@+id/back_layout"
                    android:layout_weight="1"
                    android:gravity="center"
                    android:orientation="vertical"
                    android:paddingLeft="10dp">

                    <com.musicplayer.song.coolmusicplayer.object.CustomTextView
                        android:id="@+id/textNowPlaying"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:ellipsize="marquee"
                        android:singleLine="true"
                        android:text="fdsfsd"
                        android:textColor="@color/black"
                        android:textSize="16dp"
                        app:fontName="Brandon_reg.otf" />

                    <com.musicplayer.song.coolmusicplayer.object.CustomTextView
                        android:id="@+id/textArtist"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:layout_gravity="center"
                        android:ellipsize="marquee"
                        android:gravity="start|center_horizontal"
                        android:singleLine="true"
                        android:text="fdsfsd"
                        android:textColor="@color/black"
                        android:textSize="12dp"
                        app:fontName="Brandon_light.otf" />

                    <TextView
                        android:id="@+id/tvAlbumName"
                        android:layout_width="@dimen/_200sdp"
                        android:layout_height="match_parent"
                        android:layout_gravity="center"
                        android:ellipsize="end"
                        android:fontFamily="@font/proximanovasoftbold"
                        android:gravity="center"
                        android:singleLine="true"
                        android:textColor="@color/black"
                        android:textSize="@dimen/_14sdp"
                        android:visibility="gone" />
                </LinearLayout>

                <LinearLayout
                    android:id="@+id/manulayout"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_alignParentRight="true"
                    android:layout_centerVertical="true"
                    android:layout_gravity="center_vertical"
                    android:gravity="end|center_vertical"
                    android:orientation="horizontal">

                    <RelativeLayout
                        android:id="@+id/btn_layout"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:visibility="visible">

                        <ImageButton
                            android:id="@+id/btn_Play"
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:layout_margin="5dp"
                            android:background="@color/trans"
                            android:src="@drawable/play_white" />

                        <ImageButton
                            android:id="@+id/btn_Pause"
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:layout_margin="5dp"
                            android:background="@color/trans"
                            android:src="@drawable/pause_white"
                            android:visibility="gone" />
                    </RelativeLayout>

                    <ImageView
                        android:id="@+id/btnmenu"
                        android:layout_width="@dimen/_25sdp"
                        android:layout_height="@dimen/_15sdp"
                        android:layout_gravity="center_vertical"
                        android:layout_marginEnd="@dimen/_10sdp"
                        android:src="@drawable/menu" />
                </LinearLayout>
            </LinearLayout>
        </LinearLayout>
    </RelativeLayout>

    <LinearLayout
        android:id="@+id/centerLayout"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_below="@+id/upperLayout"
        android:layout_weight="1"
        android:orientation="vertical"
        android:weightSum="2">

        <com.google.android.material.card.MaterialCardView
            android:id="@+id/cardView"
            android:layout_width="match_parent"
            android:layout_height="0dp"
            android:layout_centerHorizontal="true"
            android:layout_gravity="center"
            android:layout_marginStart="@dimen/_30sdp"
            android:layout_marginEnd="@dimen/_30sdp"
            android:layout_weight="1.3"
            android:background="@android:color/white"
            app:cardBackgroundColor="@android:color/white"
            app:cardCornerRadius="@dimen/_15sdp"
            app:cardPreventCornerOverlap="false"
            app:cardUseCompatPadding="false">

            <ImageView
                android:id="@+id/album_image"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:scaleType="centerCrop"
                android:src="@drawable/default_albumart" />

            <RelativeLayout
                android:id="@+id/llVE"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_gravity="center_vertical|bottom"
                android:layout_marginLeft="@dimen/_10sdp"
                android:layout_marginRight="@dimen/_10sdp"
                android:layout_marginBottom="@dimen/_10sdp"
                android:gravity="center_vertical|bottom"
                android:orientation="horizontal">

                <ImageView
                    android:id="@+id/img_equalizer"
                    android:layout_width="@dimen/_30sdp"
                    android:layout_height="@dimen/_30sdp"
                    android:layout_alignParentLeft="true"
                    android:layout_weight="1"
                    android:src="@drawable/eq" />

                <ImageView
                    android:id="@+id/img_visualizer"
                    android:layout_width="@dimen/_30sdp"
                    android:layout_height="@dimen/_30sdp"
                    android:layout_alignParentRight="true"
                    android:layout_weight="1"
                    android:src="@drawable/vs" />
            </RelativeLayout>
        </com.google.android.material.card.MaterialCardView>

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="0dp"
            android:layout_weight="0.7"
            android:orientation="vertical">

            <TextView
                android:id="@+id/tvSongName"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_below="@+id/cardView"
                android:layout_gravity="center"
                android:layout_marginStart="@dimen/_30sdp"
                android:layout_marginTop="@dimen/_20sdp"
                android:layout_marginEnd="@dimen/_30sdp"
                android:layout_marginBottom="@dimen/_10sdp"
                android:ellipsize="end"
                android:fontFamily="@font/proximanovasoftbold"
                android:gravity="center"
                android:singleLine="true"
                android:textColor="@color/black"
                android:textSize="@dimen/_17sdp" />

            <TextView
                android:id="@+id/tvArtistName"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_below="@+id/tvSongName"
                android:layout_gravity="center"
                android:layout_marginStart="@dimen/_30sdp"
                android:layout_marginEnd="@dimen/_30sdp"
                android:layout_marginBottom="@dimen/_10sdp"
                android:ellipsize="end"
                android:fontFamily="@font/proximanovasoftregular"
                android:gravity="center"
                android:singleLine="true"
                android:textColor="@color/black"
                android:textSize="@dimen/_14sdp" />

            <SeekBar
                android:id="@+id/seekbar"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_below="@+id/tvArtistName"
                android:layout_gravity="bottom"
                android:layout_marginLeft="@dimen/_20sdp"
                android:layout_marginTop="@dimen/_10sdp"
                android:layout_marginRight="@dimen/_20sdp"
                android:layout_marginBottom="@dimen/_10sdp"
                android:background="@null"
                android:maxHeight="10dp"
                android:minHeight="10dp"
                android:paddingStart="0dp"
                android:paddingEnd="0dp"
                android:progressDrawable="@drawable/seekbarcolor"
                android:thumb="@null"
                android:thumbOffset="10dp" />
            <!--<SeekBar
                android:id="@+id/seekbar"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_gravity="center"
                android:background="@android:color/transparent"
                android:layout_below="@+id/tvArtistName"
                android:layout_marginHorizontal="@dimen/_20sdp"
                android:layout_marginVertical="@dimen/_10sdp"
                android:maxHeight="@dimen/_4sdp"
                android:progress="0"
                android:progressDrawable="@drawable/seekbar_progress"
                android:thumb="@drawable/seekbar_thumb"/>-->
            <LinearLayout
                android:id="@+id/llDur"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_below="@+id/seekbar"
                android:layout_gravity="bottom|center"
                android:layout_marginLeft="@dimen/_20sdp"
                android:layout_marginRight="@dimen/_20sdp"
                android:layout_marginBottom="@dimen/_10sdp"
                android:orientation="horizontal">

                <com.musicplayer.song.coolmusicplayer.object.CustomTextView
                    android:id="@+id/textBufferDuration"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_weight="1"
                    android:text="00:00"
                    android:textColor="@color/black"
                    android:textSize="@dimen/_13sdp"
                    app:fontName="Brandon_reg.otf" />

                <com.musicplayer.song.coolmusicplayer.object.CustomTextView
                    android:id="@+id/textDuration"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_gravity="right"
                    android:text="00:00"
                    android:textColor="@color/black"
                    android:textSize="@dimen/_13sdp"
                    app:fontName="Brandon_reg.otf" />
            </LinearLayout>

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_below="@+id/llDur"
                android:layout_gravity="center"
                android:layout_marginStart="@dimen/_30sdp"
                android:layout_marginEnd="@dimen/_30sdp"
                android:gravity="center"
                android:orientation="horizontal">

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_below="@+id/seekbar"
                    android:fontFamily="@font/proximanovasoftregular"
                    android:gravity="center|right"
                    android:text="@string/next"
                    android:textColor="@color/black"
                    android:textSize="@dimen/_13sdp" />

                <TextView
                    android:id="@+id/tvNextSongName"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_below="@+id/seekbar"
                    android:ellipsize="end"
                    android:fontFamily="@font/proximanovasoftbold"
                    android:gravity="center|left"
                    android:singleLine="true"
                    android:textColor="@color/black"
                    android:textSize="@dimen/_14sdp" />
            </LinearLayout>
        </LinearLayout>
    </LinearLayout>

    <LinearLayout
        android:id="@+id/play_layout"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true"
        android:layout_marginBottom="@dimen/_20sdp"
        android:gravity="bottom"
        android:orientation="vertical">

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="@dimen/_10sdp"
            android:orientation="horizontal">

            <ImageView
                android:id="@+id/ivShuffle"
                android:layout_width="@dimen/_15sdp"
                android:layout_height="@dimen/_15sdp"
                android:layout_gravity="center|left"
                android:layout_weight="1"
                android:src="@drawable/shuffle" />

            <ImageView
                android:id="@+id/ivPre"
                android:layout_width="@dimen/_15sdp"
                android:layout_height="@dimen/_15sdp"
                android:layout_gravity="center|left"
                android:layout_toRightOf="@+id/ivShuffle"
                android:layout_weight="1"
                android:src="@drawable/pre" />

            <LinearLayout
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:orientation="vertical">

                <LinearLayout
                    android:layout_width="@dimen/_50sdp"
                    android:layout_height="@dimen/_50sdp"
                    android:layout_gravity="center"
                    android:background="@drawable/bg_round_white"
                    android:gravity="center">

                    <ImageView
                        android:id="@+id/ivPause"
                        android:layout_width="@dimen/_25sdp"
                        android:layout_height="@dimen/_25sdp"
                        android:layout_gravity="center"
                        android:src="@drawable/pause"
                        android:tint="@color/green"
                        android:visibility="gone" />

                    <ImageView
                        android:id="@+id/ivPlay"
                        android:layout_width="@dimen/_20sdp"
                        android:layout_height="@dimen/_20sdp"
                        android:layout_gravity="center"
                        android:src="@drawable/play" />
                </LinearLayout>
            </LinearLayout>

            <ImageView
                android:id="@+id/ivNext"
                android:layout_width="@dimen/_15sdp"
                android:layout_height="@dimen/_15sdp"
                android:layout_gravity="center|right"
                android:layout_toLeftOf="@+id/ivRepeat"
                android:layout_weight="1"
                android:src="@drawable/next" />

            <ImageView
                android:id="@+id/ivRepeat"
                android:layout_width="@dimen/_15sdp"
                android:layout_height="@dimen/_15sdp"
                android:layout_alignParentRight="true"
                android:layout_gravity="center|right"
                android:layout_weight="1"
                android:src="@drawable/repeat" />
        </LinearLayout>
    </LinearLayout>
</LinearLayout>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants