I need to change the background color of the SimpleDraweeView, is there any functions I could use to do this? SetBackgroundColor ignores the circular shape.
<com.facebook.drawee.view.SimpleDraweeView
android:id="#+id/message_status_image"
android:layout_width="#dimen/medium_icon"
android:layout_height="#dimen/medium_icon"
fresco:backgroundImage="#color/grey"
fresco:placeholderImage="#drawable/ic_linked_white"
fresco:roundAsCircle="true" />
Changing background image dynamically is not supported at the moment. What you can do as a workaround is build a DraweeHierarchy programmatically as explained in the documentation, and set a custom Drawable for the background. Keep a reference to that drawable so that you can access it later on.
Instead of a custom drawable, you can simply use the existing RoundedColorDrawable and when you need to change the color you just have to do mBackgroundDrawable.setColor(color).
Related
I have a need. I need to make a window. The glass on the window is transparent. I have found some examples:
https://threejs.org/examples/#webgl_materials_shaders_fresnel
https://threejs.org/examples/#webgl_materials_cubemap_refraction
The background of these examples is static pictures.
My background is dynamic. How can I do it?
Maybe you can use THREE.Refractor like shown in this example. It allows you to create a refractive see-through surface. You might have to adjust the respective shader program in order to achieve your intended visual result (the default shader of THREE.Refractor does not perform any distortions).
Is there way to get the missing image name directly?
Missing Sprite
Go to image inside your project files, click on it and in Inspector you will see Texture type property. Check if it is set to Sprite (2D and UI) since by default when you add image it is set to default and some unity components can't see it.
Good evening,
I'm using Eclipse with the UI-Framework Codename One.
I would like to know how it would be possible to scale an image to fit the width of the screen?
I would like to create a list with one image( or even an imageslider if this is possible), which has the full width of the phone, and under that some text.
Another question is, how can I set an Image via Hastable and Vector from code ? I tried everything but I can't find a solution.
Thank you a lot,
Greetings Patric
It depends on what you are trying to do.
Normally you would just set the image as the background image of the component and select the background behavior as SCALE_TO_FIT which can be done both via the theme designer and via the Style object of the component.
You can also use the ImageViewer class if you want to have a viewable/zoomable image.
You can also just scale the image to the size you want using either the scaled() method or ImageIO.
I would like to make anchor points (handlers like in FabricJS) for change the size, width and height of any element drawn on layers with jCanvas. Is it possible to do that?
Previously, there was no easy way to create a resizable shape in jCanvas. However, I have recently released a jCanvas plugin, called Handles, that will allow you to do just that. You can download and read the documentation for Handles on its plugin page.
I want to set an background to my listview that have different size (depending the appearance of softkeyboard). My list view is in between the editboxes and I want my editboxes always to be visible (means I do not want to use adjustPan).
My problem comes in the moment when the android adjust the size of my listview and the background get tweaked. I want my background to remain the same, just to be cropped.
and I want to look something like this
Is there any style that I can add that will make the image act like this, the point is to do NOT do an resize and to fill the whole available area. And to DO something like a CROP , means to show as much as there is an space and then the rest just to be cropped.
I found some workaround for the problem I want to solve. I set the scaleType with "centerCrop" value and it seems to work fine.
I hope this will save time to someone else having this problem...
Try in your Manifest to add
android:windowSoftInputMode="adjustPan" or "adjustUnspecified"
for your <activity
Read more about values here:
http://developer.android.com/guide/topics/manifest/activity-element.html#wsoft
I would put the listview in a linearlayout and put the background on the linearlayout.
As for the textbox at the top, if you have not figured that out, use relativelayout.
Here is a good link about the view being re-sized by the keyboard:
http://groups.google.com/group/android-developers/browse_thread/thread/be5ffe40c2bc29f0?pli=1
Here is a good link for the button staying on top:
Add Image at above of listview