getString()和optString()JSON有什么区别?
我正在使用非常天真的代码来显示底部对话框片段:
class LogoutBottomSheetFragment : BottomSheetDialogFragment() {
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
val view = inflater.inflate(R.layout.view_image_source_chooser, container, false)
return view
}
}
Run Code Online (Sandbox Code Playgroud)
这就是我调用此对话框的方式:
LogoutBottomSheetFragment().show(supportFragmentManager, "logout")
Run Code Online (Sandbox Code Playgroud)
但是我在下面的图片中看到了这个可怕的东西.如何将导航栏保持为白色(背面/主页软件按钮所在的底栏)?

我正在使用的应用主题:
<!-- Base application theme. -->
<style name="BaseAppTheme" parent="Theme.AppCompat.Light.NoActionBar">
<!-- Customize your theme here. -->
</style
<style name="AppTheme" parent="BaseAppTheme">
<item name="android:windowNoTitle">true</item>
<item name="windowActionBar">false</item>
<!-- Main theme colors -->
<!-- your app branding color for the app bar -->
<item name="android:colorPrimary">@color/colorPrimary</item>
<!-- darker variant for the status bar and contextual app …Run Code Online (Sandbox Code Playgroud) android navigationbar android-layout android-view bottom-sheet
我正在用希伯来语写一个应用程序(这是rtl).当我设置对话框片段的标题时,它出现在左侧.我尝试通过以下方式使其显示在右侧:
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState)
{
//set's up the title for this dialog fragment
getDialog().getWindow().setGravity(Gravity.RIGHT);
getDialog().setTitle(R.string.find_Address_text);
Run Code Online (Sandbox Code Playgroud)
但它不会影响标题的位置.我怎么能实现这个目标?TNX