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

Commit 6ed11528 authored by Amit Kumar's avatar Amit Kumar 💻
Browse files

Close #171 - Check for on screen navigation bar enable/disable and redraws UI

parent 39daf9f9
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -54,6 +54,10 @@ public class BlissLauncher extends Application {
        return deviceProfile;
    }

    public void resetDeviceProfile() {
        deviceProfile = new DeviceProfile(this);
    }

    public IconsHandler getIconsHandler() {
        if (iconsPackHandler == null) {
            iconsPackHandler = new IconsHandler(this);
+1 −0
Original line number Diff line number Diff line
@@ -539,6 +539,7 @@ public class HorizontalPager extends ViewGroup implements Insettable{
        setLayoutParams(lp);
        updateInsetsForChildren();
        this.insets = insets;
        postInvalidate();
    }

    private void updateInsetsForChildren() {
+4 −0
Original line number Diff line number Diff line
@@ -8,19 +8,23 @@ import android.view.ViewGroup;
import android.view.WindowInsets;
import android.widget.RelativeLayout;

import foundation.e.blisslauncher.BlissLauncher;
import foundation.e.blisslauncher.R;

public class InsettableRelativeLayout extends RelativeLayout {

    private final Context mContext;
    protected WindowInsets mInsets;


    public InsettableRelativeLayout(Context context, AttributeSet attrs) {
        super(context, attrs);
        mContext = context;
    }

    @Override
    public WindowInsets onApplyWindowInsets(WindowInsets insets) {
        BlissLauncher.getApplication(mContext).resetDeviceProfile();
        updateChildInsets(insets);
        mInsets = new WindowInsets(insets);
        return insets;