Skip to content

Commit 867cc99

Browse files
madhurgupta10neslihanturan
authored andcommitted
Fixed Width of Navigation Drawer for Tablets (commons-app#2856)
1 parent c4b7164 commit 867cc99

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

app/src/main/java/fr/free/nrw/commons/theme/NavigationBaseActivity.java

-11
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@ public void initDrawer() {
7373
drawerLayout.addDrawerListener(toggle);
7474
toggle.setDrawerIndicatorEnabled(true);
7575
toggle.syncState();
76-
setDrawerPaneWidth();
7776
setUserName();
7877
Menu nav_Menu = navigationView.getMenu();
7978
View headerLayout = navigationView.getHeaderView(0);
@@ -147,16 +146,6 @@ public void initBack() {
147146
getSupportActionBar().setDisplayShowHomeEnabled(true);
148147
}
149148

150-
private void setDrawerPaneWidth() {
151-
ViewGroup.LayoutParams params = navigationView.getLayoutParams();
152-
// set width to lowerBound of 70% of the screen size in portrait mode
153-
// set width to lowerBound of 50% of the screen size in landscape mode
154-
int percentageWidth = getResources().getInteger(R.integer.drawer_width);
155-
156-
params.width = (getResources().getDisplayMetrics().widthPixels * percentageWidth) / 100;
157-
navigationView.setLayoutParams(params);
158-
}
159-
160149
@Override
161150
public boolean onNavigationItemSelected(@NonNull final MenuItem item) {
162151
final int itemId = item.getItemId();

0 commit comments

Comments
 (0)