LoneDuck
LoneDuck

Reputation: 1872

Android - Emulator showing garbled layout

I'm developing an android app. So far I've been testing everything on my Galaxy Nexus with android 4+. I've done all my programming with backwards compatibility in mind.

I'm very close to release, and want to make sure that it runs okay on API 9+. Since I don't have a real android 2.3 phone, I'm using the emulator.

Everything seems to work fine, but the layout is sometimes okay, and sometimes completely garbled!

enter image description here

The background is horrible, and TextViews are a lot of times missing. But sometimes they're okay for just a few moments before garbling up. How reliable is this emulator? Is this how it would really look if I ran it on a real machine? What can cause this?

EDIT: The layout in the screenshot is made up of 7 small ViewGroups containing ListViews. This is the code for the main background drawable (the blue-green-gray garbled one):

<?xml version="1.0" encoding="utf-8"?>
<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
    android:src="@drawable/main_bgtile"
    android:tileMode="repeat" />

EDIT2: I also noticed that when a transaction animation when switching fragments is played, the fragments look perfect for the duration of the animation, and then re-garble when it's done.

EDIT 3: My logcat seems to be flooded with the following error: 10-09 00:41:40.385: D/skia(327): SkGL unimplemented: stroke path

A few dozens of those. What should I do to fix this?

Thanks

Upvotes: 0

Views: 444

Answers (1)

LoneDuck
LoneDuck

Reputation: 1872

I solved it:

I'm using actionbarsherlock; and for some reason I decided to disable the actionbar in the style, but then re-request it in the activity.

By removing this line from my onCreate() method in my activity, I was able to solve the problem: this.getWindow().requestFeature(Window.FEATURE_ACTION_BAR)

Upvotes: 2

Related Questions