Meine Idee ist es, Ihre schwarze Layout-Kopie untereinander zu verwenden und ein neues Layout von oben schwarz nach unten schwarz zu erstellen. Und stellen Sie Ihr Bild in die Mitte dieses Layouts.
Zum Beispiel:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<View
android:id="@+id/black_top"
android:layout_width="match_parent"
android:layout_height="150dp"
android:background="@color/black" />
<View
android:id="@+id/black_top_invisible_copy"
android:layout_width="match_parent"
android:layout_height="150dp"
android:layout_below="@id/black_top"
android:visibility="invisible" />
<View
android:id="@+id/yellow_bot"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@id/black_top"
android:background="@color/black" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignBottom="@id/black_top_invisible_copy"
android:layout_alignTop="@id/black_top"
android:gravity="center">
<ImageView
android:layout_width="50dp"
android:layout_height="50dp"
android:src="@drawable/circle" />
</LinearLayout>
</RelativeLayout>
Was haben Sie bisher versucht? Zeigen Sie uns den Code Ihres XML-Layouts – ProblemSlover
Ich denke, es in Java-Code zu verwalten .. zur Laufzeit werde ich die Höhe des Schwarz-Layouts und dann das grüne Bild zur Laufzeit positionieren. es in xml zu verwalten ist nicht möglich. – user3586231
Was ist das für eine grüne Kreisansicht? – Mohit