3
我有以下布局文件:Android Studio中预览片段
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:orientation="vertical"
android:layout_height="match_parent">
<TextView
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="@string/what_did_you_eat"/>
<FrameLayout
android:id="@+id/container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
tools:context=".AddFoodActivity"
tools:ignore="MergeRootFrame"
/>
</LinearLayout>
FrameLayout
将包含一个动态的添加fragment
,有没有办法在编辑器中fragment
预览? 像我们可以做什么时使用<片段>标签与tools:layout
属性?
已答复的答案是重定向的文档。我看着工具文档,但我没有看到aswer。你能发布确切的解决方案? – LunaVulpo