From 2a3aa2d343820be9e05101a25b955d525e9bfa54 Mon Sep 17 00:00:00 2001
From: Rich Slogar With smart rendering, Android Studio displays links for quick fixes to rendering errors.
For example, if you add a button to the layout without specifying the width and
-height atttributes, Android Studio displays the rendering message Automatically
-add all missing attributs. Clicking the message adds the missing attributes to the layout.Smart Rendering
Android Studio provides coding assistance for using annotations from the +{@link android.support.annotation Support-Annotations} library, part of the +Support Repository. + +Adding a dependency for this library enables you to decorate your code with annotations to help +catch bugs, such as null pointer exceptions and resource type conflicts. You can also create +enumerated annotations to, for example, check that a passed parameter value matches a value from +a defined set of constants. For more information, see +Improving Code Inspection with +Annotations. +
+ + +Android Studio allows you to look at what’s inside Java libraries when you don’t have access +to the source code.
+ +The decompiler is built into Android Studio for easy access. To use this feature, right-click +a class, method, or field from a library for which you do not have source file access and select +decompile.
The decompiled source code appears. + +To adjust the Java decompiler settings, select +File > Settings > Other Settings > Java Decompiler.
+ + +Android Studio offers debugging and performance enhancements such as:
+Choose Tools > New Scratch File to open a scratch file to quickly + build and run code prototypes. Together with Android Studio coding assistance, scratch + files allow you to quickly run and debug code updates with the support of all file operations. + By embedding code created with scripting languages, you can run your code from within the + scratch file.
+This section list just a few of the code editing practices you should consider using when creating Android Studio apps.
@@ -114,23 +157,17 @@ individual classes. you can set a scope to identify all code related to a specific action bar. -Specify annotations within the code or from an external annotation file. The Android Studio -IDE keeps track of the restrictions and validates compliance, for example setting the data type -of a string as not null.
- -With language injection, the Android Studio IDE allows you to work with islands of different languages embedded in the source code. This extends the syntax, error highlighting and coding assistance to the embedded language. This can be especially useful for checking regular expression -values inline, and validating XML and SQL statments.
+values inline, and validating XML and SQL statements.This allows you to selectively hide and display sections of the code for readability. For example, resource expressions or code for a nested class can be folded or hidden in to one line -to make the outer class structure easier to read. The inner clas can be later expanded for +to make the outer class structure easier to read. The inner class can be later expanded for updates.
@@ -140,6 +177,7 @@ updates. reference. Pressing {@code F1} with the preview image or icon selected displays resource asset details, such as the dp settings. +You can now inspect theme attributes using View > Quick Documentation (F1), -- cgit v1.1