Draw vertical data usage sweep labels.

Using template string, ask axis to build label for sweeps.  Also
clean up margins exposed to parent view, since we offset when label
is larger than sweep drawable.

Bug: 4598460
Change-Id: If71bc8ec8c952023325c80b9bc00b63c23609c7a
This commit is contained in:
Jeff Sharkey
2011-07-09 01:02:56 -07:00
parent 890e352d5f
commit ec3be8a4a5
8 changed files with 226 additions and 89 deletions

View File

@@ -16,6 +16,9 @@
package com.android.settings.widget;
import android.content.res.Resources;
import android.text.SpannableStringBuilder;
/**
* Utility to invert another {@link ChartAxis}.
*/
@@ -49,13 +52,8 @@ public class InvertedChartAxis implements ChartAxis {
}
/** {@inheritDoc} */
public CharSequence getLabel(long value) {
return mWrapped.getLabel(value);
}
/** {@inheritDoc} */
public CharSequence getShortLabel(long value) {
return mWrapped.getShortLabel(value);
public void buildLabel(Resources res, SpannableStringBuilder builder, long value) {
mWrapped.buildLabel(res, builder, value);
}
/** {@inheritDoc} */