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.

  • Easy runtime meter

    tIn this tutorial I'll show you a simple time meter example. It can be used for checking the running time of your algorithms. It's useful when you need to decide wich solution is faster/better than an other. It just a simple helper code, but if you made some changes on it, can be a part of any final project, like benchmarking or testing workarounds.

  • Quick guide to quick autocomplete textview

    This demo shows how to speed up the original autocomplete textview assuming that we can work with ordered data.

    Let's prepare a simple test environment, which demostrate the difference between the two versions. Then let's generate a few thousand test data, and create two textviews from which we will speed up the second one.

    1. public...

  • RSA String Encryption, security

    In this tutorial, I show you how to encrypt a string with public key in Android.

    First we make a 2048-bit RSA private key in linux:

    1. $ openssl genrsa -out private_key.pem 2048

    Then convert private Key to PKCS#8 format, what Java can read: (in...

  • Simple tutorial for using e3roid 2D OpenGL framework for Android

  • Custom control states in library projects

    This is a tutorial about adding states to custom controls in library projects. So first, how to create and reference library projects: Setting up library projects, Referencing library projects.

    Now that the project is setup you can start creating custom...

  • Motorola Milestone CPU Overclock

    Use at your own risk!

    milestone

    OMAP3 processors used by the device are available. In this example,Milestone, Milestone 2, Droid, Droid 2 Global, Droid X, A853/A854. Other devices run this processor on higher frequencies, some even run it on 1,2 ghz.

    The first step root. Superoneclick, it can be done in 5 minutes. 2.2.2 is no problem with it can be given to...

  • Multitouch and gesture detection part 1

    In this little tutorial I’m going to show you how to detect multitouch event on an Activity screen.

    First of all let’s create a class next to the Main activity that called MultitouchView. It extends View:

    1. public class MultitouchView extends...

  • Android animation basics

    In android there are 4 basic types of animations:

    • AlphaAnimation
    • RotateAnimation
    • ScaleAnimation
    • TranslateAnimation

    This animations can be highly customized and combined, for example we can set the speed, delay, acceleration, duration of animations, then group them together in an AnimationSet.

    Animations can be applyed as Layout animations to ViewGroups, to be triggered when the ViewGroup is created/displayed or applied to any view...

  • Advanced exception handling in Android

    errorIn this tutorial I'll present you a simple exception handler class for Android. The class can invoke and display exceptions and it can be upgraded very easy for your further needs.

  • Basic spinner design

    In android creating spinners - known as comboboxes or Drop-down list in other systems - is easy. However giving them a basic design is a little tricky.

    In most application we dont want to add custom design to spinners, but at least we want thicker items in the list. With the default look, people will have trouble hitting the desired item.

    The code, one may try at first, to fill a spinner with elements, will probably look like this:

    The layout xml 'mylayout.xml':
    ...