這裏分享幾個android studio插件,絕對提升開發逼格:
AndroidSelectorChapek
androidSelectorChapek—github
安裝方法:
1:Android studio ->Preferences→Plugins→Browse repositories 選擇SelectorChapek。
2: 本地下載, 安裝方法Preferences→Plugins→Install plugin from disk。安裝插件成功之後,選擇幾張圖片放在drawable-hdpi或者drawable-xhdpi下點擊右鍵選擇generate android selectors
在drawable folder裏面自動會生成selector文件 如下:
這裏有個地方要注意圖片的後綴需要規範具體的規範如下:
還有一點就是圖片的前綴一定要相同否則生成不了圖片如上例:
ADB IDEA
功能概要:一鍵彈出ADB命令,再也不要敲那些噁心的ADB命令了(當然基本的ADB命令你還是得記住,這個只是爲了偷懶而偷懶!-))
安裝插件方法同樓上:
安裝完之後具體使用如下一般有兩種,具體如下:
1:全局搜索(double shift):
2:Tools->Android->ADB Idea
裝完之後,瞬間提升逼格。
Prettify
這個絕對是好東西,看下佈局文件:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<Button
android:id="@+id/button1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="button1" />
<Button
android:id="@+id/button2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/button1"
android:text="button2" />
<Button
android:id="@+id/button3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/button2"
android:text="button3" />
<TextView
android:id="@+id/textview1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/button3"
android:text="textview1" />
<TextView
android:id="@+id/textview2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/textview1"
android:text="textview2" />
<TextView
android:id="@+id/textview3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/textview2"
android:text="textview3" />
</RelativeLayout>
裝完之後看下圖演示,好爽有沒有:
自動生成findViewById,再也不用敲擊這些噁心代碼了。
後續會持續更新。