Luca Zanini
  • Home
    • Astronomy
    • Android
    • Java
    • Lotus
  • About me
  • Golden Rolly

    Oct 18, 2015

    —

    by

    Luca Zanini
    in Android

    I published an app in Google Play Store named Golden Rolly, it is a game of the category puzzle and you can find a short video presentation here.

    Read more: Golden Rolly

  • Resetting the preferences on first launch of an app

    Aug 30, 2015

    —

    by

    Luca Zanini
    in Android

    If you want to reset or change preferences of an app at the first start here is an example of code you can put in an event as onCreate of the main activity:

    Read more: Resetting the preferences on first launch of an app

  • Restoring complex objects at restart of an activity

    Jul 28, 2014

    —

    by

    Luca Zanini
    in Android

    In an android app an activity is created and then destroyed, for example when the user open another activity or when the user presses the back button, later the user opens again the same activity that is is recreated using the data saved before the earlier destruction of the activity. The data are saved in…

    Read more: Restoring complex objects at restart of an activity

  • Stopping the threads

    May 24, 2014

    —

    by

    Luca Zanini
    in Java

    Starting a thread is very easy in java, after you create it you need to call the method start(), for example: Thread myThread = new Thread(new MyRunnable()); myThread.start(); where MyRunnable is a class implementing the Runnable interface overidden the method run().

    Read more: Stopping the threads

  • List of the sensors in a device

    May 18, 2014

    —

    by

    Luca Zanini
    in Android

    In December 2012 I wrote a post about an app that displays the sensor list in an android device, now after about a year and a half the API 19 have new sensor types and methods and I thought to update the app.

    Read more: List of the sensors in a device

  • Implementing the double tap on an ImageView

    May 10, 2014

    —

    by

    Luca Zanini
    in Android

    In this post I explain a simple example of an implementation of a double tap event on an ImageView that can be adapted with some changes for a TextView or an Activity.

    Read more: Implementing the double tap on an ImageView

  • Padding and margin in DialogPreference

    May 10, 2014

    —

    by

    Luca Zanini
    in Android

    I implemented a Time Picker in the preference using the code found here where the class TimePreference extends the class DialogPreference but I found a lack of alignment with the other preference items because of a different setting of the margins and/or padding.

    Read more: Padding and margin in DialogPreference

  • Copying an array in java

    May 4, 2014

    —

    by

    Luca Zanini
    in Java

    In this post I show some ways to copy arrays of primitive data and objects to another array.

    Read more: Copying an array in java

  • Handling the multi-touch in a surface view

    Apr 26, 2014

    —

    by

    Luca Zanini
    in Android

    In the previous post Handling the multi-touch in a view I’ve used a class that extends a View to show the circles where the screen is touched, here I display the same example but using a SurfaceView.

    Read more: Handling the multi-touch in a surface view

  • Handling the multi-touch in a view

    Apr 22, 2014

    —

    by

    Luca Zanini
    in Android

    In this post you find a full example about how to extend a view to draw, in this case, a circle where you touch the screen implement a listener on a view to handle the multi-touch

    Read more: Handling the multi-touch in a view

←Previous Page Next Page→