The Best Android Developer Resources

If you aren't aware already Constant Contact Labs is developing a version of the QuickView iPhone App for Android.  Check out the blog post:  QuickView for Android Preview for more details.  I have been helping work on this Android application for some time now and over the course of development I have used various resources to get started, work through common problems, and become more familiar with the framework.  Rather than just leave these resources "favorited" in my browser I thought I would share them.  So here is a list of resources I believe no Android developer should be without.

Apps for Android

One of the most useful resources to any developer is the source code for an entire working application.  Luckily with Android there are plenty of applications that are completely open and cover a wide range of features and functionality available on the platform.  Try installing these applications on your Android device or emulator.  If you see something you like or need to implement in your own application just look over the source.

http://code.google.com/p/apps-for-android/ 
  • Contains a bunch of Android apps, most of which are on Android Market and were developed by people that worked/work on the Android project at Google.
http://developer.android.com/resources/samples/index.html http://developer.android.com/shareables/latest_samples.zip 
  • Web index and Zip containing more Android applications that demonstrate a lot of framework topics.  "API Demos" is especially useful because there are demonstrations of common Android features organized by category (e.g. Animation, Widgets, and Views) including source and XML.

Common Tasks and How to Do Them

For some beginners digging through source code might not be the easiest way to learn.  Having a list of common tasks and code examples with explanation is sometimes the best starting point.  Here is such a list:

http://developer.android.com/guide/appendix/faq/commontasks.html 

Views and Widgets

Views and Widgets are the building blocks of all Android applications and so knowing how and when to use them correctly is important in creating stable applications.  If you are a beginner or just looking to use a new widget the following resource is useful in showing an example in the form of a small program to demonstrate the use of a view or widget and explaining how it works.

http://developer.android.com/resources/tutorials/views/index.html 

Android Drawables

Android Drawables are elements for Android intended for display such as bitmaps or gradients.  Knowing what default Drawables are available, especially menu icons, can save time and make your applications look more professional.  Rather than searching through the Android jar for the Drawable you need the following resource lists all of the default Drawables included with android 1.0 (most of which still exist in later releases). If anyone knows of a similar resource for later versions of Android post it in the comments section.

http://www.screaming-penguin.com/info/android_drawables/android_drawables.html 

Android XML

XML plays a big role in Android.  For example setting up view layouts is most commonly done through XML. XML is also used to store fixed strings, styles, and attributes.  Viewing some of Android's XML included in the SDK can be a great resource.  Here is a web-based view if you do not like digging through files in the Android jar.

http://www.netmite.com/android/mydroid/frameworks/base/core/res/res/ 

For example if you wanted to create your own row item for a ListView you could modify an existing XML resource rather than creating it from scratch.

simple_list_item_multiple_choice.xml

<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2008 The Android Open Source Project
     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at
          http://www.apache.org/licenses/LICENSE-2.0      Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-->
<CheckedTextView xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@android :id/text1"
    android:layout_width="fill_parent"
    android:layout_height="?android:attr/listPreferredItemHeight"
    android:textAppearance="?android:attr/textAppearanceLarge"
    android:gravity="center_vertical"
    android:checkMark="?android:attr/listChoiceIndicatorMultiple"
    android:paddingLeft="6dip"
    android:paddingRight="6dip"
/>

Looking at the above example, this resource is also a great way to learn about default styles and attributes such as the preferred height of a list item (?android:attr/listPreferredItemHeight) or standard text sizes(?android:attr/textAppearenceLarge).

Useful Articles from Developers

Blogs and articles can be a great resource especially when they come from creators or developers of the technology being discussed.  Some great tips and tricks you can't find anywhere else can be found at the following resources.

http://developer.android.com/resources/articles/index.html 
  • Contains some really good articles on commonly used features, optimizations, and solutions to difficult problems.
http://www.curious-creature.org/category/android/ 
  • Some of the articles here can be found at the link above, but not all.  The author is a developer at Google that has worked on the Android project.

Developing Orientation Aware Applications

A big challenge for anyone developing for Android is dealing with orientation change.  An application user can rotate a phone from portrait to landscape, the reverse, pop open a keyboard ,or none of the above and all of those cases have to be taken into consideration at all points in the application.

How does the layout render in portrait and landscape, does rotating the device break anything when the application is doing processing, does external data have to be constantly retrieved on every change? The list goes on and on.  The following resource covers all of the problems and mitigations for orientation on Android devices (even how to force a user into a certain orientation and keep them there, how nice).

http://www.devx.com/wireless/Article/40792/1954 

Known Issues with Android

Eventually you come across a problem that is not caused by something you did wrong but just a bug in the Android OS.  The following resource is a great place to find and keep track of current and past issues with Android releases.

http://code.google.com/p/android/issues/list 

Developer Groups

The official developer groups for Android can be helpful for finding additional resources, interacting with other developers of various experience levels, finding solutions to common problems, and of course getting help with specific problems you may be having.  From what I have seen there is no flaming that goes on in the forums however questions that have already been answered elsewhere most often do not even receive a pointer to the answer.

http://groups.google.com/group/android-beginners http://groups.google.com/group/android-developers 

Stack Overflow and Android

The website stackoverflow.com is a growing Q & A site for programmers.  Android announced that the android tag on Stack Overflow will become an official android development medium.  So if you like Stack Overflow or are looking for an additional community of developers for Android the following resource will be useful.

http://stackoverflow.com/questions/tagged/android 

I hope you found some or all of those resources useful.  If you have any favorite Android developer resources you would like to share post them below in the comments section.

你可能感兴趣的:(android,resources,Links)