Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WindowFeature needs to apply to fragments #77

Open
ghost opened this issue Feb 6, 2014 · 4 comments
Open

WindowFeature needs to apply to fragments #77

ghost opened this issue Feb 6, 2014 · 4 comments

Comments

@ghost
Copy link

ghost commented Feb 6, 2014

I am trying to create a dialog fragment and need to specify @WindowFeature(Window.FEATURE_NO_TITLE) which is currently not possible with annotations. For now I will do it in a base class specifically for that purpose.

@ghost
Copy link
Author

ghost commented Feb 6, 2014

This might need to be a bit of a special case for dialog fragments...

http://stackoverflow.com/a/15279400/2031

@johncarl81
Copy link
Owner

You can use the @LayoutHandler to specify a custom layout builder that would include the window feature code. Let me know if you need more details around this.

@ghost
Copy link
Author

ghost commented Feb 7, 2014

The base class is probably the same amount of code...

public class NoTitleDialogFragment extends DialogFragment {
  @Override
  public Dialog onCreateDialog(Bundle savedInstanceState) {
    Dialog dialog = super.onCreateDialog(savedInstanceState);
    dialog.getWindow().requestFeature(Window.FEATURE_NO_TITLE);
    return dialog;
  }
}

@johncarl81
Copy link
Owner

Ah, good point.

@johncarl81 johncarl81 added this to the 0.3.0 Release milestone Aug 24, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant