michelelacorte / FlickLauncher

Pixel Launcher for everyone!
Apache License 2.0
290 stars 78 forks source link

settings doesn't show up on android 6.0 devices #15

Closed TeamBrainStorm closed 7 years ago

TeamBrainStorm commented 7 years ago

first off I want to say major kudos for making this launcher open source! when I run it on my android tablet it does not show the settings icon when you hold down on the home screen my tablet is running android 6.0.1 I look forward to seeing this launcher grow!

michelelacorte commented 7 years ago

Please attach screenshot

YAJATapps commented 7 years ago

See the hassettings method and where it Is used in launcher.java you will understand why it is not showing. In launcher3 it only had allow rotation setting so it hides the button who don't need allow rotation

michelelacorte commented 7 years ago

@YAJATapps You mean this:


        if (mLauncherCallbacks != null) {
            return mLauncherCallbacks.hasSettings();
        } else {
            // On devices with a locked orientation, we will at least have the allow rotation
            // setting.
            return !getResources().getBoolean(R.bool.allow_rotation);
        }
    }

it seems correct...
YAJATapps commented 7 years ago

I mean usage

    // Bind settings actions
    View settingsButton = findViewById(R.id.settings_button);
    boolean hasSettings = hasSettings();
    if (hasSettings) {
        settingsButton.setOnClickListener(new OnClickListener() {
            @Override
            public void onClick(View view) {
                if (!mWorkspace.isSwitchingState()) {
                    onClickSettingsButton(view);
                }
            }
        });
        settingsButton.setOnLongClickListener(performClickOnLongClick);
        settingsButton.setOnTouchListener(getHapticFeedbackTouchListener());
    } else {
        settingsButton.setVisibility(View.GONE);
    }

Here in last second line you can see if has settings is not true then the button visibility is gone

michelelacorte commented 7 years ago

Ah thanks sir! I will fix

TeamBrainStorm commented 7 years ago

sorry for the late reply do you still want me to attach a screenshot?

Please let me know :)

michelelacorte commented 7 years ago

No thanks!

michelelacorte commented 7 years ago

Fixed, next update 0.1.0 Alpha 54.. probably this evening!