New tutorials

Welcome to our Tutorials section! We are working hard to bring you high quality and interesting tutorials. Also check out the tutorials forum if you have any problems or want to make a request. Also, if the text in the code samples is too small, click here for an explanation.

  • Days to Xmas widget tutorial

    My second article based on Norbert Möhring's HelloWidget tutorial, but i think it's easier. :) It will look like this:


    xmas widget

  • How to disable a button on an appwidget?

    Would you like to disable a button on an appwidget?
    As far as I know it can not be done, since the appwiget UI manipulation is limited by the methods of the RemoteViews class.

    But if you insist to do that there is a way to make it look like the button were disabled!

    RemoteViews can't manipulate a buttons enabled/disabled state, but it can modify its visibility. So the trick is to have two buttons, the real one, and an other which is designed to look like the real one in...

  • Data Storage tutorial, basic samples are included

      Data Storage Methods

    • Preferences
    • Preferences is a lightweight mechanism to store and retrieve key-value pairs of primitive data types.
       
    • Files
    • You can store your data in files on your mobile phone, or in a removable storage medium.
       
    • Databases
    • Android Api supports SQLite databases. All databases, SQLite and others, are stored on the device in /data/data/package_name...

  • Introducing the Android Emulator, managing Android Virtual Devices (AVD)

    The emulator available in the Android SDK is not just a tool that allows you to easily test applications without having to install it to a real device, or even having one. With the proper configuration it is possible to test situations which are hardly reproduced on a physical one.
     
  • How to set up Eclipse with Android SDK on Ubuntu linux 9.04/9.10 (updated)

    In my first tutorial i will show you how to set up Eclipse 3.5 with Android Development Tools (ADT) on Ubuntu 9.04.

    Before we can install the Android SDK, we must install Java. First we open a new terminal window (Applications > Accessories > Terminal).

    To install Java, type:

    sudo apt-get install sun-java6-bin 

    If you are on a x86_64 system, you also must install ia32-libs:
     

    sudo apt-get install ia32-libs...
  • How to set location on emulator

    emulatorYou have two options if you would like to set the location on the emulator. For both options, you start with starting the emulator first.

    Option 1: using DDMS

    • go to your android/tools directory, and launch the DDMS tool
    • select the Emulator...
  • How to debug a Service?


    debugIntroduction

    When you start a project with a service in it in debug mode, and you placed a breakpoint in a method of the service, the debugger will not stop. 

    Solution

    The solution that works in almost all situation is to wait declaratively in the code for the debugger to attach. To do this, you have to make a call to...

  • Custom View - HorizontalSlider

  • Using threads and ProgressDialog

  • TourGuide - Virtual Sightseeing