OSDN Git Service

Fixed layout for "Available Devices" in Bluetooth
authorGilles Debunne <debunne@google.com>
Mon, 21 Nov 2011 18:46:39 +0000 (19:46 +0100)
committerGilles Debunne <debunne@google.com>
Tue, 22 Nov 2011 09:45:18 +0000 (10:45 +0100)
commit648f4f66887e3bb0a289ff92f19c0c86e898c9a9
treee1d5e522c8aaaa52908924d03b5fa65d041b6128
parent9e2e24202d3405175f086419477d208264dfd580
Fixed layout for "Available Devices" in Bluetooth

Bug 5646340.

'Title' and 'scanning' text are on the same line as a PreferenceCategory.
The first one has a 0dp width, compensated by a 1 weight.

When scanning is not displayed, it should be GONE rather than INVISIBLE
to let the title take the whole space.

When both are visible, they should split the space, or else, with long
texts in foreign languages, scanning takes the whole space, leaving the
title with an almost 0 width that generates a very high text because
of wrapping.

Distributing size among the two texts to accomodate for such cases.

Changed padding and alignment to get reasonnable results for Slovenian
language (i.e. very long text), when both title and scanning are displayed.

Strangely, the right scanning alignment is not enforced, although I checked
it is correctly set on the TextView. Not investigating further now since it
may not be desired by UX anyway.

Change-Id: I6b4c6fcbc350d3664749f58eee34ec0867720626
res/layout/preference_progress_category.xml
src/com/android/settings/ProgressCategory.java