Skip to content

Instantly share code, notes, and snippets.

@root-ansh
Last active July 1, 2018 19:45
Show Gist options
  • Save root-ansh/b72d8bb21cd94a73178e3691209731e2 to your computer and use it in GitHub Desktop.
Save root-ansh/b72d8bb21cd94a73178e3691209731e2 to your computer and use it in GitHub Desktop.
CustomNavDrawer 1.4 hack
public class MainActivity extends AppCompatActivity
implements NavigationView.OnNavigationItemSelectedListener {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
...
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
Window w = getWindow();
w.setFlags(WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS,
WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS);// will remove all window bounds of our activity
}
...
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment