Example usage for android.app Dialog getLayoutInflater

List of usage examples for android.app Dialog getLayoutInflater

Introduction

In this page you can find the example usage for android.app Dialog getLayoutInflater.

Prototype

public @NonNull LayoutInflater getLayoutInflater() 

Source Link

Usage

From source file:group.pals.android.lib.ui.filechooser.utils.ui.bookmark.BookmarkFragment.java

@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
    if (BuildConfig.DEBUG)
        Log.d(_ClassName, "onCreateDialog()");

    Dialog dialog = new Dialog(getActivity(), R.style.Afc_Theme_Dialog_Dark);
    dialog.setCanceledOnTouchOutside(true);
    dialog.requestWindowFeature(Window.FEATURE_LEFT_ICON);
    dialog.setTitle(R.string.afc_title_bookmark_manager);
    dialog.setContentView(initContentView(dialog.getLayoutInflater(), null));
    dialog.setFeatureDrawableResource(Window.FEATURE_LEFT_ICON, R.drawable.afc_bookmarks_dark);

    return dialog;
}

From source file:com.haibison.android.anhuu.utils.ui.bookmark.BookmarkFragment.java

@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
    if (BuildConfig.DEBUG)
        Log.d(CLASSNAME, "onCreateDialog()");

    Dialog dialog = new Dialog(getActivity(),
            UI.resolveAttribute(getActivity(), R.attr.anhuu_f5be488d_theme_dialog));
    dialog.setCanceledOnTouchOutside(true);
    dialog.requestWindowFeature(Window.FEATURE_LEFT_ICON);
    dialog.setTitle(R.string.anhuu_f5be488d_title_bookmark_manager);
    dialog.setContentView(initContentView(dialog.getLayoutInflater(), null));
    dialog.setFeatureDrawableResource(Window.FEATURE_LEFT_ICON, R.drawable.anhuu_f5be488d_bookmarks_dark);

    return dialog;
}

From source file:group.pals.android.lib.ui.filechooser.utils.ui.history.HistoryFragment.java

@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
    if (BuildConfig.DEBUG)
        Log.d(_ClassName, "onCreateDialog()");
    Dialog dialog = new Dialog(getActivity(), R.style.Afc_Theme_Dialog_Dark) {

        @Override//from  w  w w  .  ja  v  a2s.co m
        public boolean onCreateOptionsMenu(Menu menu) {
            getActivity().getMenuInflater().inflate(R.menu.afc_viewgroup_history, menu);
            return super.onCreateOptionsMenu(menu);
        }// onCreateOptionsMenu()

        @Override
        public boolean onPrepareOptionsMenu(Menu menu) {
            menu.findItem(R.id.afc_menuitem_clear)
                    .setEnabled(mHistoryCursorAdapter != null && mHistoryCursorAdapter.getGroupCount() > 0);
            return true;
        }// onPrepareOptionsMenu()

        @Override
        public boolean onMenuItemSelected(int featureId, MenuItem item) {
            if (BuildConfig.DEBUG)
                Log.d(_ClassName, "onMenuItemSelected() in Dialog");

            Ui.showSoftKeyboard(mSearchView, false);

            if (item.getItemId() == R.id.afc_menuitem_clear)
                doConfirmClearHistory();

            return true;
        }// onMenuItemSelected()
    };

    dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
    dialog.setCanceledOnTouchOutside(true);
    dialog.setContentView(initContentView(dialog.getLayoutInflater(), null));
    dialog.setOnKeyListener(mDialogOnKeyListener);

    Ui.adjustDialogSizeForLargeScreen(dialog);

    return dialog;
}

From source file:com.haibison.android.anhuu.utils.ui.history.HistoryFragment.java

@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
    if (BuildConfig.DEBUG)
        Log.d(CLASSNAME, "onCreateDialog()");
    Dialog dialog = new Dialog(getActivity(),
            UI.resolveAttribute(getActivity(), R.attr.anhuu_f5be488d_theme_dialog)) {

        @Override/*from   ww  w  . j a va2 s.c  om*/
        public boolean onCreateOptionsMenu(Menu menu) {
            getActivity().getMenuInflater().inflate(R.menu.anhuu_f5be488d_viewgroup_history, menu);
            return super.onCreateOptionsMenu(menu);
        }// onCreateOptionsMenu()

        @Override
        public boolean onPrepareOptionsMenu(Menu menu) {
            menu.findItem(R.id.anhuu_f5be488d_menuitem_clear)
                    .setEnabled(mHistoryCursorAdapter != null && mHistoryCursorAdapter.getGroupCount() > 0);
            return true;
        }// onPrepareOptionsMenu()

        @Override
        public boolean onMenuItemSelected(int featureId, MenuItem item) {
            if (BuildConfig.DEBUG)
                Log.d(CLASSNAME, "onMenuItemSelected() in Dialog");

            UI.showSoftKeyboard(mSearchView, false);

            if (item.getItemId() == R.id.anhuu_f5be488d_menuitem_clear)
                doConfirmClearHistory();

            return true;
        }// onMenuItemSelected()
    };

    dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
    dialog.setCanceledOnTouchOutside(true);
    dialog.setContentView(initContentView(dialog.getLayoutInflater(), null));
    dialog.setOnKeyListener(mDialogOnKeyListener);

    UI.adjustDialogSizeForLargeScreens(dialog);

    return dialog;
}