I want to create an image out of some text. For example, in this photo I have shown here, I want to make it so that I have an image or some sort of text view that shows a plus sign and then I would programmatically set the number in my code in that image. Here is an example:
As you can see here. I woudl want the exact behavior: to set the +16
as an image or some sort of text view I can programmatically set. I some XML here so that I can create an image based on a URI I pass in here:
<com.facebook.drawee.view.SimpleDraweeView
android:id="@+id/commenter_photo_four"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_alignParentBottom="true"
android:layout_marginRight="60dp"
android:layout_marginEnd="60dp"
android:layout_toLeftOf="@id/num_comments"
android:layout_toStartOf="@id/num_comments"
fresco:placeholderImage="@mipmap/blank_prof_pic"
fresco:placeholderImageScaleType="centerCrop"
fresco:roundBottomLeft="false"
fresco:roundBottomRight="false"
fresco:roundedCornerRadius="5dp"
fresco:roundingBorderColor="@color/material_color_grey_100"
android:layout_marginBottom="8dp"
/>
which displays the photo correctly for me. However, I can't seem to be able to insert something like android:text
or do some sort of setText
method when using the Fresco
library (library I use to render my images based on a URI). Then I tried using an ImageView
like so:
<ImageView
android:id="@+id/commenter_photo_four"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_alignParentBottom="true"
android:layout_marginRight="60dp"
android:layout_marginEnd="60dp"
android:layout_toLeftOf="@id/num_comments"
android:layout_toStartOf="@id/num_comments"
/>
but then I realize that this also doesn't have an android:text
capability I can use to set the image to being a + followed by any number I would want to set. Is there any way I can accomplish this +16
? I am also thinking I can try a TextView
with a circular background possibly?