Tabs of TabLayout not showing

I have a main activity, which hosts a fragment, which in turn hosts a TabLayout (with a ViewPager). The tab bar is shown, baut the tabs themselves are not shown. Here is my code in the main activity for displaying the host fragment: Fragment fragment = new BMITabsFragment(); FragmentManager fragmentManager = getSupportFragmentManager(); fragmentManager.beginTransaction().replace(, fragment).addToBackStack(Constants.BMI_TABS_FRAGMENT).commit(); Here […]

Determining even/odd numbers (integers)?

I feel stupid asking such a simple question, but is there an easy way to determine whether an Integer is even or odd?

Android: Issues in animating edittext?

I tried to animate the edittext when user starts editing it. I have tried the following code, EditText txtPassword = (EditText) findViewById(; Animation anim = AnimationUtils.loadAnimation(getApplicationContext(),R.anim.anim); anim.setInterpolator((new AccelerateDecelerateInterpolator())); anim.setFillAfter(true); txtPassword.startAnimation(anim); anim.xml ““““ <?xml version=”1.0″ encoding=”utf-8″?> <set xmlns:android=””> <translate android:fromYDelta=”0″ android:toYDelta=”-50%p” android:duration=”100″/> </set> The animation works fine. but the edittext stopped userinteraction after animation. If the […]

how to update plugin?

I’m getting this message: Plugin is too old, please update to a more recent version, or set ANDROID_DAILY_OVERRIDE environment variable to “a9d6c794295e89d95704157e2ed8fd55ffd2765c” and: C:\path\mobile\build.gradle Error:(1) A problem occurred evaluating project ‘:mobile’. Failed to apply plugin [id ‘’] Could not create plugin of type ‘AppPlugin’. top build.gradel file: buildscript { repositories { jcenter() } dependencies { […]

Loader and LoaderManager – how to determine if a current Loader is active and running?

How can you query a LoaderManager to see if a Loader is currently running?

How to encode a WAV to a mp3 on a Android device

I have simplified my question and offered a bounty: What options are there for compressing raw PCM audio data to a mp3 on a Android device. My original post: I’m creating a synthesiser on my Android phone, and I’ve been generating PCM data to send to the speakers. Now I’m wondering if I can encode […]

Controlling the Camera's Auto-Exposure

I have written a camera app in android and I have tested it on two android phones, on one phone the auto-exposure works well when previewing but on the other phone it doesn’t work at all. The first phone only works when I call the autoFocus() method. On the latter phone, the build-in app’s auto-exposure […]

toByteArray() won't be resolved for facebook login

I am building an app which requires facebook login and authentication. I am following I got this error: when I hit the facebook login button: Multiple posts say that this code should resolve the error Key hash doesn't match while facebook login in android : try { PackageInfo info = getPackageManager().getPackageInfo( “com.hitup.hitup”, PackageManager.GET_SIGNATURES); for […]

Error when using Robolectric to test an ActionBarActivity

I’m using Robolectric to test an activity from my application. The Activity extends ActionBarActivity. When I test the activity I get the error : “IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity.” My testing environment is this: Android Studio 0.8.6, Robolectric 2.4-SNAPSHOT, support-v4 library version 20.0, appcompat-v7 version 20.0. Now […]

Progressbar WebView like Chrome Browser

Have anyone an idea to use the Progressbar on a webview like in Chrome or Reader? like on the bottom here:

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