简体   繁体   English

在Android Studio中自动生成UI初始化

[英]Automatically generating UI initializations in Android Studio

There was an Android Studio plugin that enabled the user to right click and generate XML UI initializations automatically , I cannot find it now and I cannot find any replacement for it , is theres an alternative to writing the initializations of buttons and textviews by hand in Android Studio? 有一个Android Studio插件,使用户能够自动右键单击并生成XML UI初始化,我现在找不到它,我找不到任何替换它,是在Android中手动编写按钮和文本视图的初始化的替代方案工作室?

The old plugin used to work by right clicking then selecting "Generate" it work in the same way that getters and setters now work in Android Studio . 旧插件过去通过右键单击然后选择“生成”它的工作方式与getter和setter现在在Android Studio中工作的方式相同。

如果你不喜欢所有的胶水代码只是使用Android数据绑定库或像Butterknife这样的一些注释库都很好,以保持清洁代码

I think yo're talking about ButterKnife Zelezny plugin. 我想你在谈论ButterKnife Zelezny插件。

Check it: https://github.com/avast/android-butterknife-zelezny 检查一下: https//github.com/avast/android-butterknife-zelezny

Hope it will help 希望它会有所帮助

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM