[Design, Prototyping, UI, Graphics] slashblog:
I have a certain App that was using different layouts for different activities, but much of the xml content was same. So I moved the content to a common xml and included that in the different layouts.

This is the common layout xml:

<LinearLayout xmlns:android="http;//schemas.android.com/apk/res/android"
xmlns:app="http;//schemas.android.com/apk/res-auto"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
android:background="@color/background_color">

<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="0dp"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:orientation="horizontal" >

<ImageView
android:id="@+id/img_newslist"
android:layout_width="35dp"
android:layout_height="35dp"
android:scaleType="centerCrop"
android:layout_margin="0dp"
android:layout_gravity="center_vertical" />

<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="5dp"
android:orientation="vertical"
android:gravity="center_vertical">

<TextView
android:id="@+id/txt_newslistheading"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:maxLines="2"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="@color/text_color"
android:textSize="14sp"
android:text="Heading"/>

<TextView
android:id="@+id/txt_newslistdate"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:textColor="@color/text_color"
android:text="Date"
android:visibility="invisible"/>

</LinearLayout>

</LinearLayout>

</LinearLayout>

This is the layout xml that includes the above xml:

<include
android:layout="@layout/lsv_item_list"
android:id="@+id/lsv_item_recent"
xmlns:android="http;//schemas.android.com/apk/res/android"
xmlns:app="http;//schemas.android.com/apk/res-auto"/>

With these changes the app is failing at run time with the following error:

Previously the app was working fine. Can somebody help me understand what I am doing wrong? The relevant code that is failing is as follows:

public View getView(final int position, View convertView, ViewGroup parent) {
View view = convertView;
ViewHolder holder;
if (view == null) {
LayoutInflater inflater = (LayoutInflater) activity
.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
view = inflater.inflate(row, null);

holder = new ViewHolder();
view.setTag(holder);
} else {
holder = (ViewHolder) view.getTag();
}

if ((itemsLatest == null) || ((position + 1) > itemsLatest.size()))
return view;

if (position % 2 == 1) {
view.setBackgroundColor(row2Color);
} else {
view.setBackgroundColor(row1Color);
}

objLatestBean = itemsLatest.get(position);

holder.txt_newsheadinglatest=(TextView)view.findViewById(R.id.txt_newslistheading);
holder.txt_newsdatelatest=(TextView)view.findViewById(R.id.txt_newslistdate);
holder.img_newslatest=(ImageView)view.findViewById(R.id.img_newslist);

holder.txt_newsheadinglatest.setText(objLatestBean.getNewsHeading().toString());
holder.txt_newsdatelatest.setText(objLatestBean.getNewsDate().toString());

imageLoader.DisplayImage(Constant.getServerImageThumbs () + objLatestBean.getNewsImage().toString(), holder.img_newslatest);

return view;

}

PS: I have changed : to ; in the URL above. That is not an error.