有没有办法在 Android Studio 编辑器中显示 RecyclerView 内容的预览? [英] Is there a way to show a preview of a RecyclerView's contents in the Android Studio editor?

查看:39
本文介绍了有没有办法在 Android Studio 编辑器中显示 RecyclerView 内容的预览?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我将 RecyclerView 添加到布局时,它显示为一个空白屏幕.有没有办法,比如通过 tools 命名空间,来显示 RecyclerView 内容的预览?

When I add the RecyclerView to the layout, it shows up as a blank screen. Is there a way, such as through the tools namespace, to show a preview of the content of the RecyclerView?

推荐答案

@oRRs 是对的!

我使用的是 Android Studio 1.4 RC2,您现在可以指定任何自定义布局.

I'm using Android Studio 1.4 RC2 and you can now specify any custom layout.

我尝试了自定义 CardView 并且它有效.

I tried a custom CardView and it works.

tools:listitem="@android:layout/simple_list_item_checked"

这篇关于有没有办法在 Android Studio 编辑器中显示 RecyclerView 内容的预览?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