Skip to content Skip to sidebar Skip to footer

How To Solve Requestfeature() Must Be Called Before Adding Content In Android

I am creating an application that consists of the simple and small registration form pop up in an alert dialog when we click a button. But it was showing an error called android.u

Solution 1:

Problem is caused by MaterialDesignLibrary.due to following line in Dialog class:

@OverrideprotectedvoidonCreate(Bundle savedInstanceState) {
 requestWindowFeature(Window.FEATURE_NO_TITLE);
 ....
}

here requestWindowFeature is called after calling setContentView method in Activity.

To fix this issue you should remove requestWindowFeature(Window.FEATURE_NO_TITLE); line from Dialog class of library

Post a Comment for "How To Solve Requestfeature() Must Be Called Before Adding Content In Android"