Jake Edwards
Jake Edwards

Reputation: 1216

Eclipse and ADT Rendering: Graphical Layout Target Platform

I was wondering if someone would be able to give me some clarification as to the purpose and reliability of the "target platform" drop-down box in the Graphical Layout editor?

Platform Target Box

Purpose?

My current understanding is that the target platform drop-down box is meant to show me what the layout will look like in the selected platform. I also have seen that the ADT plugin has several change-log entries suggesting that the layout engine isn't 100% accurate, and that leaves me with a few questions;

I realise that the ADT plugin may have it's own limitations and that the layout engine is being updated by Google regularly. I also am testing on devices (not just using the layout editor), but would still like to determine the purpose of the this "target platform" drop-down box.

Rendering Error

The reason I thought I would seek some clarification, is that I'm experiencing some odd results (in particular, when attempting to render a tiled bitmap drawable in anything but less than Android 3.0);

Shader 'android.graphics.BitmapShader' is not supported in the Layout Editor.

That message seems to suggest that it's just a limitation of the ADT plugin for Eclipse? It seems to render fine on my 2.3 device. This also suggests that I should just develop with that box set to Android 3.1.

Upvotes: 1

Views: 2879

Answers (1)

Kevin Qiu
Kevin Qiu

Reputation: 1626

For the most part, simple stuff like the default buttons/gui objects and their alignments will look correct. However, I have had issues with extended buttons and gradients not showing up. You should use this as a quick guide for making minor changes, but rely on the actual device for accuracy. I too get strange errors like mapviews erroring out on 3.0 or higher or random nullpointers for custom objects.

Upvotes: 2

Related Questions