一般情况下,很多时候,我们需要序列化的时候,因为Parcalable相关代码写起来比较费劲,更多时候都是直接选择实现Serializable接口。在部分场景下,Parcalable的效率更高,当有了该插件,就支持一键生成Parcalable相关代码啦。
https://github.com/mcharmas/android-parcelable-intellij-plugin
有了该插件就可以非常方便看到引入的类库的方法数量,可以用于权衡是否值得引入该库。
https://plugins.jetbrains.com/plugin/8076-android-methods-count
打开 Android 项目的资源文件时, 会自动对文件中的资源标签统计其被引用次数, 展示在标签的前面。
https://github.com/niorgai/Android-Resource-Usage-Count
资源按照一定的命名格式,然后右键自动生成selcetor~
Right-click folder with your resources e.g 'drawable-xhdpi'
Select 'Generate Android Selectors'
All selectors automagically appear in the 'drawable' folder!
https://github.com/inmite/android-selector-chapek
这个JSON转Java类,很方便~
https://github.com/nvinayshetty/DTOnator
Right click the strings resource file, choose 'Convert to other languages'.
Then check the target languages.
![]()
After clickingOK
, the string resources will be translated and created in the correct value folder.
可以自动翻译strings.xml到目标语言~~我想这个结束了,应该还是需要微调的吧~
https://github.com/westlinkin/AndroidLocalizationer
选中代码,选择 Edit -> Translate或者按下 command + I(也可以自己设定)。即可翻译。效果如下:
https://github.com/Skykai521/ECTranslation
好了,其实好用的插件非常多,那么有没有一个地方做这个收集呢?其实是有这样一个项目的:
https://github.com/balsikandar/Android-Studio-Plugins
本文前除了最后一个以外都选自该项目收集的插件,该仓库收集插件非常多,建议打开看一眼(不止下图~)。
当然了,本篇的目的除了介绍一些可以提升开发效率的插件之后,还希望大家能够掌握Studio插件的编写,其实并不复杂,以前也写过教程,可参考:
-
自己编写Android Studio插件
http://blog.youkuaiyun.com/u011976726/article/details/53217238
好了~本文无限感谢sunzq,主要由sunzq导致该文的产生,所以也是本文的协同作者,并且他目前维护了一份该仓库的中文版本:
https://github.com/sunzq19931016/Android-Studio-Plugins-cn