How to make zoomable scrollview?

In my android application I need to create activities zoom able. I found useful code for zooming linear layout here . But in my application couple of activities start with scrollview and this code does not recognize scrollview. How can I make pinch zoom for scrollable activity? This is one of my layout. <ScrollView xmlns:android=”” […]

Android Attaching a file to GMAIL – Can't attach empty file

I had a program that would always attach the same file to GMAIL (Compose > Attach File > Open From > “MyProgram”). It would always select the same file. What it was doing was: String path = Environment.getExternalStorageDirectory() + “/file.3gp”; File f = new File(path); Uri data = Uri.fromFile(f); Intent i = new Intent(); i.setData(data); […]

Obfuscation in Android Studio

Is there any obfuscation tool to use with Android Studio? IntelliGuard plugin is declared to be supported by the Studio, but it doesn’t work actually due to missing AntSupport plugin. I wan’t able to find one in the repository. Any ideas? P.S. Android Studio build process is based on Gradle, so I wouldn’t expect to […]

I get 'Command Not Found' when I try to run Android Emulator on Mac OS X

When I use the Mac OS X Terminal to navigate to the folder with my Android Emulator and type emulator, I get: command not found Here’s what happens: $ emulator -bash: emulator: command not found How do I get it to work?

NDK is not configured issue in android studio

My Application is built successfully on Eclipse but fails to Build on android studio. It returns the error code Ndk is not Configured. Then I’ve added ndk path to build.gradle then its showing the following error: Information:Gradle tasks [:nano:assembleDebug] WARNING [Project: :nano] Current NDK support is deprecated. Alternative will be provided in the future. :nano:preBuild […]

Can OpenGL ES render textures of non base 2 dimensions?

This is just a quick question before I dive deeper into converting my current rendering system to openGL. I heard that textures needed to be in base 2 sizes in order to be stored for rendering. Is this true? My application is very tight on memory, but most of the bitmaps are not powers of […]

Get city name and postal code from Google Place API on Android

I’m using Google Place API for Android with autocomplete Everything works fine, but when I get the result as shown here, I don’t have the city and postal code information. private ResultCallback<PlaceBuffer> mUpdatePlaceDetailsCallback = new ResultCallback<PlaceBuffer>() { @Override public void onResult(PlaceBuffer places) { if (!places.getStatus().isSuccess()) { // Request did not complete successfully Log.e(TAG, “Place query […]

Android library project uses declare-styleable — how to compile?

I have a custom preferences control that I have defined a few attributes for in values/attrs.xml. Just to focus the conversation, here is an example of attributes that could be found in values/attrs.xml: <?xml version=”1.0″ encoding=”utf-8″?> <resources> <declare-styleable name=”MyCustomView”> <attr name=”android:text”/> <attr name=”android:textColor”/> <attr name=”extraInformation” format=”string” /> </declare-styleable> </resources> To use the attributes, you use […]

How does one upgrade to Android SDK 25.1.3?

After the latest update to Xamarin, I get this error in design view “The installed Android SDK is too old. Version 25.1.3 or newer is required.” Running the “Open Android SDK” and installing the latest version of Android Studio did not resolve the issue.

Change color of Switch in Android

I’m trying to change the color of my switch in Android. I realize that I will need new 9patches. I went over to and selected my color and selected (Switch Jelly Bean). To use Switch Jelly Bean I had to use: To import it into my project I had to add: <item name=”switchStyle”>@style/Widget.Holo.CompoundButton.Switch</item> […]

Android Babe is a Google Android Fan, All about Android Phones, Android Wear, Android Dev and Android Games Apps and so on.