<commit_before>package com.nikialeksey.fullscreendialog;


import android.content.Context;
import android.graphics.Color;
import android.graphics.drawable.ColorDrawable;
import android.support.annotation.NonNull;
import android.support.v7.app.AppCompatDialog;
import android.view.Gravity;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;

public class FsDialog extends AppCompatDialog {

    public FsDialog(@NonNull final Context context, @NonNull final String title,
                    @NonNull final FsDialogCloseAction closeAction,
                    @NonNull final String actionTitle, @NonNull final FsDialogAction action) {
        super(context);
        supportRequestWindowFeature(Window.FEATURE_NO_TITLE);

        final Window window = getWindow();
        if (window == null) {
            throw new IllegalStateException("Non visual activity");
        }

        final View root = new FsDialogLayout(context, new FsDialogToolbar(context, title, new FsToolbarCloseAction() {
            @Override
            public void onClose() {
                dismiss();
                closeAction.onClose(FsDialog.this);
            }
        }, actionTitle, new FsToolbarAction() {
            @Override
            public void onAction() {
                action.onAction(FsDialog.this);
            }
        }));
        super.setContentView(root);

        window.setBackgroundDrawable(new ColorDrawable(Color.WHITE));
        window.setGravity(Gravity.CENTER);
        window.setLayout(WindowManager.LayoutParams.MATCH_PARENT,<commit_msg>Added task about system bar color<commit_after>package com.nikialeksey.fullscreendialog;


import android.content.Context;
import android.graphics.Color;
import android.graphics.drawable.ColorDrawable;
import android.support.annotation.NonNull;
import android.support.v7.app.AppCompatDialog;
import android.view.Gravity;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;

public class FsDialog extends AppCompatDialog {

    public FsDialog(@NonNull final Context context, @NonNull final String title,
                    @NonNull final FsDialogCloseAction closeAction,
                    @NonNull final String actionTitle, @NonNull final FsDialogAction action) {
        super(context);
        // @todo 10:60min make the system bar and nav bar true color, when dialog is showing
        supportRequestWindowFeature(Window.FEATURE_NO_TITLE);

        final Window window = getWindow();
        if (window == null) {
            throw new IllegalStateException("Non visual activity");
        }

        final View root = new FsDialogLayout(context, new FsDialogToolbar(context, title, new FsToolbarCloseAction() {
            @Override
            public void onClose() {
                dismiss();
                closeAction.onClose(FsDialog.this);
            }
        }, actionTitle, new FsToolbarAction() {
            @Override
            public void onAction() {
                action.onAction(FsDialog.this);
            }
        }));
        super.setContentView(root);

        window.setBackgroundDrawable(new ColorDrawable(Color.WHITE));
        window.setGravity(Gravity.CENTER);
        window.setLayout(WindowManager.LayoutParams.MATCH_PARENT,
{'fraction_non_alphanumeric': 0.08351047676890373, 'fraction_numerical': 0.0018220467658669906, 'mean_word_length': 2.786206896551724, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6439481', 'n_tokens_mistral': 847, 'n_tokens_neox': 839, 'n_words': 197}