Android Elite Vivid Weapon reading Notes-chapter Iii: Android Studio Artifice

Source: Internet
Author: User
Tags try catch
<span id="Label3"></p>Android Elite Vivid Weapon reading Notes-chapter Iii: Android Studio Artifice <blockquote> <blockquote> <p><strong>This article is long, you can use the copyright notice below the table of contents, find interesting to read</strong></p> </blockquote> </blockquote>Directory <blockquote> <ul> <li><li><strong>3.1 The use of Android studio</strong><br> <ul> <li>Project panel</li> <li>Stucture Panel</li> <li>Android Monitor</li> <li>Keymap</li> <li>Tip of the day</li> <li>Quick Find</li> <li>Search Action</li> <li>Demo mode</li> </ul></li></li> <li><li><strong>3.2 Android Studio uses</strong> advanced<br> <ul> <li>Operation and Navigation</li> <li>Fast Refactoring</li> <li>Code templates</li> <li>Built-in templates</li> <li>Custom code Comment Templates</li> <li>Code Analysis</li> <li>Version Management in Android studio</li> </ul></li></li> <li><li><strong>3.3 new features for Android studio</strong><br> <ul> <li>Project templates</li> <li>Themeeditor</li> <li>Image Asset&&vector Asset</li> <li>Android Monitor</li> <li>Instant Run</li> <li>Productivity Guide</li> </ul></li></li> <li><li><strong>3.4 Android Studio Plugin</strong><br> <ul> <li>Ignore</li> <li>Automatically generate code class Plug-ins</li> <li>Theme Plugins</li> </ul></li></li> <li><li><strong>3.5 Android Studio Resource website</strong><br> <ul> <li>Android Studio Chinese Community</li> <li>Android Studio Quiz Community</li> </ul></li></li> </ul> </blockquote><strong><strong>3.1 The use of Android studio</strong></strong><p><p>I feel this chapter is very useful for beginners who just use Android studio, a lot of skills need to find their own slowly, it is recommended to develop the habit of using shortcut keys, over time, will give you a great efficiency of programming. The author of this chapter is mainly introduced by the shortcut keys of mac, the article will give the shortcut key appendix</p></p>Project panel<p><p>The Project tab can be found on the far left of Android studio, where the developer manages the project</p></p><p><p></p></p><p><p>There are several tabs under the project tab, click the arrow on the right to open the toggle menu</p></p><p><p></p></p><p><p>The Project tab shows the directory structure of the entire item, which is displayed exactly as the directory structure of the file system, but the Android Project tab is the most used in development</p></p><p><p></p></p><p><p>The android tab does not organize the items according to the file directory structure, but instead follows the Module. Each module is a separate folder, whether it is a master project or a library project, and all Gradle scripts are--gradle in a separate directory scrpts</p></p>Stucture Panel<p><p>Stucture panels are standard in the Eclipse era, and Android Studio is also integrated</p></p><p><p></p></p><p><p>Like eclipse, stucture tags can display not only code structures, but also member variables, static constants, methods, and so on, but not just code in Android studio, but also XML layouts and scripts that can display their stucture information</p></p>Android Monitor<p><p>This panel should be a very large number of developers use a panel, here will display the debug program log information, in the settings can be printed on the Logcat log according to its kind of color set to different</p></p><p><p></p></p>Keymap<p><p>Android Studio can set various types of shortcut keys, find the keymap tag in setting, in the Drop-down menu can choose a variety of built-in shortcut key types, all the shortcuts in this article refer to the default Android studio shortcut keys</p></p><p><p></p></p>Tip of the day<p><p>Under the Help tab of the Android Studio menu bar, Select the tip of the day option to open tips tips for Android Studio</p></p><p><p></p></p><p><p>This is a random display of the use of an Android studio, tip of the day is displayed by default at startup, but many developers will not let it start to show, in fact, This is the art of Android studio extract, which is very useful in the use of skills, Take a little time every day and simply look at this tips, and it won't be long before these time benefits will give you much more than you see the time cost of these tips</p></p><p><p></p></p><p><p>The official website of the Tips,intellij idea is also a place where developers often pay attention, especially the introduction of its function, address: https://www.jetbrains.com/idea/whatsnew/</p></p>Quick Find<p><p>Android Studio's Powerful Global quick search, just double-click the "shift" button, in this search everywhere, you only need to enter the content to find (can be fuzzy query, There are keywords), the following can be displayed in real-time results found. When you check the box above--include non-project items, You can also search for content in non-projects, such as the contents of a referenced jar package</p></p><p><p></p></p>Search Action<p><p>Android Studio has many shortcuts, so Android studio provides a portal similar to search commands, which can be quickly paged out with the shortcut "command+shift+a", for example, to find a command that opens the most recent project, which can be entered directly into the " Open recent ", Press ENTER after you can directly use this command</p></p><p><p></p></p><p><p>For example, look at the shortcut key of the method call stack, if you can't think of it, you can find the instruction and its shortcut keys by entering Hier.</p></p><p><p></p></p>Demo mode<p><p>Android Studio provides developers with an extremely convenient presentation mode, opens the menu bar view options, finds several demo modes at the bottom, and can easily display the code area in full screen with several modes when connecting the projector</p></p><p><p></p></p><strong><strong>3.2 Android Studio uses</strong> advanced</strong>Action and navigation Word selection<p><p>In Android studio, using the keyboard action to select the word is the most common operation when editing code, through the "option+←" shortcut to implement the Word by the cursor movement, Android Studio also provides the installation hump naming method to achieve the cursor movement settings, in the settings to open " Use camelhumps words "can be used this function, after turning on, and then through the" option+← "to follow the hump to move the cursor</p></p><p><p></p></p>Show recent actions, Modifications<p><p>In Android studio, use the "command+e" and "command+shift+e" shortcuts to quickly display recent file actions and file modifications</p></p><p><p>Use the Command+e shortcut to display recently browsed files</p></p><p><p></p></p><p><p>Use the "command+shift+e" shortcut to display the most recently edited file, while using the "control+tab" shortcut to switch between the various interfaces</p></p><p><p></p></p>Operation Record<p><p>When developers navigate through the code, they usually jump to the code, and when they want to go back to where they've been, it's a hassle, and Android studio keeps a history of each operation, navigating the location with shortcut keys "command+option+left\right"</p></p>Move Line<p><p>Moving a row as a whole is a very common way to move up or down a line in Android studio by using the option+shift+ arrow key on \ Key Down.</p></p>Lookup Call<p><p>In development, find out where a method has been called or find out where an ID has been referenced is a recurring operation, for example to find Initviews () call, just right click, choose "Find Usages", Of course you can also use "option+f7" Make Quick Find</p></p><p><p></p></p>Quick Method operation<p><p>Jumping between different methods is a prerequisite for developers to understand the program architecture, and in Android studio, developers can access the method by holding down the "Command" key and clicking on the method name, and you can also use the "command+b" directly. Shortcut keys Enter a method</p></p>Find parameter definitions and documents<p><p>The shortcut key "command+p" allows you to quickly see the parameter definition of the method</p></p><p><p></p></p><p><p>Use the shortcut key "F1" to view the API documentation</p></p><p><p></p></p><p><p>If you imagine using eclipse, when the mouse is placed on the display of the document prompt, then you can set in the settings, editor-general-show quick documention on mouse move</p></p><p><p></p></p>Fast line operation<p><p>By using the shortcut key "command+shift+up\down", you can quickly move a line to one or the lower line, without having to cut for two lines of exchange</p></p><p><p>Delete a row by using the shortcut key "command+backspace"</p></p><p><p>Quickly copy the code of the previous line with the shortcut key "command+d" while resting the cursor where the variable name is.</p></p>Quick Breakpoint<p><p>Conditional breakpoints and ordinary breakpoints, directly on the left side of the editing panel can be generated, and to give a normal breakpoint to add conditional function, just need to right-click on a normal breakpoint, in the pop-up menu condition fill in the breakpoint conditions can be</p></p><p><p></p></p><p><p>In debugging, the developer may temporarily add some breakpoints, that is, the developer actually just want this breakpoint to execute once, next time do not want to continue to execute breakpoint in this place, through the shortcut key "command+option+shift+f8", can be a temporary breakpoint</p></p><p><p></p></p><p><p>The difference between a temporary breakpoint and a normal breakpoint is that there is a number "1" on the temporary breakpoint that disappears automatically when the temporary breakpoint is executed once</p></p>Exception Breakpoint<p><p>For example, the most common crash in the program is nullpointerexception, how to appear in the program NullPointerException where all the breakpoints? In fact, there is no need to do so, developers just open the Run-view breakpoints interface, click on the upper right corner of the "+", select Java Exception breakpoints, and enter the exception to listen to</p></p><p><p></p></p><p><p>I choose to listen to NullPointerException here, then in the program do not need to set any breakpoints, as long as the app because of NullPointerException exception caused by the crash, the system will be in the corresponding place automatic breakpoint and pause</p></p><p><p></p></p>Log Breakpoint<p><p>Developers often encounter this situation, the entire project code has been written, suddenly a bug need to add a row of log debugging, because this line of log to the entire project is compiled once, it is very painful, and in fact, Android Studio has provided a solution to this problem, which is the log breakpoint</p></p><p><p>For example, the developer needs to shoot a log in each loop, but does not want to add a single line of log</p></p><p><p></p></p><p><p>At this point you can use the log breakpoint to increase the log without the need to modify the code, first need to hit a normal breakpoint, and then right-click on the breakpoint, select the Suspend property is false, and in the following log evaluated expression write log information, so set , you do not have to recompile while the program is running, and you will be typing the log information you need at the breakpoint</p></p><p><p></p></p>Multiple options<p><p>When the context of the code has a lot of the same code, and the developer needs to work on the blocks at the same time, you can use the multi-selection feature, for example, If you place the cursor at the first int, you can select the first int by using the shortcut key "control+g" and press the shortcut again " Control+g "you can select the second int</p></p><p><p></p></p><p><p>In addition to multiple selections by similarity, Android Studio provides a way to make multiple selections through columns by holding down the "Option" key and dragging</p></p><p><p></p></p><p><p>In addition to the above two similar operations, Android Studio also supports the operation of multiple cursors, through the shortcut key "option+shift+ mouse click" can add a new editing cursor</p></p><p><p></p></p>Fast Completion<p><p>With the shortcut key "command+shift+enter", there are many places where you can get Android studio to do things quickly, such as adding a method body brace, adding an end-of-line semicolon, and automatically formatting the row</p></p>Code hints<p><p>Android Studio provides very powerful smart hints, using the shortcut key "control+space" to bring up code hints anywhere in the code, when using code hints, one thing to note is that when the candidate prompts are displayed, Enter the input key to complete the prompt, in addition to the TAB key can also complete the input of the prompt, the difference is that it will be entered after the prompt is all deleted, and the ENTER key will retain the following input</p></p><p><p></p></p><p><p>In addition to using smart hints, in Android studio, shortcut keys "control+shift+space" are available to show smarter code hints</p></p><p><p>Code hints can not only be used during code writing, in the event of a program error, you can also use the Quick Completion shortcut key "option+enter" to get code modification hints, for example, The author uses the shortcut template logi, generate a log message, then the tag variable using shortcut keys "option+ Enter ", select" Create constant field ' TAG ' "to</p></p><p><p></p></p>Calculating the value of a variable in debugging<p><p>You can display the value of an expression by holding down the ALT key and clicking an expression in the code during debugging</p></p>Set variable naming code style<p><p>According to Google's code style guidelines, The Class's member variables usually start with m, whereas static member variables usually start with s, so you can set the naming rules for variables in Settings</p></p><p><p></p></p><p><p>Set m in the Field's name prefix, set S in the name prefix of the static field, so that when you enter the name of a variable, you can automatically complete m or s</p></p><p><p></p></p>View outline<p><p>When the project is very large, by using the shortcut key "command+f12", you can bring up the outline interface, that is, the display method and the member variable list</p></p><p><p></p></p><p><p>By entering a method name, you can quickly navigate to the method, and it also supports fuzzy queries, and some keywords of the query method can also be filtered</p></p><p><p></p></p>Bookmark<p><p>In the old project to take over the code or debugging code, often need to analyze the idea of code, often need to record some key code, methods, this time using bookmarks to record is the best way, similar to the bookmark in chrome, through the shortcut key F3 can add a code to the bookmark or delete from the bookmark</p></p><p><p></p></p><p><p>Add the code to the bookmark, there will be a small hook next to the number of lines, and in the Favorites tag, you can find the corresponding bookmarks</p></p><p><p></p></p><p><p>In addition, through the shortcut key "command+f3" can bring up the bookmarks panel, display all bookmarks</p></p><p><p></p></p>Additional debugging<p><p>Developers must have experienced a large project, compile it takes a long time, and then need to debug the Program. You can also use attach to debugger in addition to running the program directly with Debug.</p></p><p><p>In the case of the ADB connecting the phone, click the Attach to Debugger button and select the program you want to debug (debug signed app only), enter the adjustable mode, do not need to run the program through debug</p></p>Other operating techniques <ul> <ul> <li>Code folding: "command+-" and "command++", You can collapse and expand a piece of code</li> <li>Open file in file system: Select file right mouse button, Select reveal in Finder can also open file in file system</li> </ul> </ul><p><p></p></p> <ul> <ul> <li>Preview method Definition: When debugging code, if you want to see the definition of a method, but do not want to jump to the class where the method resides, you can use the shortcut key "command+y" to preview the specified method on the current page</li> </ul> </ul><p><p></p></p> <ul> <ul> <li>Split Window: normally, There is only one interface in the editing interface, split through the window, you can display more interfaces at the same time, select Window->editor tabs->split vertical\horizontal in the menu bar, This allows you to display multiple editing interfaces throughout the editing area</li> <li>Related files: for activity, there is usually a corresponding XML layout file, these layout files as the activity of the relevant files will be marked at the top of the class, click on this tag can be linked to the corresponding XML file</li> </ul> </ul><p><p></p></p> <ul> <ul> <li>Find Shortcut: in the Drop-down box, Android Studio has built-in shortcut template for each platform, through the switch can find the appropriate platform, find the shortcut key to find, remember its name, then switch back to their system shortcut keys, by name to find the corresponding shortcut, and in the next input box, Android Studio provides a convenient way to find shortcuts by typing keystrokes.</li> </ul> </ul><p><p></p></p>Rapid reconfiguration of refactoring portals<p><p>When choosing a code fragment to prepare for refactoring, Android Studio provides a quick refactoring portal</p></p><p><p></p></p><p><p>Use the shortcut key "control+t" to open this refactoring portal, or click the right mouse button, select "refactor" to bring up this interface</p></p><p><p></p></p>Sorround with<p><p>In development, developers often have to refactor a line of code, for example, to increase the empty if condition, or to increase the try catch, then you can use the shortcut key "command+option+t" to operate, when the shortcut key is executed, Select the appropriate surround type, You can quickly apply the surround type to the selected code</p></p><p><p></p></p>Quick Tips<p><p>Quick tips can be quickly recalled with the shortcut key "option+enter", for example, when a line of code finishes and a semicolon is required, the quick Tip "option+enter" by the shortcut key allows Android studio to quickly fill in the semicolon, wrap, and format the line Code. For example, You can write a method that has not yet been generated, and use the shortcut "option+enter" Quick tips to let Android Studio help you build this method</p></p><p><p></p></p><p><p>For example, developers sometimes write some if...else if ... in the Code. Such conditional judgment statement, but at the time of refactoring, you probably want to change it into a switch statement, then through the quick tip of Android studio, such a conversion is completely intelligent, as long as the if on the use of "option+enter" quick tips can be</p></p><p><p></p></p>Fast Internationalization<p><p>Internationalization in the project is achieved through the creation of strings.xml files in different languages, with the translation editor in Android Studio to help developers quickly create internationalized files</p></p><p><p>To use this feature, the developer simply opens the String.xml file, opens the "open editor" in the Upper-right corner and opens the translation editor, selecting "earth" in the Upper-left corner of the translation Editor. icon to open the resource internationalization selector</p></p><p><p></p></p><p><p>Select the appropriate language to generate a resource file for that language in the directory</p></p><p><p></p></p>The Magical magic of extract<p><p>Extract is useful when refactoring code, such as extracting a repeating piece of code as a method</p></p><p><p></p></p><p><p>With extract method, You can extract a snippet as a method, and you can set the access type</p></p><p><p></p></p><p><p>The extract can also extract the attributes from the XML file as a Style for other view reuse, then execute the Extract-style directly in the View's XML layout Code.</p></p><p><p></p></p><p><p>Set the name of the extracted style and the attributes to be extracted in the popup interface.</p></p><p><p></p></p><p><p>Extract can not only extract the style, but also can extract layout layouts, the use of basic consistency, here is no longer demonstrated, in the code, extract can extract a variety of variables, parameters, constants</p></p>Stucturally Search<p><p>Stucturally Search is a very important feature in Android studio, and with the Find action method, you can quickly turn on the feature</p></p><p><p></p></p><p><p>Stucturally Search Interface</p></p><p><p></p></p><p><p>In the editing area, developers can edit a variety of code to search, and most crucially, you can use the <span>$</span>xxx<span>$</span> flag to match the search, through such a search can find Initviews method where to use</p></p><p><p></p></p>Code template built-in Templates<p><p>Android studio, like eclipse, has a lot of code-built quick-input templates, such as Eclipse's--syso,android studio, which also has many of these code templates, which only need to use the shortcut key "command+j" during code Writing. You can bring up these code templates</p></p><p><p></p></p><p><p>For example, "fori" stands for a fast input for loop, "ifn" stands for quick input "if null", and so on, and of course you can add your own code module</p></p><p><p></p></p><p><p>Find the Live Templates tab in the settings and find all the code templates here, using the Log's shortcut board as an example</p></p><p><p></p></p>Suffix templates<p><p>The previous mention of using "command+j" to bring up the built-in code template, also gives some very common classes to provide a suffix to the code template, such as to a list to write a traversal statement, actually do not need to be implemented by the built-in template, directly behind the list of ". for", To quickly open a foreach traversal statement</p></p><p><p></p></p><p><p>alternatively, You can use ". cast" to quickly generate a type conversion template</p></p><p><p></p></p>Custom code Comment Template method comments<p><p>In Android studio, the system gives developers the default method of commenting the template on the method name line "/**", and then press ENTER to confirm, you can get the comment code of the method</p></p><p><p></p></p><p><p>But like android, Android Studio also provides a powerful customization function, first need to open the settings, Select Live Templates, Next click the plus sign in the right column, select Add a template Group, and add a template to the group</p></p><p><p></p></p><p><p>Select "ma" to customize the comment template and edit the comment code in the edit area below</p></p><p><p></p></p><p><p>The variable that is wrapped with the <span>$</span> symbol can be modified by the button "Edit variable" on the Right.<br></p></p><p><p>The variable date is given the assignment of the date () function, which is to get the current system time and assign it to the variable dynamically, and finally, click on the change connection below and choose when the comment will take effect</p></p><p><p></p></p><p><p>In general, select declaration, the table name is valid when declared, through such a configuration, enter "ma" before the method to eject the template, press ENTER to confirm the input</p></p><p><p></p></p>file, class Comment<p><p>When the system generates a class, interface, and other files, the system generates some code and comments by default</p></p><p><p></p></p><p><p>As with the method annotations, developers can also fully customize these annotations, first, enter the setup interface, select "File and code Templates" to open the Code comment template interface</p></p><p><p></p></p><p><p>next, Select the Include tag, where the template is similar to the layout that is included in the layout file, that is, some common templates, such as the two templates that I configured</p></p><p><p></p></p><p><p></p></p><p><p>With these two identical templates, developers can combine these templates to create new, complete classes and file Templates. For example, Create a new template file in the file tab, name myclass, and set up a code template</p></p><p><p></p></p><p><p>It is also very simple to use, just click the right mouse button to select new, Select the custom template code to</p></p><p><p></p></p><p><p>After you select the appropriate template, the generated code</p></p><p><p></p></p><p><p>With this example, you can also create more templates, such as the myactivity template created by the author</p></p><p><p></p></p><p><p>The generated code</p></p><p><p></p></p><p><p>extrapolate, I'm going to give you a single example template Here.</p></p><p><p></p></p><p><p>The generated code</p></p><p><p></p></p>Code Analysis<p><p>In Android studio, Google also offers a number of code analysis tools that are concentrated in the Analyze menu of Android Studio</p></p><p><p></p></p>Inspect Code&&code Cleanup<p><p>The inspect code feature allows the IDE to analyze the entire project, similar to the lint analysis of Android</p></p><p><p></p></p><p><p>visible, Inspect Code not only provides the lint detection function, but also provides some other code static analysis results, but also gives the general modification opinion, You can also choose the Code cleanup function to carry on the automatic repair, these two functions can be found in the Analyze menu</p></p><p><p></p></p>Dependencies<p><p>In the Analyze menu, there are several dependencies options that allow you to quickly analyze the Project's dependencies dependencies</p></p><p><p></p></p>Analyze Data Flow<p><p>This feature is not a lot, but in some cases, it is very helpful to be familiar with the old code, it can trace the data flow, understand the ins and outs of the data variable, can pass the result of dataflow from local variable and dataflow to local The results of the variable show</p></p><p><p></p></p>Method Call Stack<p><p>The call stack for the method can be quickly found in Android Studio via the shortcut key "control+option+h"</p></p><p><p></p></p>Version Management in Android studio<p><p>In addition to using the Android Studio's own terminal for git operation, Android Studio also provides direct support for git, right-click on either interface to eject the appropriate git action</p></p><p><p></p></p><p><p>A graphical interface similar to the source tree</p></p><p><p></p></p><p><p>At the same time, Android studio also has its own version of the system, the right mouse button at any file to select the local history-show history can be</p></p><p><p></p></p><p><p>Here you can see the Developer's action version record for the file</p></p><p><p>Git settings, You can search for git in the settings</p></p><p><p></p></p><p><p>Once the file is included in git version management, the color of the file becomes the color of the corresponding state</p></p><p><p></p></p><p><p>Red indicates a new file that is not included, green indicates that the file has been added to staging area, and in the VCs menu option in the main interface, almost all git operations are Included.</p></p><p><p></p></p><p><p>Android Studio also has built-in GitHub support, choosing Vcs-import into Version Control-share project on GitHub to upload items to github with one click</p></p><p><p></p></p><strong><strong>3.3 new features for Android studio</strong></strong>Project templates<p><p>Android Studio allows developers to choose their own project template when creating an Android project</p></p><p><p></p></p><p><p>Developers can create custom templates in the ~/plugins/android/lib/templates directory of the Android studio installation directory according to the System's own templates</p></p>Themeeditor<p><p>In the new version of Android studio, when you open a theme file, the developer will be prompted to edit it in editor</p></p><p><p></p></p><p><p>This editor is the new feature of Android Studio--theme editor, Open Interface</p></p><p><p></p></p><p><p>here, android Studio makes visual edits to the theme settings, and changes the settings to see the display effect immediately.</p></p>Image Asset&&vector Asset<p><p>Image asset and Vector asset are new features in Android Studio that can help developers quickly create images and SVG files of different resolutions</p></p><p><p>To use this feature, you can right-click in the RES Resource directory and select New</p></p><p><p></p></p><p><p>Click on image Asset, Select the appropriate picture and name, click Next to automatically generate all the resolution of the picture, while the image Asset also provides a lot of image processing options, developers can set according to their own needs</p></p><p><p></p></p><p><p>If Vector Asset is selected, the following diagram pops up</p></p><p><p></p></p><p><p>If the developer chooses material icon, clicking on the icon will bring up the built-in SVG image of Android Studio.</p></p><p><p></p></p><p><p>Developers can select the images they need in a large number of SVG images provided by Android Studio and click OK to generate the appropriate SVG XML file.</p></p><p><p>alternatively, developers can also choose to load local SVG images</p></p><p><p></p></p><p><p>After you click next, you can generate the appropriate SVG XML file</p></p><p><p></p></p>Android Monitor<p><p>Android Monitor is similar to the DDMS tool used on eclipse, but Android monitor is more powerful</p></p><p><p></p></p><p><p>The tool provides real-time analysis tools for logcat, Memory, CPU, GPU, and network, allowing developers to understand the App's performance during development</p></p>Instant Run<p><p>This feature can be said to be the most impressive new features of Android studio, after the launch of this feature, Android studio will be in the form of plug-in patches to update the app, to provide debugging speed of the app, to turn on this feature, only need to set the Enable Instant Run can</p></p><p><p></p></p><p><p>next, after the first fully-compiled project runs, the start and Debug buttons will have a lightning bolt next to it, and if the developer changes the project again, Click the Start or Debug button with the lightning bolt to apply the changes very quickly, showing the modified program</p></p>Productivity Guide<p><p>Productivity Guide is a very interesting feature, open the Help menu, you can open this function</p></p><p><p></p></p><p><p>After opening, the entire interface</p></p><p><p></p></p><p><p>Here you can find statistics such as the total time of the developer using Android studio, the active time, the number of shortcuts that have been used, the number of code hints, etc.</p></p><strong><strong>3.4 Android Studio Plugin</strong></strong><p><p>Android Studio inherits the plug-in idea of eclipse, so it has a lot of plugins and developers can find the Android Studio plugin on the website Http://plugins.jetbrains.com/?androidstudio</p></p>Ignore<p><p>The plug-in function, like its name, is to generate the most appropriate ignore file for the Git project</p></p><p><p></p></p><p><p>Right-click on any file to select new, Select the. Ignore file option, Select Gitignore file (Git)</p></p><p><p></p></p><p><p>The new screen will pop up and you can choose Android</p></p><p><p></p></p>Automatically generate code class Plug-ins <ul> <ul> <li>Butterknife: Right-click on the layout file in your code and select Generate-generate Butterknift to automatically generate the annotation files needed for Butterknife</li> <li>Selector: can speak a drawable folder image, automatically generate the corresponding drawable Selector, as long as the file name meets the requirements of the installation specifications can be</li> <li>Gson: Gson entity required to generate a JSON</li> <li>Parcelable: the code required to automatically generate the Parcelable interface</li> <li>Viewholder: you can quickly generate corresponding viewholder based on the layout file ID in the GetView method</li> <li>Prettify: the Findviewbyid code of view in Java can be automatically generated from the layout according to layout</li> </ul> </ul>Theme Plugins<p><p>Android Studio defaults to only two themes, the default theme and the Darcula theme, and developers often want to define their own themes, so the following plugin will do what you wish, http://color-themes.com</p></p><p><p>Once you have downloaded the theme jar file, you only need to select File-import Settings in Android studio.</p></p><p><p></p></p><p><p>Choose to import the jar file in the pop-up menu, and finally the system prompts you to restart Android Studio, the theme is installed, and you can find the installed theme in the Editor-colors&font options Set.</p></p><strong><strong>3.5 Android Studio Resource website</strong></strong> <ul> <ul> <li>Google official Website: https://developer.android.com/studio/intro/index.html</li> <li>Android Studio Chinese community: http://tools.android-studio.org/index.php</li> <li>Android Studio Quiz Community: http://ask.android-studio.org/?/explore/</li> <li>Android Studio Chinese forum: http://forum.android-studio.org/forum.php</li> <li>Android Studio developer Tools Download: http://www.androiddevtools.cn/</li> </ul> </ul>Appendix<p><p></p></p>Summarize<p><p>This chapter has a new understanding of the Android studio I've been using for a long time, and think about it, if you don't have a new understanding of yourself is daniel, Hahaha. This article is very long, mainly the picture occupies a lot of places, can be said to be the standard text message, reading it is very easy, I have to insist on down, besides you, refueling</p></p> <p><p>Android Elite Vivid Weapon reading Notes-chapter Iii: Android Studio Artifice</p></p></span>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.