打造開發神器—Android Studio上的常用5個插件介紹
用Generate的快捷鍵. alt+Ins插入(0)
File-->Settings...-->Plugins-->輸入要的插件名稱(可以搜索)或Browse repostiories裏找
1.Android Layout ID Converter 生成findView代碼的使用方法
2.GsonFormat 根據json數據生成bean類
json數據
{
"HeWeather data service 3.0": [
{
"basic": {
"city": "故宮博物院",
"cnty": "中國",
"id": "CN10101010018A",
"lat": "116.39",
"lon": "39.91",
"update": {
"loc": "2015-11-17 08:10",
"utc": "2015-11-17 00:10"
}
},
"daily_forecast": [
{
"astro": {
"sr": "07:01",
"ss": "16:57"
},
"cond": {
"code_d": "101",
"code_n": "305",
"txt_d": "多雲",
"txt_n": "小雨"
},
"date": "2015-11-17",
"tmp": {
"max": "9",
"min": "1"
},
"wind": {
"dir": "無持續風向",
"sc": "微風"
}
},
{
"astro": {
"sr": "07:02",
"ss": "16:56"
},
"cond": {
"code_d": "104",
"code_n": "305",
"txt_d": "陰",
"txt_n": "小雨"
},
"date": "2015-11-18",
"tmp": {
"max": "6",
"min": "2"
},
"wind": {
"dir": "無持續風向",
"sc": "微風"
}
},
{
"astro": {
"sr": "07:03",
"ss": "16:56"
},
"cond": {
"code_d": "305",
"code_n": "305",
"txt_d": "小雨",
"txt_n": "小雨"
},
"date": "2015-11-19",
"tmp": {
"max": "4",
"min": "2"
},
"wind": {
"dir": "北風",
"sc": "微風"
}
},
{
"astro": {
"sr": "07:04",
"ss": "16:55"
},
"cond": {
"code_d": "104",
"code_n": "305",
"txt_d": "陰",
"txt_n": "小雨"
},
"date": "2015-11-20",
"tmp": {
"max": "6",
"min": "0"
},
"wind": {
"dir": "東風",
"sc": "微風"
}
},
{
"astro": {
"sr": "07:05",
"ss": "16:54"
},
"cond": {
"code_d": "305",
"code_n": "404",
"txt_d": "小雨",
"txt_n": "雨夾雪"
},
"date": "2015-11-21",
"tmp": {
"max": "1",
"min": "-2"
},
"wind": {
"dir": "東風",
"sc": "微風"
}
},
{
"astro": {
"sr": "07:06",
"ss": "16:54"
},
"cond": {
"code_d": "101",
"code_n": "101",
"txt_d": "多雲",
"txt_n": "多雲"
},
"date": "2015-11-22",
"tmp": {
"max": "2",
"min": "-5"
},
"wind": {
"dir": "西北風",
"sc": "微風"
}
},
{
"astro": {
"sr": "07:07",
"ss": "16:53"
},
"cond": {
"code_d": "101",
"code_n": "101",
"txt_d": "多雲",
"txt_n": "多雲"
},
"date": "2015-11-23",
"tmp": {
"max": "1",
"min": "-10"
},
"wind": {
"dir": "東北風",
"sc": "微風"
}
}
],
"status": "ok"
}
]
}
3.AndroidCodeGenerator 生成ViewHolder和findView方法的代碼
4.SelectorChapek for Android 你需要在drawable文件夾中右鍵,在彈出的菜單中選擇Generate Android Selectors 它就會根據你的幾個drawable文件夾裏的資源的命名,幫你生成Selector代碼。
5.Android Parcelable code generator 生成實現了Parcelable接口的代碼的插件