roundAsCircle don't display in AndroidStudio preview
See original GitHub issuethis is my code:
<com.facebook.drawee.view.SimpleDraweeView
android:id="@+id/iv_author_header"
android:layout_width="50dp"
android:layout_height="50dp"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:layout_marginLeft="10dp"
android:layout_marginRight="8dp"
android:layout_marginTop="22dp"
app:roundingBorderWidth="@dimen/portrait_border_width"
app:roundAsCircle="true"
app:roundingBorderColor="@color/white"
app:placeholderImage="@drawable/default_avator_round"
app:actualImageScaleType="centerInside"
app:failureImage="@drawable/default_avator_round"
app:failureImageScaleType="centerInside"
/>
it can’t display preview ,this is exception stack:
sun.dc.pr.PRError: setPenT4: invalid pen transformation (singular)
at sun.dc.pr.PathStroker.setPenT4(Native Method)
at sun.dc.pr.Rasterizer.setPenT4(Rasterizer.java:232)
at sun.dc.DuctusRenderingEngine.getAATileGenerator(DuctusRenderingEngine.java:409)
at sun.java2d.pipe.AAShapePipe.renderPath(AAShapePipe.java:151)
at sun.java2d.pipe.AAShapePipe.draw(AAShapePipe.java:64)
at sun.java2d.pipe.PixelToParallelogramConverter.draw(PixelToParallelogramConverter.java:148)
at sun.java2d.pipe.ValidatePipe.draw(ValidatePipe.java:154)
at sun.java2d.SunGraphics2D.draw(SunGraphics2D.java:2438)
at android.graphics.Canvas_Delegate$8.draw(Canvas_Delegate.java:727)
at com.android.layoutlib.bridge.impl.GcSnapshot.drawOnGraphics(GcSnapshot.java:680)
at com.android.layoutlib.bridge.impl.GcSnapshot.drawInLayer(GcSnapshot.java:615)
at com.android.layoutlib.bridge.impl.GcSnapshot.draw(GcSnapshot.java:583)
at android.graphics.Canvas_Delegate.draw(Canvas_Delegate.java:951)
at android.graphics.Canvas_Delegate.native_drawPath(Canvas_Delegate.java:707)
at android.graphics.Canvas.native_drawPath(Canvas.java)
at android.graphics.Canvas.drawPath(Canvas.java:1262)
at com.facebook.drawee.drawable.RoundedBitmapDrawable.draw(RoundedBitmapDrawable.java:172)
at com.facebook.drawee.drawable.ForwardingDrawable.draw(ForwardingDrawable.java:140)
at com.facebook.drawee.drawable.ScaleTypeDrawable.draw(ScaleTypeDrawable.java:104)
at com.facebook.drawee.drawable.FadeDrawable.drawDrawableWithAlpha(FadeDrawable.java:306)
at com.facebook.drawee.drawable.FadeDrawable.draw(FadeDrawable.java:293)
at com.facebook.drawee.drawable.ForwardingDrawable.draw(ForwardingDrawable.java:140)
at com.facebook.drawee.generic.GenericDraweeHierarchy$RootDrawable.draw(GenericDraweeHierarchy.java:133)
at android.widget.ImageView.onDraw(ImageView.java:1226)
at android.view.View.draw(View.java:16178)
at android.view.View.draw(View.java:16090)
at android.view.ViewGroup.drawChild_Original(ViewGroup.java:3609)
at android.view.ViewGroup_Delegate.drawChild(ViewGroup_Delegate.java:61)
at android.view.ViewGroup.drawChild(ViewGroup.java:3609)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3399)
at android.view.View.draw(View.java:16181)
at android.view.View.draw(View.java:16090)
at android.view.ViewGroup.drawChild_Original(ViewGroup.java:3609)
at android.view.ViewGroup_Delegate.drawChild(ViewGroup_Delegate.java:61)
at android.view.ViewGroup.drawChild(ViewGroup.java:3609)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3399)
at android.view.View.draw(View.java:16088)
at android.view.ViewGroup.drawChild_Original(ViewGroup.java:3609)
at android.view.ViewGroup_Delegate.drawChild(ViewGroup_Delegate.java:61)
at android.view.ViewGroup.drawChild(ViewGroup.java:3609)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3399)
at android.view.View.draw(View.java:16181)
at com.android.layoutlib.bridge.impl.RenderSessionImpl.render(RenderSessionImpl.java:431)
at com.android.layoutlib.bridge.Bridge.createSession(Bridge.java:428)
at com.android.ide.common.rendering.LayoutLibrary.createSession(LayoutLibrary.java:350)
at com.android.tools.idea.rendering.RenderTask$2.compute(RenderTask.java:510)
at com.android.tools.idea.rendering.RenderTask$2.compute(RenderTask.java:498)
at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:888)
at com.android.tools.idea.rendering.RenderTask.createRenderSession(RenderTask.java:498)
at com.android.tools.idea.rendering.RenderTask.access$600(RenderTask.java:72)
at com.android.tools.idea.rendering.RenderTask$3.call(RenderTask.java:610)
at com.android.tools.idea.rendering.RenderTask$3.call(RenderTask.java:607)
at com.android.tools.idea.rendering.RenderService.runRenderAction(RenderService.java:362)
at com.android.tools.idea.rendering.RenderTask.render(RenderTask.java:607)
at com.android.tools.idea.rendering.RenderTask.render(RenderTask.java:629)
at com.intellij.android.designer.designSurface.AndroidDesignerEditorPanel$6.run(AndroidDesignerEditorPanel.java:480)
at com.intellij.util.ui.update.MergingUpdateQueue.execute(MergingUpdateQueue.java:320)
at com.intellij.util.ui.update.MergingUpdateQueue.execute(MergingUpdateQueue.java:310)
at com.intellij.util.ui.update.MergingUpdateQueue$2.run(MergingUpdateQueue.java:254)
at com.intellij.util.ui.update.MergingUpdateQueue.flush(MergingUpdateQueue.java:269)
at com.intellij.util.ui.update.MergingUpdateQueue.flush(MergingUpdateQueue.java:227)
at com.intellij.util.ui.update.MergingUpdateQueue.run(MergingUpdateQueue.java:217)
at com.intellij.util.concurrency.QueueProcessor.runSafely(QueueProcessor.java:238)
at com.intellij.util.Alarm$Request$1.run(Alarm.java:351)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
but when I remove the attribute roundAsCircle=“true”,it just work fine
Issue Analytics
- State:
- Created 8 years ago
- Reactions:2
- Comments:9 (3 by maintainers)
Top Results From Across the Web
Android Studio does not show layout preview - Stack Overflow
I Don't think the "tab" Preview exists anymore, it does now appear to me here: View > Tool Windows > Preview. Share.
Read more >New features in Android Studio Preview - Android Developers
This page lists the new features introduced in Android Studio preview releases. The preview builds provide early access to the latest features and ......
Read more >Displaying Images with Fresco Library in Android - Section.io
This tutorial takes the reader through the process of loading images with the Fresco library in Android. Fresco is a powerful collection of ......
Read more >Displaying Images with the Fresco Library - CodePath Cliffnotes
Fresco is a powerful library for displaying images in Android, ... Fresco allows you to customize the image loader if you don't want...
Read more >Bug: no preview for customized Preferences [37132984]
Studio Build: Version of Gradle Plugin: Version of Gradle: Version of Java: OS: Android Studio 2.3 Beta 2. Build #AI-162.3616766, built on January...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I got same problem here.
When using
fresco:roundWithOverlayColor="@color/any_color_without_alpha"
preview works.@burnaz it’s working here with any color, even with alpha. But, it’s a workaround for a temporary preview…