Widget layout is not working [closed]

1

I wonder why this layout does not appear in my widget:

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/background"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context=".Main" >

<RelativeLayout
    android:orientation="vertical"
    android:id="@+id/Seg"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:layout_marginBottom="5dp"
    android:background="@drawable/shape_layout" >

    <View
        android:id="@+id/view1"
        android:layout_width="fill_parent"
        android:layout_height="50dp"
        android:background="@color/vermelho" />

    <ImageView
        android:id="@+id/imageView1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignBottom="@+id/view1"
        android:layout_alignParentLeft="true"
        android:layout_alignParentTop="true"
        android:layout_marginLeft="3dp"
        android:contentDescription="@string/todo"
        android:src="@drawable/data" />

    <ImageButton
        android:id="@+id/SaveSeg"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignBottom="@+id/view1"
        android:layout_alignParentRight="true"
        android:layout_alignParentTop="true"
        android:layout_marginRight="5dp"
        android:background="@null"
        android:contentDescription="@string/todo"
        android:src="@drawable/edit_button" />

    <TextView
        android:id="@+id/SegView"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignBottom="@+id/view1"
        android:layout_centerHorizontal="true"
        android:text="@string/seg"
        android:textAppearance="?android:attr/textAppearanceLarge"
        android:textColor="@color/branco"
        android:textSize="28sp" />

    <TextView
        android:id="@+id/Data1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignBottom="@+id/view1"
        android:layout_alignLeft="@+id/imageView1"
        android:layout_marginBottom="4dp"
        android:layout_marginLeft="10dp"
        android:textAppearance="?android:attr/textAppearanceLarge"
        android:textColor="@color/preto" />

    <TextView
        android:id="@+id/MainS1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_below="@+id/view1"
        android:layout_centerHorizontal="true"
        android:textAppearance="?android:attr/textAppearanceMedium"
        android:textColor="@color/branco"
        android:textSize="25sp" />

    <TextView
        android:id="@+id/MainS2"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_below="@+id/MainS1"
        android:layout_centerHorizontal="true"
        android:textAppearance="?android:attr/textAppearanceMedium"
        android:textColor="@color/branco"
        android:textSize="25sp" />

    <TextView
        android:id="@+id/MainS3"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_below="@+id/MainS2"
        android:layout_centerHorizontal="true"
        android:textAppearance="?android:attr/textAppearanceMedium"
        android:textColor="@color/branco"
        android:textSize="25sp" />

    <TextView
        android:id="@+id/MainS4"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_below="@+id/MainS3"
        android:layout_centerHorizontal="true"
        android:textAppearance="?android:attr/textAppearanceMedium"
        android:textColor="@color/branco"
        android:textSize="25sp" />

    <TextView
        android:id="@+id/MainS5"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_below="@+id/MainS4"
        android:layout_centerHorizontal="true"
        android:textAppearance="?android:attr/textAppearanceMedium"
        android:textColor="@color/branco"
        android:textSize="25sp" />

    <TextView
        android:id="@+id/MainS6"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_below="@+id/MainS5"
        android:layout_centerHorizontal="true"
        android:textAppearance="?android:attr/textAppearanceMedium"
        android:textColor="@color/branco"
        android:textSize="25sp" />

    <TextView
        android:id="@+id/MainS7"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_below="@+id/MainS6"
        android:layout_centerHorizontal="true"
        android:textAppearance="?android:attr/textAppearanceMedium"
        android:textColor="@color/branco"
        android:textSize="25sp" />

    <TextView
        android:id="@+id/SegHorario1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignBottom="@+id/MainS1"
        android:layout_alignRight="@+id/SaveSeg"
        android:background="@drawable/shape_edit"
        android:textColor="@color/cinza"
        android:textSize="20sp"
        android:textStyle="italic" />

    <TextView
        android:id="@+id/SegHorario2"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignBottom="@+id/MainS2"
        android:layout_alignRight="@+id/SaveSeg"
        android:background="@drawable/shape_edit"
        android:textColor="@color/cinza"
        android:textSize="20sp"
        android:textStyle="italic" />

    <TextView
        android:id="@+id/SegHorario3"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignBottom="@+id/MainS3"
        android:layout_alignRight="@+id/SaveSeg"
        android:background="@drawable/shape_edit"
        android:textColor="@color/cinza"
        android:textSize="20sp"
        android:textStyle="italic" />

    <TextView
        android:id="@+id/SegHorario4"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignBottom="@+id/MainS4"
        android:layout_alignRight="@+id/SaveSeg"
        android:background="@drawable/shape_edit"
        android:textColor="@color/cinza"
        android:textSize="20sp"
        android:textStyle="italic" />

    <TextView
        android:id="@+id/SegHorario5"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignBottom="@+id/MainS5"
        android:layout_alignRight="@+id/SaveSeg"
        android:background="@drawable/shape_edit"
        android:textColor="@color/cinza"
        android:textSize="20sp"
        android:textStyle="italic" />

    <TextView
        android:id="@+id/SegHorario6"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignBottom="@+id/MainS6"
        android:layout_alignRight="@+id/SaveSeg"
        android:background="@drawable/shape_edit"
        android:textColor="@color/cinza"
        android:textSize="20sp"
        android:textStyle="italic" />

    <TextView
        android:id="@+id/SegHorario7"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignBottom="@+id/MainS7"
        android:layout_alignRight="@+id/SaveSeg"
        android:background="@drawable/shape_edit"
        android:textColor="@color/cinza"
        android:textSize="20sp"
        android:textStyle="italic" />
  </RelativeLayout>    
</LinearLayout>
    
asked by anonymous 20.02.2014 / 00:57

1 answer

1

Try to remove your% of id "@ + id / view1" because as we can see here the class view is not listed among those of type RemoteViews and not soon is supported by widgets apps.

    
24.02.2014 / 20:21