// Path: MonsterHunter3UDatabase/src/com/daviancorp/android/ui/detail/ItemDetailActivity.java
// public class ItemDetailActivity extends GenericTabActivity implements
// 		ActionBar.TabListener {
// 	/** A key for passing a item ID as a long */
// 	public static final String EXTRA_ITEM_ID =
// 			"com.daviancorp.android.android.ui.detail.item_id";
// 
// 	private ViewPager viewPager;
// 	private ItemDetailPagerAdapter mAdapter;
// 	private ActionBar actionBar;
// 
// 	// Tab titles
// 	private String[] tabs = { "Detail", "Usage", "Monster", "Quest", "Location", "Arena"};
// 
// 	@Override
// 	public void onCreate(Bundle savedInstanceState) {
// 		super.onCreate(savedInstanceState);
// 		
// 		long id = getIntent().getLongExtra(EXTRA_ITEM_ID, -1);
// 		setTitle(DataManager.get(getApplicationContext()).getItem(id).getName());
// 
// 		// Initialization
// 		viewPager = (ViewPager) findViewById(R.id.pager);
// 		mAdapter = new ItemDetailPagerAdapter(getSupportFragmentManager(), id);
// 		viewPager.setAdapter(mAdapter);
// 
// 		actionBar = getSupportActionBar();
// 		actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);
// 
// 		// Adding Tabs
// 		for (String tab_name : tabs) {
// 			actionBar.addTab(actionBar.newTab().setText(tab_name)
// 					.setTabListener(this));
// 		}
// 
// 		/**
// 		 * on swiping the viewpager make respective tab selected
// 		 * */
// 		viewPager.setOnPageChangeListener(new ViewPager.OnPageChangeListener() {
// 
// 			@Override
// 			public void onPageSelected(int position) {
// 				// on changing the page
// 				// make respected tab selected
// 				actionBar.setSelectedNavigationItem(position);
// 			}
// 
// 			@Override
// 			public void onPageScrolled(int arg0, float arg1, int arg2) {
// 			}
// 
// 			@Override
// 			public void onPageScrollStateChanged(int arg0) {
// 			}
// 		});
// 	}
// 
// 	@Override
// 	public boolean onCreateOptionsMenu(Menu menu) {
// 		super.onCreateOptionsMenu(menu);
// //		MenuInflater inflater = getMenuInflater();
// //		inflater.inflate(R.menu.main, menu);
// 		return true;
// 	}
// 
// 	@Override
// 	public void onPause() {
// 		super.onPause();
// 	}
// 
// 	@Override
// 	public void onTabReselected(Tab tab, FragmentTransaction ft) {
// 		// TODO Auto-generated method stub
// 
// 	}
// 
// 	@Override
// 	public void onTabSelected(Tab tab, FragmentTransaction ft) {
// 		// on tab selected
// 		// show respected fragment view
// 		viewPager.setCurrentItem(tab.getPosition());
// 
// 	}
// 
// 	@Override
// 	public void onTabUnselected(Tab tab, FragmentTransaction ft) {
// 		// TODO Auto-generated method stub
// 
// 	}
// 
// }


