Here is an XML layout that you can use as a starting point in Android Studio. This layout follows the Material Design guidelines and uses ConstraintLayout to properly position the elements on the screen. For the rating bar, I used the MaterialRatingBar library.
Please make sure to add the MaterialRatingBar library to your project's dependencies in the build.gradle file since it's not part of the standard Android SDK.
implementation 'com.github.zhanghai.android.materialratingbar:library:1.4.0'
Now, you can use this XML code for your app's UI:
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="16dp">
<ImageView
android:id="@+id/imageView"
android:layout_width="match_parent"
android:layout_height="0dp"
android:contentDescription="@string/image_description"
app:layout_constraintBottom_toTopOf="@+id/guideline"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:srcCompat="@tools:sample/avatars" />
<TextView
android:id="@+id/textView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/sample_text"
app:layout_constraintEnd_toEndOf="@+id/imageView"
app:layout_constraintStart_toStartOf="@+id/imageView"
app:layout_constraintTop_toTopOf="@+id/imageView"
app:layout_constraintBottom_toBottomOf="@+id/imageView" />
<androidx.constraintlayout.widget.Guideline
android:id="@+id/guideline"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
app:layout_constraintGuide_percent="0.7" />
<TextView
android:id="@+id/rateTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/rating_prompt"
android:layout_marginTop="8dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/guideline" />
<com.zhanghai.android.materialratingbar.MaterialRatingBar
android:id="@+id/ratingBar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:numStars="5"
android:stepSize="1.0"
app:mrbi_isIndicator="false"
app:layout_constraintStart_toStartOf="@+id/rateTextView"
app:layout_constraintTop_toBottomOf="@+id/rateTextView"
app:mrbi_drawableSize="48dp"
app:mrbi_useCompatPadding="true" />
</androidx.constraintlayout.widget.ConstraintLayout>
Be sure to add the appropriate strings to your strings.xml file for the @string/ resources used in the XML.