This month because of a variety of things in the busy, including to catch the project, back home, and prepare to travel, so should not write four blog. Here are some handy plugins for Android Studio that I'm using, which may save you time or make you happy.
Or the old saying, this article original, reproduced please indicate in the CSDN blog source:
http://blog.csdn.net/maosidiaoxian/article/details/44992655
All of the following plugins can be found in the idea's plugin library, and if you can't find any plugins like me in Android Studio, you can install them offline in the idea plugin site (http://plugins.jetbrains.com/ Category/?idea&category_id=all), then select Install plugin from disk in the plugin management of Android Studio. Note that you may need to flip the wall to open it.
1. Android parcelable Code Generator
As the name implies, this is a plug-in that generates code that implements the Parcelable interface.
In your class, press ALT + Insert to eject the context menu of the insertion code, and you will see a parcelable below, as shown below. After selecting it, the code that implements the Parcelable interface is inserted into your class. No need to manually write parcelable code, how does it feel?
2. Androidcodegenerator
It is described as code that can generate Viewholder and Findview methods. But how to generate the code for the Findview method I haven't found yet, but generating viewholder is also pretty cool.
In the GetView of your adapter implementation class, position the cursor to the variable of the ID of your layout file, and press Alt+insert plugin code to see a more create view holder, such as.
After selecting it, it generates the corresponding Viewholder code for you, based on the element that declares the ID in the layout file, as follows:
public class Viewholder {public final TextView time; Public final ImageView IsNew; Public final TextView username; Public final TextView Department; Public final ImageView Enter; Public final Circleimageview Avatar; Public final relativelayout Listcontent; public final View Root; Public Viewholder (View root) {time = (TextView) Root.findviewbyid (r.id.time); IsNew = (ImageView) Root.findviewbyid (r.id.is_new); Username = (TextView) Root.findviewbyid (r.id.username); Department = (TextView) Root.findviewbyid (r.id.department); Enter = (ImageView) Root.findviewbyid (r.id.enter); Avatar = (Circleimageview) Root.findviewbyid (R.id.avatar); Listcontent = (relativelayout) Root.findviewbyid (r.id.list_content); This.root = root; } }
Is it convenient?
3. Android Layout ID Converter
Because I didn't find the way to generate Findview code in the plugin above, I found another plugin to generate the code.
How to use: Right-click in your layout file and choose Convert Android Layout xml from the pop-up menu as shown in:
Then it will pop up a panel, as shown below. Select the format of the code you want to generate, press OK, then it has copied the generated code into your pasteboard, and then you can paste the code out by pressing CTRL + V in the activity or fragment that uses the layout file.
4. Selectorchapek for Android
This is the plug-in used to generate selector. You need to right-click in the Drawable folder and choose Generate Android Selectors in the popup menu, as shown below, it will be named according to the resources in several drawable folders to help you generate selector code. Of course, your resource file needs to be named according to the agreed suffix. For example, press the state to _pressed, the normal state is _normal, the status is _disable, and so on. More detailed instructions can be seen on GitHub on the project's documentation, the project address is: Https://github.com/inmite/android-selector-chapek.
5. Sexy Editor
This is the axial plug-in for this article, to show you the effect:
Feel code immediately has a full of passion there are wood! Use not much to say, look at the official instructions or groping yourself. I believe you will soon learn how to use it under the excitation of this figure.
Note: This plugin has a side effect, is to open a long time card, or even die. The author desktop, 8G memory (the permanent zone only set three hundred or four hundred M bar), in the case of frequent switching open files, will become more and more cards, half a day may be oom. Without this plug-in, you have not encountered the IDE to get an oom situation. So weigh it yourself.
The above plugins have all been uploaded to Csdn resources, the address is: http://download.csdn.net/detail/maosidiaoxian/8583491
If this article hits million or the top number of broken hundred, please remember to tell me to share from the Sogou wallpaper site crawl 3,000 sister figure.
Build your development artifact--introduce several plugins on Android studio