Tag Archives: Android

Android Development Tools (ADT) for Eclipse now building with Maven Tycho

The ADT project is now using Maven Tycho for there build. See Bug report and ADT build instructions for details.

Posted in Android, Eclipse, Lars Vogel | Tagged , , , | 6 Comments

Using XML layout references in Android

Android supports resource selectors based on qualifiers. For example to use a special layout file for activity_main.xml on a tablet in landscape mode you would typically define a layout file also called activity_main.xml in the layout-sw600-land folder. Instead of using … Continue reading

Posted in Android, Other | Tagged | Comments Off on Using XML layout references in Android

Determine the active Android framework maintainer by Lars Vogel

If you want to know the current Android maintainer you can use the following link: Android framework maintainer Thanks to Arvid Gerstmann for pointing me to that URL on Google+.

Posted in Android | Tagged | Comments Off on Determine the active Android framework maintainer by Lars Vogel

How to enable the Development Settings on your Android 4.2 phone by Lars Vogel

Developer Settings in your Setting application of your Android phone allow to set configurations which simplify the analysis of your application. For example you can enable that the touch area is highlighted. If you don’t have a developer phone you … Continue reading

Posted in Android | Tagged , | Comments Off on How to enable the Development Settings on your Android 4.2 phone by Lars Vogel

Setting to update Android applications only if connected with WLAN (Android user tip)

In case you are on a limited data plan you should setup your device to update your applications and the system image only via WLAN. To set this up, open the Google Play application, open its options and and select … Continue reading

Posted in Android | Tagged | Comments Off on Setting to update Android applications only if connected with WLAN (Android user tip)

How to define a Android Multiline EditText

Defining an Android Mulitline EditText Field is done via the inputType=”textMultiline”. Unfortunately the text looks strangely aligned. To solve that also use the gravity=”left|top” attribute. With the gravity flag it looks like the following. Without it, it looks like the … Continue reading

Posted in Android | Tagged | Comments Off on How to define a Android Multiline EditText

Android: How to check if a LocationProvider is available?

In Android the LocationProvider for example for GPS might not be available. You can find out if a LocationManager is enabled via the isProviderEnabled() method. If its not enabled you can send the user to the settings via an Intent … Continue reading

Posted in Android | Tagged , | Comments Off on Android: How to check if a LocationProvider is available?

How to determine the ID in the R.java file of a drawable resource in Android?

Assume you have several drawables in your Android resource folder and what to iterate over them. You use a certain naming schema and would like to use this to determine the resources ID’s. The following snippets shows how to get … Continue reading

Posted in Android | Tagged , | 2 Comments

How to center a Button in an Android Layout?

In my last Android Training several people asked how they could center a single view, e.g. a Button, so I assume it is worth a short blog entry. If you have a single Button in your Activity and you want … Continue reading

Posted in Android | Tagged , | Comments Off on How to center a Button in an Android Layout?

Android StrictMode – NetworkOnMainThreadException

I have writen about StrictMode before. In case you have not noticed; StrictMode for network access results in a fatal error as for Android 3.0 (Honeycomb) or later, unless your app is targeting an API version before Honeycomb. The right … Continue reading

Posted in Android | Tagged , , , | Comments Off on Android StrictMode – NetworkOnMainThreadException