Try below code:
Resources resources = context.getResources();
int resourceId = resources.getIdentifier("navigation_bar_height", "dimen", "android");
if (resourceId > 0) {
return resources.getDimensionPixelSize(resourceId);
}
return 0;
More Related Contents:
- How to crop circular area from bitmap in Android
- How to make text glow?
- Android Shared preferences for creating one time activity (example) [closed]
- Android – How To Override the “Back” button so it doesn’t Finish() my Activity?
- Android- Going back to Previous Activity with different Intent value
- Android app out of memory issues – tried everything and still at a loss
- Finish an activity from another activity
- Android activity over default lock screen
- Pass data from Activity to Service using an Intent
- Is it a bad practice to use negative margins in Android?
- Android: Using WebView outside an Activity context
- Difference between SurfaceView and View?
- Android: Clear Activity Stack
- How to get hosting Activity from a view?
- How to cancel an Dialog themed like Activity when touched outside the window?
- How to display more than 3- levels of expandable List View?
- Notify activity from service
- How can I pass values between Activities on Android?
- How to detect “Recent Apps” system button clicks (Honeycomb+)
- How open new activity clicking an item in listview?
- android:configChanges=”orientation” does not work with fragments
- Rotating a drawable in Android
- Android — How to allow horizontal and vertical scrolling
- Is it possible to make a horizontal NumberPicker?
- Android 4.2.1 wrong character kerning (spacing)
- Android checking whether the app is closed
- Error when adding buildFeatures in build.gradle file
- Android: startActivityForResult & setResult for a view class and an activity class
- What method is being called when I close an app
- Can you have two activities running at the same time?