tvbarthel / BlurDialogFragment

Library project to display DialogFragment with a blur effect.
Apache License 2.0
2.09k stars 334 forks source link

Action bar has unknown black text. #87

Open aalap03 opened 7 years ago

aalap03 commented 7 years ago

This is my simple implementation of blur dialog with my custom layout, and you can see the image. How to get rid of the text here. ?

public class PatternBlurDialog extends SupportBlurDialogFragment {
    List<PatternLockView.Dot> recorderPattern;
    PreferenceHelper preferenceHelper = App.getPreferences();

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
    }

    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        return inflater.inflate(R.layout.dialog_pattern_lock, container, false);
    }

    @Override
    public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
        super.onViewCreated(view, savedInstanceState);

        PatternLockView lockView = (PatternLockView) view.findViewById(R.id.pattern_lock_view);
        TextView header = (TextView) view.findViewById(R.id.pattern_header);

    }

    @Override
    protected float getDownScaleFactor() {
        // Allow to customize the down scale factor.
        return 5.0f;
    }

    @Override
    protected int getBlurRadius() {
        // Allow to customize the blur radius factor.
        return 7;
    }

    @Override
    protected boolean isActionBarBlurred() {
        // Enable or disable the blur effect on the action bar.
        // Disabled by default.
        return true;
    }

    @Override
    protected boolean isDimmingEnable() {
        // Enable or disable the dimming effect.
        // Disabled by default.
        return true;
    }

    @Override
    protected boolean isRenderScriptEnable() {
        // Enable or disable the use of RenderScript for blurring effect
        // Disabled by default.
        return true;
    }

    @Override
    protected boolean isDebugEnable() {
        // Enable or disable debug mode.
        // False by default.
        return true;
    }
}[

screenshot_20170810-152050 ](url)

aalap03 commented 7 years ago

my temporary fix is keeping getDownScaleFactor method's return value to 3.0f.. it worked somehow but I dont know thats the perfect solution.. let me know if I have something missing in my code..