Luca Zanini
  • Home
    • Astronomy
    • Android
    • Java
    • Lotus
  • About me
  • 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

  • Displaying notifications and progress bar from an instance of AsyncTask

    Apr 4, 2014

    —

    by

    Luca Zanini
    in Android

    The AsyncTask class is used to perform background tasks and it might be useful to show notifications and progress bars to alert the user. In this post I write an example where I create two AsyncTask instances showing a startup notification, a progress bar and a notification of completed task

    Read more: Displaying notifications and progress bar from an instance of AsyncTask

  • How to change the look and feel of a view using css

    Mar 31, 2014

    —

    by

    Luca Zanini
    in Lotus

    A lotus view open in a browser is very ugly but you can greatly improve using stylesheets (css); here I explain how to use the css in a lotus view in order to improve the look and feel and to display rows in alternate colors.

    Read more: How to change the look and feel of a view using css

  • How to display an icon in the preferences

    Mar 12, 2014

    —

    by

    Luca Zanini
    in Android

    In the Android preferences you can put different types of controls: check box, edit box, list,…, but none of these displays an icon (see Settings). Usually a preference consists of two lines, the title and the summary, and after you have clicked you get a dialog box where you can select the chosen item, as…

    Read more: How to display an icon in the preferences

  • Running a fortran program from java

    Feb 12, 2014

    —

    by

    Luca Zanini
    in Java

    In this post I write an example about how to launch a fortran executable form a java program passing some arguments and getting back a result. The chosen example uses code written in fortran to get primes, it is from Sieve of Eratosthenes.

    Read more: Running a fortran program from java

  • Getting the variables of the outer class from an inner class

    Jan 27, 2014

    —

    by

    Luca Zanini
    in Java

    The inner classes, and then not static, can access even if with some limitation to the variables of the outer class.

    Read more: Getting the variables of the outer class from an inner class

←Previous Page Next Page→
We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.