How can insert a TextView within an image like the one in the photo. enter image description here
Asked
Active
Viewed 63 times
-7
-
That's not even a programming but a (quite simple) math/statistics problem. – too honest for this site Aug 28 '18 at 14:17
-
You mean the sum of all ratings divided by number of ratings? – jle Aug 28 '18 at 14:27
-
Yes @jle . Exactly that. – Blend Berisha Aug 28 '18 at 14:41
-
You have to edit your question, it is pretty unclear. In the question you only ask for a mathematical solution. That's what I commented above. If you have issues programming it you need to specify it, otherwise we don't understand it, since we're out of context – jle Aug 28 '18 at 14:46
1 Answers
0
You could try FrameLayout defined like this:
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@android:color/white"
android:orientation="vertical">
<ImageView
android:layout_width="wrap_content"
android:layout_height="200dp"
android:contentDescription="@string/some_pic_desc"
android:src="@drawable/some_pic" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="15dp"
android:layout_marginTop="175dp"
android:background="@color/wallet_link_text_light"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:text="TOP STORIES"
android:textColor="@android:color/white"
android:textSize="30dp" />
</FrameLayout>
Where resources should be defined. I have ommited the bottom menu and rounded corners since the question was not about this but you may try read

Kamil Leis
- 119
- 7