Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Unverified Commit d2b9e34b authored by Wolf-Martell Montwé's avatar Wolf-Martell Montwé
Browse files

Hide slider view by default and only show when LegacyDrawer is initialized

parent 19e5f3ba
Loading
Loading
Loading
Loading
+7 −2
Original line number Original line Diff line number Diff line
@@ -7,6 +7,7 @@ import android.graphics.PorterDuff
import android.graphics.drawable.Drawable
import android.graphics.drawable.Drawable
import android.net.Uri
import android.net.Uri
import android.os.Bundle
import android.os.Bundle
import android.view.View
import android.widget.ImageView
import android.widget.ImageView
import androidx.appcompat.app.AppCompatActivity
import androidx.appcompat.app.AppCompatActivity
import androidx.core.view.GravityCompat
import androidx.core.view.GravityCompat
@@ -108,6 +109,8 @@ class LegacyDrawer(
        get() = drawer.isOpen
        get() = drawer.isOpen


    init {
    init {
        sliderView.visibility = View.VISIBLE

        textColor = parent.obtainDrawerTextColor()
        textColor = parent.obtainDrawerTextColor()


        initializeImageLoader()
        initializeImageLoader()
@@ -553,8 +556,10 @@ private fun Context.obtainDrawerTextColor(): Int {
        MaterialDrawerR.attr.materialDrawerStyle,
        MaterialDrawerR.attr.materialDrawerStyle,
        MaterialDrawerR.style.Widget_MaterialDrawerStyle,
        MaterialDrawerR.style.Widget_MaterialDrawerStyle,
    )
    )
    val textColor =
    val textColor = styledAttributes.getColor(
        styledAttributes.getColor(MaterialDrawerR.styleable.MaterialDrawerSliderView_materialDrawerPrimaryText, 0)
        MaterialDrawerR.styleable.MaterialDrawerSliderView_materialDrawerPrimaryText,
        0,
    )
    styledAttributes.recycle()
    styledAttributes.recycle()


    return textColor
    return textColor
+1 −0
Original line number Original line Diff line number Diff line
@@ -11,6 +11,7 @@
        android:id="@+id/material_drawer_slider"
        android:id="@+id/material_drawer_slider"
        android:layout_width="wrap_content"
        android:layout_width="wrap_content"
        android:layout_height="match_parent"
        android:layout_height="match_parent"
        android:visibility="gone"
        />
        />


</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>