diff options
author | Eric Fischer <enf@google.com> | 2009-08-12 15:00:10 -0700 |
---|---|---|
committer | Eric Fischer <enf@google.com> | 2009-08-12 16:04:10 -0700 |
commit | a9f1dd021f8f6ee777bc4d27913bd40c42e753af (patch) | |
tree | da094eda66b853fbf4106f8ee76b2f681ee84cc5 /api | |
parent | c71c35d69f0a829df1c3d027815547932cc25337 (diff) | |
download | frameworks_base-a9f1dd021f8f6ee777bc4d27913bd40c42e753af.zip frameworks_base-a9f1dd021f8f6ee777bc4d27913bd40c42e753af.tar.gz frameworks_base-a9f1dd021f8f6ee777bc4d27913bd40c42e753af.tar.bz2 |
Make <font size> and <font height> in string resources respect density.
This unfortunately requires API changes because the existing text markup
classes had no access to the screen density.
TextPaint gains a "density" field so that TextView can pass the density
along. AbsoluteSizeSpan gains a new flag to indicate that its argument
is in dip instead of in physical pixels. LineHeightSpan gains an inner
interface whose chooseHeight() method includes a TextPaint argument so
it can get at the density. And when StringBlock creates the markup
objects, it now uses the density-aware versions.
Bug 1976971, Bug 2031746
Diffstat (limited to 'api')
-rw-r--r-- | api/current.xml | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/api/current.xml b/api/current.xml index 397e25d..7d1e8e8 100644 --- a/api/current.xml +++ b/api/current.xml @@ -130128,6 +130128,16 @@ visibility="public" > </field> +<field name="density" + type="float" + transient="false" + volatile="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +</field> <field name="drawableState" type="int[]" transient="false" @@ -135126,6 +135136,18 @@ deprecated="not deprecated" visibility="public" > +<parameter name="size" type="int"> +</parameter> +<parameter name="dip" type="boolean"> +</parameter> +</constructor> +<constructor name="AbsoluteSizeSpan" + type="android.text.style.AbsoluteSizeSpan" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> <parameter name="src" type="android.os.Parcel"> </parameter> </constructor> @@ -135140,6 +135162,17 @@ visibility="public" > </method> +<method name="getDip" + return="boolean" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +</method> <method name="getSize" return="int" abstract="false" @@ -136530,6 +136563,41 @@ </parameter> </method> </interface> +<interface name="LineHeightSpan.WithDensity" + abstract="true" + static="true" + final="false" + deprecated="not deprecated" + visibility="public" +> +<implements name="android.text.style.LineHeightSpan"> +</implements> +<method name="chooseHeight" + return="void" + abstract="true" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="text" type="java.lang.CharSequence"> +</parameter> +<parameter name="start" type="int"> +</parameter> +<parameter name="end" type="int"> +</parameter> +<parameter name="spanstartv" type="int"> +</parameter> +<parameter name="v" type="int"> +</parameter> +<parameter name="fm" type="android.graphics.Paint.FontMetricsInt"> +</parameter> +<parameter name="paint" type="android.text.TextPaint"> +</parameter> +</method> +</interface> <class name="MaskFilterSpan" extends="android.text.style.CharacterStyle" abstract="false" |