Reputation: 15472
I have this android layout xml:
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="#70a5b3"
android:layout_above="@+id/skipIcon"/>
<com.m.view.text.MyTextView
style="@style/textOnBg"
android:layout_toLeftOf="@+id/skipIcon"
android:text="Skip"
android:textStyle="normal" />
<ImageView
android:id="@id/skipIcon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:src="@drawable/signup_skip_icon" />
</RelativeLayout>
and I want to create this layout
but my xml doesn't show the border line. How can I fix this?
Upvotes: 1
Views: 694
Reputation: 159
Try this:
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<View
android:id="@+id/line"
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="#70a5b3"/>
<ImageView
android:id="@+id/skipIcon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_below="@id/line"
android:src="@drawable/signup_skip_icon" />
<com.waze.view.text.WazeTextView
style="@style/textOnBg"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/line"
android:layout_toLeftOf="@id/skipIcon"
android:text="Skip"
android:textStyle="normal"/>
</RelativeLayout>
Upvotes: 0
Reputation: 2325
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<View
android:id="@+id/border_line"
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_alignParentTop="true"
android:background="#70a5b3" />
<com.m.view.text.MyTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toLeftOf="@+id/skipIcon"
android:text="Skip"
android:textStyle="normal" />
<ImageView
android:id="@id/skipIcon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:layout_below="@+id/border_line"
android:src="@drawable/signup_skip_icon" />
</RelativeLayout>
Upvotes: 2