2afabd060e15342c0ba622cb08f5be61a328e566 |
|
17-May-2017 |
Seigo Nonaka <nona@google.com> |
Introduce fetch strategy and timeout attribute. This CL makes developer to be able to choose the fetching strategy. Since the font inflation happens on UI thread, it is not a good idea to block until the font fetch finishes. On the other hand, it may be also bad if the fetch happens asynchronously and refresh the display once it finishes. This blinks the contents. Blocking fetching and timeout works as follows: - First, check the local cache and use it if it is available. - Request the font to the font provider and wait until it finishes or timeout happens. - If timeout happens, use default typeface instead. Asynchronous fetching works as follows: - First, check the local cache and use it if it is available. - Request the font to the font provider and use default typeface during initial inflation. - When the fetch finishes, refresh the TextView. We can't add automated tests for resources xml for provider fonts since it requires the static certificates. Bug: 38340183 Test: ./gradlew support-compat:connectedAndroidTest on API 16, 17, 18, 19, 21, 23, 25, 26 Test: ./gradlew support-appcompat-v7:connectedAndroidTest on API 16, 17, 18, 19, 21, 23, 25, 26 Test: ./gradlew support-emoji:connectedDebugAndroidTest on API 16, 17, 18, 19, 21, 23, 25, 26 Change-Id: Iec9d953f1a762a020f3556055f0eda868e6f2641
/frameworks/support/v7/appcompat/src/android/support/v7/widget/TintTypedArray.java
|
f2b8aa644529539d113e87cbaf0e21e49a70fac3 |
|
16-May-2017 |
Seigo Nonaka <nona@google.com> |
Introduce early exit path for non resource path case. This CL does some improvements: - Uses cached TypedValue for taking string from resource. - Introduce the early exit path if the given string is not likely the path in resource file. Bug: 38232467 Test: ./gradlew support-appcompat-v7:connectedDebugAndroidTest on API 15, 16, 17, 18, 19, 21, 22, 23, 24, 25, O Test: ./gradlew support-compat:connectedDebugAndroidTest on API 15, 16, 17, 18, 19, 21, 22, 23, 24, 25, O Change-Id: I03beca271ee3980cd3b7de28fbab74dd8027a1b0
/frameworks/support/v7/appcompat/src/android/support/v7/widget/TintTypedArray.java
|
a55160adc4ac7481c48512c7c146e7875a380021 |
|
02-May-2017 |
Seigo Nonaka <nona@google.com> |
Remove TypefaceHolder and use TextView.setTypeface(Typeface, int) Looks like TextView.setTypeface(Typeface, int) does a good job for fake bold/italic. No need to propagate weight/italic information and call TextView.setTypeface(Typeface, int) instead. This CL fixes invalid skew angle happens on API 21 or later. Known Issues: - FakeItalic is not working even if the text view style has italic bit. (Happens on API 15, 16, 17, 18, 19) - FakeBold/FakeItalic is used for StyleSpan. (Happens on all API level) - Still not working on API 15. Bug: 37783900 Test:./gradlew support-compat:connectedDebugAndroidTest Test: ./gradlew support-emoji:connectedDebugAndroidTest Test: Saw manually the rendered text. (Screenshot attached in issue) Change-Id: Icf496a8d44e37e344262a52ca2936583d768a220
/frameworks/support/v7/appcompat/src/android/support/v7/widget/TintTypedArray.java
|
f69ef36b9ff270c87e41177551ef4692f9aff965 |
|
28-Apr-2017 |
Seigo Nonaka <nona@google.com> |
Make Font Resources XML working on Android N or before device. This addresses several issues: - API 16 to API 25 There are two main issues. -- AssetManager failed to open file by path name. Fixed by using Resources.openRawResource instead of AssetManager.openNonAssetFd. -- TextView's style is ignored. Before API 26, there is no way to create Typeface from multiple font files. If Typeface is created from multiple font files, TextView will select correct font based on style information of them. However, this is impossible on API 25 or before. So select best match font from given list and create Typeface with it. At the same time, there is a concept "fakeBold" and "fakeItalic" on Android. If even the best matched Typeface is not usable for requested style, TextView makes bold/italic glyph with transforming available glyph. Since we does font selection by ourselves, needs to set fake bold/italic by manual too. - API 16 - API 19 Styled typeface can be created from another Typeface like as follows. Typeface boldTypeface = Typeface.create(baseTypeface, Typeface.BOLD); The passed style information can be retrieved by Typeface.getStyle() but this doesn't return real value on API 19 or before. Thus, introduce TypefaceHolder to hold actually using weight/italic information. Known Issues: - API 15 or before Still not working even after this patch. TypedArray returns false for hasValue with R.styleable.TextAppearance_android_fontFamily. - API 21 - API 25 The skew angle is sharper. Bug: 37754362 Test: ./gradlew support-compat:connectedDebugAndroidTest passes on API 15,16,17,18,19,21,23,25,26 Test: Test App attached issue 37754362 show the same result on API 16,17,18,19,21,23,25 except for fake italic angle. Screenshots is available on issue tracker. Change-Id: I6bd615774be55981289f5f3b88f3d71fa1b39014
/frameworks/support/v7/appcompat/src/android/support/v7/widget/TintTypedArray.java
|
543fd2946ded1593b28553879e74ca4393eddd2e |
|
24-Mar-2017 |
Clara Bayarri <clarabayarri@google.com> |
Supportlib Fonts in XML This change adds support for the new font resources type in support library, making its use possible pre-O. Test: ./gradlew support-compat:connectedCheck --info --daemon -Pandroid.testInstrumentationRunnerArguments.class=android.support.v4.content.res.FontResourcesParserCompatTest ./gradlew support-compat:connectedCheck --info --daemon -Pandroid.testInstrumentationRunnerArguments.class=android.support.v4.content.res.ResourcesCompatTest ./gradlew support-appcompat-v7:connectedCheck --info --daemon -Pandroid.testInstrumentationRunnerArguments.class=android.support.v7.widget.AppCompatTextViewTest Bug: 35382184 Change-Id: Ide32ae4e914b3dc73756016d24059ead25ca7e68
/frameworks/support/v7/appcompat/src/android/support/v7/widget/TintTypedArray.java
|
d679cb8cd83198de9d1fd67b5058d834d2daaae4 |
|
19-Apr-2017 |
Clara Bayarri <clarabayarri@google.com> |
Revert "Supportlib Fonts in XML" This reverts commit 617be7af1f752cfaaf566e627ff6ea797623f2c3. Reason for revert: <INSERT REASONING HERE> Change-Id: Iacaef0423aa43cc5473042b6d61f2664afaf9cf6
/frameworks/support/v7/appcompat/src/android/support/v7/widget/TintTypedArray.java
|
617be7af1f752cfaaf566e627ff6ea797623f2c3 |
|
24-Mar-2017 |
Clara Bayarri <clarabayarri@google.com> |
Supportlib Fonts in XML This change adds support for the new font resources type in support library, making its use possible pre-O. Test: ./gradlew support-compat:connectedCheck --info --daemon -Pandroid.testInstrumentationRunnerArguments.class=android.support.v4.content.res.FontResourcesParserCompatTest ./gradlew support-compat:connectedCheck --info --daemon -Pandroid.testInstrumentationRunnerArguments.class=android.support.v4.content.res.ResourcesCompatTest ./gradlew support-appcompat-v7:connectedCheck --info --daemon -Pandroid.testInstrumentationRunnerArguments.class=android.support.v7.widget.AppCompatTextViewTest Bug: 35382184 Change-Id: If67cf830c8c2d8875da73318d02db391421dfdfa
/frameworks/support/v7/appcompat/src/android/support/v7/widget/TintTypedArray.java
|
058995d123bc50783c787ef8799318e8797d889c |
|
11-Apr-2017 |
Aurimas Liutikas <aurimas@google.com> |
Move to using Android Gradle Plugin 2.4.0-alpha5 - Move to the new plugin - Fix new lint warnings (missing @RequiresApi) - Suppress 106 doclava warning about missing @attr javadoc in R.java files. alanv@ will investigate this further. - Disable new resource processing as it breaks doclava - Explicitly set jacoco version in SupportLibraryPlugin as a workaround for android gradle plugin bug (fixed in alpha6) Test: ./gradlew assemble createArchive generateDocs updateApi Change-Id: I97d895b4aa2da2bc4a659f25fe54ac75401af9e6
/frameworks/support/v7/appcompat/src/android/support/v7/widget/TintTypedArray.java
|
8e10080c914d1ad0784394fa3026b85535535847 |
|
18-Nov-2016 |
Aurimas Liutikas <aurimas@google.com> |
Move from GROUP_ID to LIBRARY_GROUP annotations - GROUP_ID was deprecated in favor of LIBRARY_GROUP. - Fix import order in touched files. Test: ./gradlew assemble assembleAndroidTest Change-Id: I2a774e93215090f42262fb86cf8e841f2a546a4f
/frameworks/support/v7/appcompat/src/android/support/v7/widget/TintTypedArray.java
|
c39d9c75590eca86a5e7e32a8824ba04a0d42e9b |
|
25-Aug-2016 |
Alan Viverette <alanv@google.com> |
Add @RestrictTo(GROUP_ID) annotations to match @hide docs annotations Also removes some unnecessary @hide annotations on classes that wouldn't have shown up in docs anyway due to package/private visibility or NO_DOCS. Bug: 27937193 Change-Id: Iab127a5a3ce57a2d61965d3cef782621eb3859f5
/frameworks/support/v7/appcompat/src/android/support/v7/widget/TintTypedArray.java
|
4c99f0e29b0926d8e5de44b7e3980d47f052f04c |
|
24-Jun-2016 |
Chris Banes <chrisbanes@google.com> |
Add AppCompatResources.getDrawable() This CL adds the new public method, which just proxies to AppCompatDrawableManager for now. Also moved all internal calls of AppCompatDrawableManager.getDrawable() to the new method. Looks like a huge commit, but it's mostly just moving things to use the new method. BUG: 29564497 Change-Id: Ie1603cc83d58333d70b90aefcfaf21fd367081ae
/frameworks/support/v7/appcompat/src/android/support/v7/widget/TintTypedArray.java
|
15aeaf26caa61ed5f3cd367044801d03c1a0a2b5 |
|
30-Apr-2016 |
Chris Banes <chrisbanes@google.com> |
Add AppCompatResources class AppCompat provides provides backports for a number of resources. Currently all of the functionality is implicit, but this CL adds the AppCompatResources class to expose it. First up is getColorStateList(). BUG: 28476349 Change-Id: If50bb8ba6aeb2db99e99017be68343a8f4750ed4
/frameworks/support/v7/appcompat/src/android/support/v7/widget/TintTypedArray.java
|
19509c838e3e9a34df29163f17ef3a7ea6375b14 |
|
03-Feb-2016 |
Chris Banes <chrisbanes@google.com> |
Fix Button.Borderless.Colored disabled text color DO NOT MERGE We can now use the new themeable CSL support in AppCompat to support disabled text colors. BUG: 25788830 Change-Id: Ic5df43cee36f90feb71d68b61ad3847a7a40f010 (cherry picked from commit e92752a5ddcee0a11cb6016b8bc8ebf0318e44e5)
/frameworks/support/v7/appcompat/src/android/support/v7/widget/TintTypedArray.java
|
9d5f84f33353a42e837c6b465412d1a6f2fc6eaa |
|
18-Jun-2015 |
Chris Banes <chrisbanes@google.com> |
Inflate tints ColorStateList with theme resources This CL adds custom CSL inflation to AppCompat, allowing it to use CSLs with themeable attributes for all devices. Change-Id: I78db7c696afbb81c9867ba9e34356b7585129b9e
/frameworks/support/v7/appcompat/src/android/support/v7/widget/TintTypedArray.java
|
66698bb15ba0f873aa1c2290cc50d6bb839a474a |
|
26-Oct-2015 |
Chris Banes <chrisbanes@google.com> |
Flatten AppCompat class hierarchy This allows us to do two things: 1) Move away from using public @hidden classes everywhere. 2) Workaround silly OEM bugs. BUG: 18218511 Change-Id: I7582e242c7564c32feeb044fc9eff6bfb5c56536
/frameworks/support/v7/appcompat/src/android/support/v7/widget/TintTypedArray.java
|