For API 27+, you can do this via styles:
<!-- added in API 27 -->
<item name="android:windowLightNavigationBar">true</item>
<!-- required to contrast the dark buttons -->
<item name="android:navigationBarColor">@android:color/white</item>
<!-- optional -->
<item name="android:navigationBarDividerColor">@android:color/black</item>
While the XML attribute was introduced in API 27, the support for a light navigation bar was introduced one version earlier, in API 26, via SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR
.
Therefore, to target the earliest devices that support it, you'll have do it via code, rather than XML styles.