[英]Drag and Drop in Android Studio layout editor
I have a problem with adding images to my app's layout. 将图像添加到我的应用布局时出现问题。 I've searched for an answer for a while, but even when doing exactly what friendly people of the internet told me, there is still no success.
我一直在寻找答案,但是即使按照互联网上友好人士告诉我的方式进行,也仍然没有成功。
Any idea what may be the cause of this problem? 任何想法可能是此问题的原因吗?
View of my android studio screen: 我的android studio屏幕视图:
You must store your images on Drawables
folders not in drawable
-drawable-hdpi,drawable-mdpi,drawable-xhdpi..... 您必须将图像存储在
Drawables
文件夹中,而不是drawable
-drawable-hdpi,drawable-mdpi,drawable-xhdpi .....
You should drag an ImageView
, then add the image with the src param
. 您应该拖动
ImageView
,然后添加带有src param
的图像。 You can't directly drag and drop images 您不能直接拖放图像
You can't add elements in "Palette". 您不能在“调色板”中添加元素。
RelativeLayout
... Okay, whatever layout it's good RelativeLayout
...好吧,无论哪种布局都不错
UPDATE1 UPDATE1
----------> see point 1. ---------->参见第1点。
Yes you can drag&drop that elemenst, TextViews, ImageViews, Edittext....
是的,您可以拖放该元素,
TextViews, ImageViews, Edittext....
您应该拖动一个ImageView,然后添加带有src参数的图像(可以在右侧菜单或xml中执行此操作)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.