Android Studio:在 XML 布局中“包装在容器中" [英] Android Studio: 'wrap in container' in XML layout
本文介绍了Android Studio:在 XML 布局中“包装在容器中"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在编辑 XML 布局文件时,Eclipse 有一项称为包装在容器中"(重新格式化 -> Android -> ...)的功能,可让您选择一个或多个视图并在其周围包装您选择的布局.Android Studio 中是否有类似的东西?
When editing XML layout files, Eclipse has a feature called 'wrap in container' (Reformat -> Android -> ...) that lets you select one or several Views and wrap a layout of your choice around it. Is there something similar in Android Studio?
推荐答案
您可以为此使用实时模板.这是一篇不错的文章关于
You can use Live Templates for that. Here's a nice article about them.
可以通过File->Settings->Editor->Live Templates
添加新模板.
要找到键盘映射的热键,请转到 File->Settings
并编写Live template".对我来说是 CTRL + J .
To find the hotkey for your keymap go to File->Settings
and write "Live template". For me it's CTRL + J .
这篇关于Android Studio:在 XML 布局中“包装在容器中"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文