Tag: android

  • List of the sensors in an Android device

    This is a simple app that displays all the sensors in the phone reporting the following characteristics: Name: name of the sensor Version: version of the sensor’s module Vendor: vendor of this sensor Type: type of this sensor Max Range: maximum range of the sensor Resolution: resolution of the sensor Min Delay: minimum delay allowed…

  • Device Definitions in Android SDK Tools Rev.21

    In the last release of Android SDK Tools Rev.21 I found a nice surprise: now there are some device and configurations for the emulator.

  • Saving the position of a ScrollView inside a Fragment

    I thought of writing a post about how to save the position of a ScrollView when I read the Bhavin’s comment in the post Tab Layout in Android with ActionBar and Fragment. Bhavin asked how one could restore the position of a scrollview switching between a tab and the other.

  • Spinner menu

    The spinner menu is a navigation mode that allows you to switch from one view to another using a drop down menu. The advantage of using the spinner menu consists in a more compact design because it does not require a dedicated tab bar, but it uses the bar already commonly used for the title…

  • The merge tag

    The merge tag allows you to avoid an unnecessary use of nested layouts when you use the include tag.

  • Tabs and swipe views

    In the post Tab Layout in Android with ActionBar and Fragment I explain how to implement tabs and in the post Swipe views I explain how to implement the swipe views or scrolling tabs using the ViewPager of the Compatibility Package. In this post I explain how to implement 3 tabs that look like those…

  • Swipe views

    In a previous post I implemented a layout with 2 tabs using an action bar and fragments; the disadvantage of this layout is that dragging horizzontally the views in a similar way to Google Play would be very natural for the user. In Horizontal View Swiping with ViewPager you can see how to get this…

  • Quickly switch between the code for the emulator to the code for the real device

    In a previous post I explained the differences between the code for the emulator and the code for the real device, but the switch from one to another and vice versa is very cumbersome.In this post I propose a way to switch quickly from one situation to another with few changes.The specific code for the…

  • Android XML Editor cannot process this input

    If you open an XML document in Eclipse and you get the error “Android XML Editor can not process this input”, you can solve it by opening the preferences (Window menu -> Preferences) and select General -> Editors -> File Associations, highlight *.xml , and choose XM Editor as default editor, and then no more…

  • gimp-android-xdpi

    I found this very useful plugin for gimp, called gimp-android-xdpi, that allows you to easily create images with the desired dimensions in the directories drawable-ldpi, drawable-mdpi, drawable-hdpi and drawable-xhdpi of an Android project, following the guidelines explained on Icon Design Guidelines and links therein.