Robolectric Unit Test failing with Android Studio 2.3 updates

All my Unit Test started throwing this error: No such manifest file: build\intermediates\bundles\debug\AndroidManifest.xml java.lang.NullPointerException at org.robolectric.shadows.ShadowAssetManager.getAndResolve( at org.robolectric.shadows.ShadowAssetManager.getResourceValue( at android.content.res.AssetManager.getResourceValue( at android.content.res.Resources.getValue( at at at at at at at at<init>( at<init>( at<init>( at<init>( at<init>( at at at at at […]

How to make Activity, not covering full screen

I want my activity to take smaller area of the screen e.g. toast doesn’t cover all of the screen, it is just shown over other things and rest of the contents can be seen behind the toast. But it’s a dialog, and I want my screen to be shown above other things e.g. above Home […]

How reliable is LocationManager's getLastKnownLocation and how often is it updated?

I am building an app that can use a user’s current location on certain actions. Location is more of a benefit to the user rather than a critical part of the process. I’m only interested in very rough accuracy and it can be off by 5 or even 10 miles and still be of value. […]

Drawing a line with a certain pixel width

I would like to display X/Y data on a canvas using lines with a certain width (in pixels, or “dp” ideally). I have tried the setStrokeWidth(..) method of Paint, and that indeed does change the line width but it isn’t what I need. In my case I’ve scaled my canvas to “real Engineering units” using […]

Robust file transfer from mobile devices to server

What I need is a solution(a library) for file transfer from mobile devices(iOS, Android) to sever(PHP). The basic requirement is that files should be split into chunks so that if data connection is lost in the middle of sending file, I don’t need to re-send the whole file. Low memory usage is also obligatory. I […]

Tiled background is pushing it's View size

I have a tiled bitmap that I’m using as the View background. This View, let’s say, has android:layout_height=”wrap_content”. The problem is that the height of the bitmap used in the background is participating in the measurement of the view, increasing the View height. This can be noticed when the size of the content of View […]

SwipeyTabs – how to create Swipey Tabs using ActionBarSherlock Library?

I have created swipey tabs using ViewPagerExtensions but this time i am using only one library ActionBarSherlock in my App and i dont know how to create swipey tabs like google play store. If you can help me to get it done, i’d be very thankful to you. This is the onCreate method of my […]

Espresso freezing on view with looping animation

I have a view in which an element is animated with the following in an infinite loop: <translate android:fromXDelta=”0%” android:toXDelta=”100%” android:duration=”10000″ android:repeatCount=”-1″ android:repeatMode=”reverse”/> When Espresso opens my activity, it’s able to perform some operations but quickly freezes. I suppose Espresso is waiting for the UI thread to become idle which never happens in this case. […]

Correspondence between ImageView coordinates and Bitmap Pixels – Android

In my application I want the user to be able to select some content of an Image contained inside an ImageView. To select the content I subclassed the ImageView class making it implement the OnTouchListener so to draw over it a rectangle with borders decided by the user. Here is an example of the result […]

How does robospice manage activity lifecycle?

I’m looking for a technical answer to how the android robospice library manages activity lifecycle. From the getting started page: “As an inner class of your Activity (or other context), add a RequestlListener that will update your UI. Don’t worry about memory leaks, RoboSpice manages your activity’s life cycle.” My question is how does […]

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