Status Update
Comments
da...@google.com <da...@google.com> #2
but the fontStyle and fontFamily parameters are not. I expected "World" to display as bold, italic and monospace.
+1, it sounds like a bug and agree that fontStyle
and fontFamily
should be carried as long as they are note overridden
Note also how textDecoration = TextDecoration.LineThrough from the annotated string and TextDecoration.Underline on the Text combine
This also sounds like a bug (especially for a case where Text has LineThrough, AnnotatedString has TextDecoration.None, where the intention is "this part of the text should not have a text decoration)
an...@gmail.com <an...@gmail.com> #3
Branch: androidx-main
commit 28810a41432e2fc8713e0a4b59ac311d9db77eb3
Author: Haoyu Zhang <haoyuchang@google.com>
Date: Fri Apr 09 16:04:52 2021
Read global font attributes when resolve font attributes on AnnotatedString
Also introduced screenshot test for styled text.
Bug: 184760917
Test: ./gradlew test
Change-Id: I8f21298ffd551f0963e11b059412f0c582dc9dd6
A compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/text/BasicTextScreenshotTest.kt
M compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/platform/SpannableExtensionsTest.kt
M compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/platform/AndroidParagraphHelper.android.kt
M compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/platform/AndroidParagraphIntrinsics.android.kt
M compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/platform/extensions/SpannableExtensions.android.kt
ap...@google.com <ap...@google.com> #4
Branch: androidx-main
commit eeff527b7ec6ca2accb0163696098d2765076262
Author: Haoyu Zhang <haoyuchang@google.com>
Date: Thu Apr 29 11:13:41 2021
Make SpanStyle merge logic on AnnotatedString consistent
Bug: 184760917
Test: ./gradlew test
Test: ./gradlew compose:ui:ui-text:connectedAndroidTest
RelNote: "TextGeomerticTransform and TextDecoration on AnnotatedString
will be applied as given."
Change-Id: I61900b749deafc1570dc329a64d1050fd52b20a2
M compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/platform/AndroidParagraphTest.kt
M compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/platform/AndroidAccessibilitySpannableString.android.kt
M compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/platform/extensions/SpannableExtensions.android.kt
A text/text/src/main/java/androidx/compose/ui/text/android/style/TextDecorationSpan.kt
da...@google.com <da...@google.com> #5
I tried this on beta06 (assuming that's where the fix went) and fontStyle
and fontFamily
now apply as expected. However, I still get underlining AND linethrough on "World". I wanted to confirm that it is your intention to combine them, based on the comments above.
Playing with the example further:
- Changing the
Text
toTextDecoration.None
results in no decoration on "Hello" but a linethrough on "World" (seems reasonable -- annotated overrides Text) - Changing the annotated "World" to
TextDecoration.None
and theText
toTextDecoration.LineThrough
(as suggested in the comments above) results in a linethrough on "Hello World" (seems inconsistent -- shouldn't "World" have no decoration?)
(And sometimes, oddly, I have to uninstall the test app manually in the emulator before the new code will take effect.)
st...@gmail.com <st...@gmail.com> #6
Hi, thanks for your report! The fixing CL for TextDeocration and LineThrough was just merged recently. And it's probably not included in the beta-06, can you please check it again in next release?
Description
Room integrated and working well, adding new date-related queries; these two are fine:
@Query("SELECT DISTINCT strftime('%Y-%m-%d', dateIso8601)...
@Query("SELECT DISTINCT strftime('%m-%d', dateIso8601)...
but attempting to use just the day field, fails to build:
@Query("SELECT DISTINCT strftime('%d', dateIso8601)...
Build error looks like
e: [kapt] An exception occurred: java.util.IllegalFormatConversionException: d != [Ljava.lang.Object;
at java.util.Formatter$FormatSpecifier.failConversion(Formatter.java:4302)
at java.util.Formatter$FormatSpecifier.printInteger(Formatter.java:2793)
at java.util.Formatter$FormatSpecifier.print(Formatter.java:2747)
at java.util.Formatter.format(Formatter.java:2520)
at java.util.Formatter.format(Formatter.java:2455)
at java.lang.String.format(String.java:2940)
at androidx.room.log.RLog.safeFormat(RLog.kt:40)
at androidx.room.log.RLog.w(RLog.kt:68)
at androidx.room.solver.query.result.PojoRowAdapter.<init>(PojoRowAdapter.kt:74)
at androidx.room.solver.TypeAdapterStore$findRowAdapter$1.invoke(TypeAdapterStore.kt:345)
at androidx.room.solver.TypeAdapterStore$findRowAdapter$1.invoke(TypeAdapterStore.kt:82)
at androidx.room.processor.Context.collectLogs(Context.kt:86)
at androidx.room.solver.TypeAdapterStore.findRowAdapter(TypeAdapterStore.kt:338)
at androidx.room.solver.TypeAdapterStore.findQueryResultAdapter(TypeAdapterStore.kt:305)
at androidx.room.solver.binderprovider.RxCallableQueryResultBinderProvider.provide(RxCallableQueryResultBinderProvider.kt:39)
at androidx.room.solver.TypeAdapterStore.findQueryResultBinder(TypeAdapterStore.kt:272)
at androidx.room.processor.QueryMethodProcessor.process(QueryMethodProcessor.kt:107)
at androidx.room.processor.DaoProcessor.process(DaoProcessor.kt:95)
at androidx.room.processor.DatabaseProcessor.doProcess(DatabaseProcessor.kt:93)
at androidx.room.processor.DatabaseProcessor.process(DatabaseProcessor.kt:53)
at androidx.room.RoomProcessor$DatabaseProcessingStep.process(RoomProcessor.kt:57)
at com.google.auto.common.BasicAnnotationProcessor.process(BasicAnnotationProcessor.java:318)
at com.google.auto.common.BasicAnnotationProcessor.process(BasicAnnotationProcessor.java:171)
at org.jetbrains.kotlin.kapt3.base.ProcessorWrapper.process(annotationProcessing.kt:99)
at com.sun.tools.javac.processing.JavacProcessingEnvironment.callProcessor(JavacProcessingEnvironment.java:794)
at com.sun.tools.javac.processing.JavacProcessingEnvironment.discoverAndRunProcs(JavacProcessingEnvironment.java:705)
at com.sun.tools.javac.processing.JavacProcessingEnvironment.access$1800(JavacProcessingEnvironment.java:91)
at com.sun.tools.javac.processing.JavacProcessingEnvironment$Round.run(JavacProcessingEnvironment.java:1035)
at com.sun.tools.javac.processing.JavacProcessingEnvironment.doProcessing(JavacProcessingEnvironment.java:1176)
at com.sun.tools.javac.main.JavaCompiler.processAnnotations(JavaCompiler.java:1170)
at com.sun.tools.javac.main.JavaCompiler.processAnnotations(JavaCompiler.java:1068)
at org.jetbrains.kotlin.kapt3.base.AnnotationProcessingKt.doAnnotationProcessing(annotationProcessing.kt:55)
at org.jetbrains.kotlin.kapt3.base.AnnotationProcessingKt.doAnnotationProcessing$default(annotationProcessing.kt:27)
at org.jetbrains.kotlin.kapt3.AbstractKapt3Extension.runAnnotationProcessing(Kapt3Extension.kt:218)
at org.jetbrains.kotlin.kapt3.AbstractKapt3Extension.analysisCompleted(Kapt3Extension.kt:183)
at org.jetbrains.kotlin.kapt3.ClasspathBasedKapt3Extension.analysisCompleted(Kapt3Extension.kt:100)
at org.jetbrains.kotlin.cli.jvm.compiler.TopDownAnalyzerFacadeForJVM$analyzeFilesWithJavaIntegration$2.invoke(TopDownAnalyzerFacadeForJVM.kt:95)
at org.jetbrains.kotlin.cli.jvm.compiler.TopDownAnalyzerFacadeForJVM.analyzeFilesWithJavaIntegration(TopDownAnalyzerFacadeForJVM.kt:105)
at org.jetbrains.kotlin.cli.jvm.compiler.TopDownAnalyzerFacadeForJVM.analyzeFilesWithJavaIntegration$default(TopDownAnalyzerFacadeForJVM.kt:82)
at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler$analyze$1.invoke(KotlinToJVMBytecodeCompiler.kt:375)
at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler$analyze$1.invoke(KotlinToJVMBytecodeCompiler.kt:67)
at org.jetbrains.kotlin.cli.common.messages.AnalyzerWithCompilerReport.analyzeAndReport(AnalyzerWithCompilerReport.kt:107)
at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler.analyze(KotlinToJVMBytecodeCompiler.kt:366)
at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler.compileModules$cli(KotlinToJVMBytecodeCompiler.kt:120)
at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.doExecute(K2JVMCompiler.kt:161)
at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.doExecute(K2JVMCompiler.kt:57)
at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.java:96)
at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.java:52)
at org.jetbrains.kotlin.cli.common.CLITool.exec(CLITool.kt:93)
at org.jetbrains.kotlin.daemon.CompileServiceImpl$compile$1$1$2.invoke(CompileServiceImpl.kt:442)
at org.jetbrains.kotlin.daemon.CompileServiceImpl$compile$1$1$2.invoke(CompileServiceImpl.kt:102)
at org.jetbrains.kotlin.daemon.CompileServiceImpl$doCompile$$inlined$ifAlive$lambda$2.invoke(CompileServiceImpl.kt:1029)
at org.jetbrains.kotlin.daemon.CompileServiceImpl$doCompile$$inlined$ifAlive$lambda$2.invoke(CompileServiceImpl.kt:102)
at org.jetbrains.kotlin.daemon.common.DummyProfiler.withMeasure(PerfUtils.kt:137)
at org.jetbrains.kotlin.daemon.CompileServiceImpl.checkedCompile(CompileServiceImpl.kt:1071)
at org.jetbrains.kotlin.daemon.CompileServiceImpl.doCompile(CompileServiceImpl.kt:1028)
at org.jetbrains.kotlin.daemon.CompileServiceImpl.compile(CompileServiceImpl.kt:441)
at sun.reflect.GeneratedMethodAccessor106.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:346)
at sun.rmi.transport.Transport$1.run(Transport.java:200)
at sun.rmi.transport.Transport$1.run(Transport.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:196)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:568)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:826)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:683)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:682)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)