I am trying to create a widget that displays items parsed form an XML file file. In the end, an image, a title, and URL of the original item are going to be displayed. But, now that I am working on the layout, I am getting a runtime error after adding the ImageView to its container. The <RelativeLayout android:id="@+id/newsdviewlayout" is inside the root View (which is a RelativeLayout) for the main layout. Help please.
<RelativeLayout
android:id="@+id/newsdviewlayout"
style="@style/newsviewstyle"
android:layout_alignParentBottom="true">
<ImageView
android:id="@+id/newsviewimg" />
</RelativeLayout>
Yeah, I think you miss the required attribute
android:layout_width=""andandroid:layout_height="", so for your case, the xml will be like this:Or as for the
RelativeLayoutyou can also put that 2 attribute inside yournewsviewstylestyle.