Reputation: 352
I am trying to add a horizontal line bellow all of my TextViews in android app WIDGET xml but I have an issue and for some reason this doesn't work.
Edit: here is my full xml of the widget that i use in my application
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content" >
<LinearLayout
android:id="@+id/liner"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:orientation="vertical" >
<TextView
android:id="@+id/da"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<TextView
android:id="@+id/sv"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<View
android:layout_width="fill_parent"
android:layout_height="2dip"
android:background="#B3B2B0"
android:padding="10dp" />
<TextView
android:id="@+id/ti"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
Upvotes: 2
Views: 1823
Reputation: 5375
Your problem is that Widgets does not support Views as you can see here. In your case, you could replace that View by a LinearLayout like this:
<LinearLayout
android:id="@+id/widget_horizontal_white_bar"
android:layout_width="fill_parent"
android:layout_height="3dip"
android:layout_marginLeft="20dp"
android:layout_marginRight="20dp"
android:layout_marginTop="6dp"
android:background="#FFFFFF"
android:orientation="horizontal" >
</LinearLayout>
Upvotes: 6