Android-Suchleiste mit Daumen ausrichten
Ich versuche, die Suchleiste am oberen Rand einer Ansicht auszurichten, kann sie jedoch nicht mit dem Daumen zentrieren. Gibt es eine Art "alignCenter" für die untergeordneten Elemente von RelativeLayout?
Hier ist ein Beispiel meines XML-Codes:
<RelativeLayout
android:id="@+id/rl_fragment_audio_player"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:background="@color/black_transparent"
android:padding="5dp"
android:visibility="gone" >
<TextView
android:id="@+id/tv_fragment_audio_begin"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_centerVertical="true"
android:textColor="@color/white" />
<TextView
android:id="@+id/tv_fragment_audio_end"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:textColor="@color/white" />
<Button
android:id="@+id/btn_fragment_audio_play"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_centerInParent="true"
android:background="@drawable/btn_play"
android:visibility="gone" />
</RelativeLayout>
<SeekBar
android:id="@+id/sb_fragment_audio"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:visibility="gone"
android:layout_above="@id/rl_fragment_audio_player" />
Zum Beispiel macht es Google Play Music.