小编Jul*_*ñas的帖子

FragmentContainerView 是否有等效的“工具:布局=”?

为了能够看到预览Android Studio中的布局时,一个片段内部的某一观点的内容,它是可以做到这样

<MainLayoutView xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools">

    <fragment
        ...
        tools:layout="@layout/my_fragment_view"/>

</MainLayoutView>
Run Code Online (Sandbox Code Playgroud)

但是,如果您从 切换fragmentandroidx.fragment.app.FragmentContainerView,这个方便的工具将停止工作,片段在预览屏幕上只会显示为空白。

FragmentContainerView在 Android Studio 的布局中预览内容时,有没有办法在 a 中显示内容?

android android-studio

26
推荐指数
1
解决办法
1355
查看次数

标签 统计

android ×1

android-studio ×1