[Java for Android App Development] DeepakDrs:
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.krishn

package com.example.krishnaupaharaa;

import java.util.ArrayList;

import beanClass.Bfs;

import beanClass.ItemVO;

import android.app.Activity;

import android.content.Context;

import android.content.Intent;

import android.graphics.Typeface;

import android.net.Uri;

import android.os.Bundle;

import android.util.Log;

import android.view.LayoutInflater;

import android.view.View;

import android.view.ViewGroup;

import android.widget.AdapterView;

import android.widget.AdapterView.OnItemClickListener;

import android.widget.ArrayAdapter;

import android.widget.ImageView;

import android.widget.ListView;

import android.widget.TextView;

public class CategoryList extends Activity {

ItemVO details;

Bfs categoryDetails;

ArrayList<ItemVO> itemList;

ArrayAdapter<String> arrayAdapter;

ListView lv;

[MENTION=439709]override[/MENTION]

protected void onCreate(Bundle savedInstanceState) {

super.onCreate(savedInstanceState);

setContentView(R.layout.list_item_name);

itemList = new ArrayList<ItemVO>();

details = (ItemVO) ApplicationCache.getInstance().getValue("categoryDetails");

categoryDetails = (Bfs) ApplicationCache.getInstance().getValue("customerNameDetails");

//Log.d("TestTag", "Website address"+details.getMerchantWebsite());

//itemList = (ArrayList<ItemVO>) ApplicationCache.getInstance().getValue("customerNameDetails");

itemList = categoryDetails.getCategoryNameDetails();

//final LinkedHashMap<String,MFunctionVO> map = details.getMerchantFunctionalities();

lv = (ListView) findViewById(R.id.list1);

//String name = null;

arrayAdapter = new ArrayAdapter<String>(this,R.layout.listview_items,R.id.textView);

//arrayAdapter.add(details.getMerchantName());

//for(String s: map.keySet()){

//	arrayAdapter.add(s);

//}

for (ItemVO mnvo : categoryDetails.getCategoryNameDetails())

{

Log.d("TestTag", "Name of custome care"+mnvo.getCategoryName());

arrayAdapter.add(mnvo.getCategoryName());

}

//lv.setAdapter(arrayAdapter);

lv.setAdapter(new MyAdapter(CategoryList.this,R.id.textView,itemList));

//Log.d("TestTag", "Values in details:" +details.getMerchantName());

//Log.d("TestTag", "Name in MerchantType class"+name);

lv.setOnItemClickListener(new OnItemClickListener() {

[MENTION=439709]override[/MENTION]

public void onItemClick(AdapterView<?> parent, View view, int position,

long id) {

ApplicationCache.getInstance().setValue("merchantSpecificDetails", itemList.get(position));

Intent merchantIntent = new Intent(CategoryList.this,MyCart.class);

startActivity(merchantIntent);

}

});

}

private class MyAdapter extends ArrayAdapter<ItemVO>

{

private Context context;

private ArrayList<ItemVO> list;

public MyAdapter (Context context, int textViewResourceId, ArrayList<ItemVO> list)

{

super(context, textViewResourceId, list);

this.context = context;

this.list = list;

}

[MENTION=439709]override[/MENTION]

public View getView(int position, View convertView, ViewGroup parent) {

// TODO Auto-generated method stub

//return super.getView(position, convertView, parent);

{

LayoutInflater li = (LayoutInflater) getSystemService(context.LAYOUT_INFLATER_SERVICE);

convertView = li.inflate(R.layout.listview_items,null);

ImageView image=(ImageView) convertView.findViewById(R.id.imageView);

TextView itemName = (TextView) convertView.findViewById(R.id.textView);

String uri = "C:/Users/Deepak/workspace/KrishnaUpaharaa/res/drawable-hdpi" + list.get(position).getItemphoto();

Uri imguri = Uri.parse(uri);

Log.d("TestTag", "Inside getView"+list.get(position).getItemdescription());

image.setImageURI(imguri);

itemName.setText(list.get(position).getItemdescription());

return convertView;

}

}

}

}