4

When there is a full screen enabled from the device display setting and the phone has a rounded edge on the bottom then my buttons at the bottom cut out a little bit. I have found some reference for notch cutout but not able to find the bottom cutout.

Solution Assumption: Margin at bottom >> Not fulfill my XD requirement. My buttons should be at the bottom without margin.

Please refer below screenshot.

enter image description here

Rushabh Shah
  • 680
  • 4
  • 22

1 Answers1

0

You can set the cutout mode either programmatically or by setting a style in your activity. The example below defines a style that you can use to apply the LAYOUT_IN_DISPLAY_CUTOUT_MODE_SHORT_EDGES attribute to the activity

<style name="ActivityTheme">
  <item name="android:windowLayoutInDisplayCutoutMode">
    shortEdges <!-- default, shortEdges, never -->
  </item>
</style>

For more detail Click Here

Krishna Sony
  • 1,286
  • 13
  • 27
  • It requires minimum API level 27. – Rushabh Shah May 16 '20 at 14:48
  • this type of device available on API level 27 and above – Krishna Sony May 16 '20 at 14:52
  • Not worked for me. – Rushabh Shah May 16 '20 at 14:55
  • 1
    Check Display Cutout for different devices https://stackoverflow.com/a/56609043/9523118 – Krishna Sony May 16 '20 at 14:58
  • yeah great! But that's all about notch display. I mean top. No reference for the bottom. – Rushabh Shah May 16 '20 at 15:11