@@ -0,0 +1,3569 @@
+package com.example.qyu4.theallswap.View;%0A%0Aimport android.app.ListActivity;%0Aimport android.content.Intent;%0Aimport android.support.v7.app.ActionBarActivity;%0Aimport android.os.Bundle;%0Aimport android.view.Menu;%0Aimport android.view.MenuItem;%0Aimport android.view.View;%0Aimport android.widget.AdapterView;%0Aimport android.widget.ArrayAdapter;%0Aimport android.widget.ListView;%0A%0Aimport com.example.qyu4.theallswap.Controller.UserController;%0Aimport com.example.qyu4.theallswap.Model.User;%0Aimport com.example.qyu4.theallswap.R;%0A%0Aimport java.util.ArrayList;%0A%0Apublic class UserInventoryWithImage extends ListActivity %7B%0A%0A    private UserInventoryWithImage activity = this;%0A    private UserController uc = new UserController();%0A    private ArrayList%3CUser%3E userList= new ArrayList%3CUser%3E();%0A    private static final String FILENAME = %22userProfile.txt%22;%0A    private ArrayAdapter%3CUser%3E adapter;%0A    private ListView itemList;%0A    private ArrayList resultList = new ArrayList%3C%3E();%0A%0A    private String%5B%5D itemname = %7B%0A            %22111%22,%0A            %22222%22,%0A            %22333%22%0A    %7D;%0A%0A    @Override%0A    protected void onCreate(Bundle savedInstanceState) %7B%0A        super.onCreate(savedInstanceState);%0A        setContentView(R.layout.activity_user_inventory_with_image);%0A    %7D%0A%0A    @Override%0A    protected void onStart() %7B%0A        // TODO Auto-generated method stub%0A        super.onStart();%0A        userList = uc.loadUserFromFile(activity, FILENAME, userList);%0A        User currentUser = userList.get(0);%0A        /***************************************************%0A         TODO: add loading friends list method.%0A         *************************************************/%0A        resultList = uc.convertItemToString(currentUser, resultList);%0A        /***************************************************%0A         TODO: add loading friends list method.%0A         *************************************************/%0A%0A        this.setListAdapter(new ArrayAdapter%3CString%3E(this, R.layout.list_item_image,%0A                R.id.itemName, resultList));%0A    %7D%0A%0A    @Override%0A    public boolean onCreateOptionsMenu(Menu menu) %7B%0A        // Inflate the menu; this adds items to the action bar if it is present.%0A        getMenuInflater().inflate(R.menu.menu_user_inventory_with_image, menu);%0A        return true;%0A    %7D%0A%0A    @Override%0A    public boolean onOptionsItemSelected(MenuItem item) %7B%0A        // Handle action bar item clicks here. The action bar will%0A        // automatically handle clicks on the Home/Up button, so long%0A        // as you specify a parent activity in AndroidManifest.xml.%0A        int id = item.getItemId();%0A%0A        //noinspection SimplifiableIfStatement%0A        if (id == R.id.action_settings) %7B%0A            return true;%0A        %7D%0A%0A        return super.onOptionsItemSelected(item);%0A    %7D%0A%0A    public void userAddItemToInventory(MenuItem menu)%7B%0A        uc.classIntent(AddInventoryItem.class, activity);%0A    %7D%0A    public void userMyTradeSelected(MenuItem menu)%7B%0A%0A        uc.classIntent(UserTrade.class, activity);%0A    %7D%0A    public void userMyFriendsSelected(MenuItem menu)%7B%0A        uc.classIntent(UserFriends.class, activity);%0A    %7D%0A    public void userMyProfileSelected(MenuItem menu)%7B%0A        uc.classIntent(UserProfile.class, activity);%0A    %7D%0A    public void userSearchSelected(MenuItem menu)%7B%0A        uc.classIntent(Search.class, activity);%0A    %7D%0A    public void userPreviousBrowseSelected(MenuItem menu)%7B%0A        uc.classIntent(PreviousBrowsedTrade.class, activity);%0A    %7D%0A    public void userLogoutSelected(MenuItem menu)%7B%0A        uc.classIntent(UserLogin.class, activity);%0A    %7D%0A%7D%0A

Update on UverInventoryWithImage