Android Studio插件推荐

工欲善其事,必先利其器

1. ADB Idea:ADB命令快捷操作

能快速实现多种ADB常用的功能:

命令 说明
ADB Uninstall App 卸载应用
ADB Kill App 杀死进程
ADB Start App 启动应用
ADB Restart App 杀死应用后,再重启应用
ADB Clear App Data 清除应用数据
ADB Clear App Data and Restart 清除应用数据+重启
ADB Revoke Permissions 取消权限授予
ADB Start App With Debugger 调试模式下打开应用(若应用已启动,则依附为调试模式)
ADB Restart App With Debugger 杀死应用并用调试模式打开
Enable/Disable Wi-Fi 开/关WIFI
Enable/Disable Mobile Data 开/关数据流量
Android Studio插件推荐
ADB Idea.png

可以通过快捷键弹出命令列表窗口,再用数字键选中要执行的命令。强烈推荐。


2. TinyPNG:图片压缩

利用TinyPNG的API,开发的图片压缩工具。现在无需 API Key,免费无限制使用。
简直完美!原本的TinyPNG操作繁琐而且有限制,而这个插件一键全局图片压缩(可选定目录),高效方便
,而且还有输出压缩前后的对比数据报告。

Android Studio插件推荐
TinyPNG.png


3. Material Theme UI:Android Studio材料设计主题

![Material Theme UI].png](https://upload-images.jianshu.io/upload_images/33019-1f9f47c95435ea92.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
有多款主题仍君选。
是的,Android Studio自带的Darcula并不满足我。


4.Atom Material Icons:Android Studio图标主题包

Android Studio插件推荐
Atom Material Icons.png

换个图标,更好看哟。


5.String Manipulation:高效文本编辑

①. Switch Case选项:字符转换

可以根据最后一列转义后的结果,对照着找相应的选项。不过其实只要仔细看过一轮,都可以根据选项的命名规则,推测出其作用。

选项 说明 转换前 转换后
SCREAMING_SNAKE_CASE 全大写,以“_”分割单词 HelloWorld HELLO_WORLD
snake_case 全小写,以“_”分割单词 HelloWorld hello_world
kebab-case 全小写,以“-”分割单词 HelloWorld hello-world
dot.case 全小写,以“.”分割单词 HelloWorld hello.world
PascalCase 大骆驼拼写法(帕斯卡拼写法):所有单词首字母都大写 HelloWorld HelloWorld
lowercase words 全部小写,单词间以空格隔开 HelloWorld hello world
First word capitalized 第一个单词首字母大写,其余小写,单词间以空格隔开 HelloWorld Hello world
Capitalized Words 所有单词首字母大写,其余小写,单词间以空格隔开 HelloWorld Hello World
camelCase 小骆驼拼写法:除了第一个单词,其余的首字母都大写 HelloWorld helloWorld
Capitalize 首字母大写,其余小写 HelloWorld Helloworld
To lower case 全部小写 HelloWorld helloworld
To UPPER CASE 全部大写 HelloWorld HELLOWORLD
Invert case 全部大小写切换 HelloWorld helloworld、HELLOWORLD

②. Encode/Decode:编解码

选项 说明 转换前 转换后
Encode to MD5 Hex16 16进制MD5加密 https://www.jianshu.com/ 90c254ba855a10a48a5474418327a980
De/Encode to Base64 Base64加密 https://www.jianshu.com/ aHR0cHM6Ly93d3cuamlhbnNodS5jb20v
De/Encode to Hex 16进制编码 https://www.jianshu.com/ 68747470733a2f2f7777772e6a69616e7368752e636f6d2f
De/Encode URL 编解码URL https://www.jianshu.com/ https%3A%2F%2Fwww.jianshu.com%2F
De/Encode URL(RFC 3986) 采用RFC 3986编码规范处理URL https://www.jianshu.com/ https%3A%2F%2Fwww.jianshu.com%2F

③. Un/Escape:采用ISO Latin字符集对指定的字符串进行编码。

目前没遇到相应的使用场景,不细究。
| 选项 |
| :--------:|
|Un/Escape selected Java text|
|Un/Escape selected JavaScript text|
|Un/Escape selected HTML text|
|Un/Escape selected JSON text|
|Un/Escape selected XML text|
|Un/Escape selected SQL text|
|Un/Escape selected PHP text|
|Convert diacritics (accents) to ASCII|
|Convert non-ASCII to escaped Unicode|
|Convert escaped Unicode to String|

④. Increment/Decrement:递增/递减

选项 说明 转换前 转换后
Decrement 查找所有的数字,减1 String b1 = "1"; String b0 = "0";
Increment 查找所有的数字,加1 String b1 = "1"; String b2 = "2";
Duplicate and Decrement 往上加多一行,并且对这一行减1 String b1 = "1"; String b0 = "0"; String b1 = "1";
Duplicate and Increment 往下加多一行,并且对这一行加1 String b1 = "1"; String b1 = "1"; String b2 = "2";
Create sequence 创建队列:第一个数字不变,其余以其为基础逐个+1:用于将想通数字都加1 int[] a = new int[]{1, 0, -2}; int[] a = new int[]{1, 2, 3};
Increment Duplicates 递归的方式,将所有重复的数字逐步+1 int[] a = new int[]{1, 1, 10}; int[] a = new int[]{1, 2, 10};

⑤. Sort:排序

这个功能的多个选项都是打开同一个面板进行参数设置,所以直接讲解面板。目前测试结果主要是第1、2个版块功能比较明确。

Android Studio插件推荐
String Manipulation.png

1:排序类型

  • Case InSensitive:大小写不敏感
  • Case Sensitive:大小写敏感:先大写再小写
  • By Length:依据长度
  • Hexadecimal:十六进制(暂时不明白使用场景)
  • Reverse:反转当前的顺序
  • Shuffle:随机打乱当前排序

2:方向

  • Ascending:递增
  • Descending:递减

3:排序比较器:(测试失败,不明确使用场景)

  • Normal comparator:普通比较器
  • Natural Order comparator:自然数比较器
  • Collator:校对机,选择后可以再选择相应的语言作为排序依据

4:其他细项

  • Ignore Leading Whitespaces:忽略前导空格(测试失败,不明确使用场景)
  • Preserve Leading Whitespaces:保留前导空格(测试失败,不明确使用场景)
  • Remove Blank Lines /Preserve Blank Lines :删除/保留选中代码中间的空行
  • Preserve Trailing Characters:保留尾部字母(测试失败,不明确使用场景)

⑥. Filter/Remove/Trim选项:筛选、移除

选项 说明
Grep selected text, All lines not matching input text wil be removed. (Does not work in column mode) 查找所有包含关键字的行
Inverted Grep 查找所有不包含关键字的行
Remove duplicate lines 删除重复的行
Keep only duplicate lines 只保留重复的行
Remove empty lines 删除空的行
Remove all newlines 合并成一行
Trim selected text 去除前后空格
Trim all spaces in selected text 去除前后空格,并删除无用的空格
Remove all spaces in selected text 删除所有的空格(比如两个单词会被合并成1个)

总结

强烈推荐Duplicate and Increment这个命令,在编写一些重复代码的需求时,有非常大的作用。


6. Android Material Design Icon Generator:Android材料设计图标生成器

版本兼容,暂不可用,等开发者更新