Documents
Resources
Learning Center
Upload
Plans & pricing Sign in
Sign Out

4 Important Tools In An Android Application Development Workflow

VIEWS: 22 PAGES: 10

Understanding your Android application development tools allow you to spend less time writing boilerplate code and solving the same problems over and over again. Understanding your Android application development tools allow you to spend less time writing boilerplate code and solving the same problems over and over again. Here are 4 out of seven tools every Android application developer should familiarize themselves with to make their workflow more efficient and solve new problems.

More Info
									      4 Important Tools In An Android Application
               Development Workflow
Understanding your Android application development tools allow you to spend less time
writing boilerplate code and solving the same problems over and over again.

Understanding your Android application development tools allow you to spend less time
writing boilerplate code and solving the same problems over and over again. Here are 4 out
of seven tools every Android application developer should familiarize themselves with to
make their workflow more efficient and solve new problems
                        Quick Assistant Shortcut
You might be familiar with the Cmd-1 keyboard shortcut (Ctrl-1 in Windows). It allows you to
pull up quick-fix when you’re in the code editor:
Not only can you invoke quick assistant in the Java editor, it’s also very useful in the XML editor. This brings us to our second tip.




  Did you know that you can auto complete in other places as well. For example you can turn a
  Java string into an XML string resource:




  Not only can you invoke quick assistant in the Java editor, it’s also very useful in the XML
  editor. This brings us to our second tip.
          Extract Style from Existing XML Element
If you have visual parameters that you use often re-use, such as a header color, drop shadow,
and text style, it’s best to reduce redundancy by creating a style that encapsulates these
parameters. This Android application development tool makes this much easier to do
correctly. Just place the cursor on your view element and invoke quick assistance with Cmd-
1:
The extracted style will automatically be placed in the styles.xml file, and the tool will
even look for and replace other instances of the same style parameters. As you can see,
quick assistance brings up other nice tool features besides extracting style


Creating New Activities using the Manifest Editor

During the process of android application development, new activity classes need to be
created quite regularly. The Manifest Editor has made The next time you want to create
a new Activity class in your, don’t use the Eclipse new class wizard. Instead, go to the
“Application” tab of the manifest editor. At the bottom of the page, you’ll see a list of
application nodes, including existing services and activities. Click “Add…” and select
Activity. The new activity node does not yet have a name, when it’s selected the
Attributes for Activity pane show up to the right:
Click on the “Name*” hyperlink and it will open up a New Java Class dialog, with Activity
already selected as a super class. If you always remember to create a new Activity this
way, not only is it faster, but you’ll never run into the problem where the you forget to
declare your activity in the manifest, or accidentally spell activity’s package name
incorrectly in the manifest.
           isInEditMode() Check for Custom View
After creating a custom View of View Group and inserting it in your layout XML file, the
Android layout preview editor often has a difficult time rendering the new View. One
problem could be that your custom view uses classes or methods available only while
running on the device, but not while being rendered in the editor (eg. disk and network
access). In the following snippet, a custom view uses isInEditMode to determine
whether or not it is being rendered inside the editor, and if so then loads test data
instead of real data.
                 ?
                 1
                 2
                 3
                 4
                 5
                 6
                 7
                 8
                 9
public ChartView(Context context) {
           super(context);

        if (isInEditMode()) {
         addFakeChartData();
                } else {
      readChartDataFromDisk();
                    }
                  }
About Xtreme Labs:
Located in Toronto, Palo Alto, and New York City, Xtreme Labs is a leading mobile
product development company that deals in iphone app development, android
application development, blackberry applications development, custom application
development, ios app development, ipad application development, windows mobile
development and mobile application development. They have a proven track record of
success in delivering innovative solutions across hundreds of global products. As experts
in mobile agile development, Xtreme Labs works with the world's leading companies to
plan and execute their mobile strategy.

For more information visit http://www.xtremelabs.com
     For more information visit

http://www.xtremelabs.com




            Thanks

								
To top