import java.io.IOException;
import android.content.Context;
import android.content.Intent;
import android.database.Cursor;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.support.v4.app.ListFragment;
import android.support.v4.app.LoaderManager.LoaderCallbacks;
import android.support.v4.content.Loader;
import android.support.v4.widget.CursorAdapter;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.ListView;
import android.widget.TextView;
import com.daviancorp.android.data.classes.HuntingFleet;
import com.daviancorp.android.data.database.HuntingFleetCursor;
import com.daviancorp.android.loader.HuntingFleetListCursorLoader;
import com.daviancorp.android.mh3udatabase.R;
import com.daviancorp.android.ui.detail.ItemDetailActivity;
		String mType = null;
		String mLocation = null;
		if (args != null) {
			mType = args.getString(ARG_TYPE);
			mLocation = args.getString(ARG_LOCATION);
		}

		return new HuntingFleetListCursorLoader(getActivity(), mType, mLocation);
	}

	@Override
	public void onLoadFinished(Loader<Cursor> loader, Cursor cursor) {
		// Create an adapter to point at this cursor
		HuntingFleetListCursorAdapter adapter = new HuntingFleetListCursorAdapter(
				getActivity(), (HuntingFleetCursor) cursor);
		setListAdapter(adapter);

	}

	@Override
	public void onLoaderReset(Loader<Cursor> loader) {
		// Stop using the cursor (via the adapter)
		setListAdapter(null);
	}
	
	@Override
	public void onListItemClick(ListView l, View v, int position, long id) {
		// The id argument will be the Monster ID; CursorAdapter gives us this
		// for free
		Intent i = new Intent(getActivity(), ItemDetailActivity.class);
// Path: MonsterHunter3UDatabase/src/com/daviancorp/android/ui/detail/ItemDetailActivity.java
// public class ItemDetailActivity extends GenericTabActivity implements
// 		ActionBar.TabListener {
// 	/** A key for passing a item ID as a long */
// 	public static final String EXTRA_ITEM_ID =
// 			"com.daviancorp.android.android.ui.detail.item_id";
// 
// 	private ViewPager viewPager;
// 	private ItemDetailPagerAdapter mAdapter;
// 	private ActionBar actionBar;
// 
// 	// Tab titles
// 	private String[] tabs = { "Detail", "Usage", "Monster", "Quest", "Location", "Arena"};
// 
// 	@Override
// 	public void onCreate(Bundle savedInstanceState) {
// 		super.onCreate(savedInstanceState);
// 		
// 		long id = getIntent().getLongExtra(EXTRA_ITEM_ID, -1);
// 		setTitle(DataManager.get(getApplicationContext()).getItem(id).getName());
// 
// 		// Initialization
// 		viewPager = (ViewPager) findViewById(R.id.pager);
// 		mAdapter = new ItemDetailPagerAdapter(getSupportFragmentManager(), id);
// 		viewPager.setAdapter(mAdapter);
// 
// 		actionBar = getSupportActionBar();
// 		actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);
// 
// 		// Adding Tabs
// 		for (String tab_name : tabs) {
// 			actionBar.addTab(actionBar.newTab().setText(tab_name)
// 					.setTabListener(this));
// 		}
// 
// 		/**
// 		 * on swiping the viewpager make respective tab selected
// 		 * */
// 		viewPager.setOnPageChangeListener(new ViewPager.OnPageChangeListener() {
// 
// 			@Override
// 			public void onPageSelected(int position) {
// 				// on changing the page
// 				// make respected tab selected
// 				actionBar.setSelectedNavigationItem(position);
// 			}
// 
// 			@Override
// 			public void onPageScrolled(int arg0, float arg1, int arg2) {
// 			}
// 
// 			@Override
// 			public void onPageScrollStateChanged(int arg0) {
// 			}
// 		});
// 	}
// 
// 	@Override
// 	public boolean onCreateOptionsMenu(Menu menu) {
// 		super.onCreateOptionsMenu(menu);
// //		MenuInflater inflater = getMenuInflater();
// //		inflater.inflate(R.menu.main, menu);
// 		return true;
// 	}
// 
// 	@Override
// 	public void onPause() {
// 		super.onPause();
// 	}
// 
// 	@Override
// 	public void onTabReselected(Tab tab, FragmentTransaction ft) {
// 		// TODO Auto-generated method stub
// 
// 	}
// 
// 	@Override
// 	public void onTabSelected(Tab tab, FragmentTransaction ft) {
// 		// on tab selected
// 		// show respected fragment view
// 		viewPager.setCurrentItem(tab.getPosition());
// 
// 	}
// 
// 	@Override
// 	public void onTabUnselected(Tab tab, FragmentTransaction ft) {
// 		// TODO Auto-generated method stub
// 
// 	}
// 
// }


// Path: MonsterHunter3UDatabase/src/com/daviancorp/android/ui/list/HuntingFleetListFragment.java
import java.io.IOException;
import android.content.Context;
import android.content.Intent;
import android.database.Cursor;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.support.v4.app.ListFragment;
import android.support.v4.app.LoaderManager.LoaderCallbacks;
import android.support.v4.content.Loader;
import android.support.v4.widget.CursorAdapter;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.ListView;
import android.widget.TextView;
import com.daviancorp.android.data.classes.HuntingFleet;
import com.daviancorp.android.data.database.HuntingFleetCursor;
import com.daviancorp.android.loader.HuntingFleetListCursorLoader;
import com.daviancorp.android.mh3udatabase.R;
import com.daviancorp.android.ui.detail.ItemDetailActivity;

		String mType = null;
		String mLocation = null;
		if (args != null) {
			mType = args.getString(ARG_TYPE);
			mLocation = args.getString(ARG_LOCATION);
		}

		return new HuntingFleetListCursorLoader(getActivity(), mType, mLocation);
	}

	@Override
	public void onLoadFinished(Loader<Cursor> loader, Cursor cursor) {
		// Create an adapter to point at this cursor
		HuntingFleetListCursorAdapter adapter = new HuntingFleetListCursorAdapter(
				getActivity(), (HuntingFleetCursor) cursor);
		setListAdapter(adapter);

	}

	@Override
	public void onLoaderReset(Loader<Cursor> loader) {
		// Stop using the cursor (via the adapter)
		setListAdapter(null);
	}
	
	@Override
	public void onListItemClick(ListView l, View v, int position, long id) {
		// The id argument will be the Monster ID; CursorAdapter gives us this
		// for free
		Intent i = new Intent(getActivity(), ItemDetailActivity.class);
		i.putExtra(ItemDetailActivity.EXTRA_ITEM_ID, (long) v.getTag());