Hello stackoverflow members. i am trying to achieve this:http://ift.tt/1FUQKyS
But for some reason the two texts cant take these positions like this http://ift.tt/1Q19J2Y Could anyone explain what i am doing wrong? and please forgive my artistic talents.
i have added the whole xml file.
The idea is that the two textviews timer and typegekookt are displayed in the center of backgroundtypegekookt evenly spaced out.
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://ift.tt/nIICcg"
android:layout_width="fill_parent"
android:orientation="vertical"
android:id="@+id/eggContainer"
android:layout_height="wrap_content"
android:padding="15dp">
<ImageView android:id="@+id/eggtimerimage"
android:src="@drawable/eiwit"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:gravity="center_vertical"
/>
<ImageView android:id="@+id/backgroundtypegekookt"
android:src="@drawable/timerwijzer"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerInParent="true"
/>
<TextView
android:id="@+id/typegekookt"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="zacht"
android:textSize="20sp"
android:textStyle="bold"
android:textColor="@android:color/black"
android:layout_alignTop="@+id/divider2"
android:layout_centerHorizontal="true"/>
<TextView
android:id="@+id/timer"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="10:00"
android:textSize="22sp"
android:textStyle="bold"
android:textColor="@android:color/black"
android:layout_centerHorizontal="true"
android:layout_alignBottom="@+id/divider2"
/>
<TextView
style="?android:listSeparatorTextViewStyle"
android:id="@+id/divider1"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignBottom="@+id/eggtimerimage"
android:layout_marginBottom="-30dp"
/>
<TextView
style="?android:listSeparatorTextViewStyle"
android:id="@+id/divider2"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_alignLeft="@+id/backgroundtypegekookt"
android:layout_alignStart="@+id/backgroundtypegekookt"
android:layout_alignRight="@+id/backgroundtypegekookt"
android:layout_alignEnd="@+id/backgroundtypegekookt" />
</RelativeLayout>
No comments:
Post a Comment