// Path: app/src/main/java/com/zhenghuiyan/todaything/bean/ThingMenuItem.java
// public class ThingMenuItem {
//     private FragmentName fragmentName;
// 
//     private int drawableId;
// 
//     private String name;
// 
//     private boolean isSelected;
// 
//     public FragmentName getFragmentName() {
//         return fragmentName;
//     }
// 
//     public void setFragmentName(FragmentName fragmentName) {
//         this.fragmentName = fragmentName;
//     }
// 
//     public boolean isSelected() {
//         return isSelected;
//     }
// 
//     public void setSelected(boolean isSelected) {
//         this.isSelected = isSelected;
//     }
// 
//     public int getDrawableId() {
//         return drawableId;
//     }
// 
//     public void setDrawableId(int drawableId) {
//         this.drawableId = drawableId;
//     }
// 
//     public String getName() {
//         return name;
//     }
// 
//     public void setName(String name) {
//         this.name = name;
//     }
// }
// 
// Path: app/src/main/java/com/zhenghuiyan/todaything/util/MiscUtil.java
// public class MiscUtil {
//     public static Context appContext = null;
// 
//     private MiscUtil() {}
// 
//     public static void setAppContext(Context c) {
//         appContext = c;
//     }
// 
//     public static Context getAppContext() {
//         return appContext;
//     }
// 
//     /**
//      *
//      * */
// 
//      public static void goToActivity(Activity a, Fragment f, Class<?> b, Bundle bundle, boolean isForResult) {
//         Intent intent = new Intent(a, b);
//         if (bundle != null) {
//             intent.putExtras(bundle);
//         }
//         if (isForResult && (f != null)) {
//             f.startActivityForResult(intent, 0);
//         } else if (isForResult && (f == null)) {
//             a.startActivityForResult(intent, 0);
//         } else {
//             a.startActivity(intent);
//         }
//         a.overridePendingTransition(R.anim.zero_scale_one, R.anim.keep_status);
//     }
// }


import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.ImageView;
import android.widget.TextView;
import com.zhenghuiyan.todaything.R;
import com.zhenghuiyan.todaything.bean.ThingMenuItem;
import com.zhenghuiyan.todaything.util.MiscUtil;
import java.util.ArrayList;
import java.util.List;
package com.zhenghuiyan.todaything.adapter;




/**
 * Created by zhenghuiyan on 2015/1/28.
 */
public class MenuListViewAdapter extends BaseAdapter{
    private List<ThingMenuItem> mItems= null;

    public MenuListViewAdapter(List<ThingMenuItem> items) {
        this.mItems = items;
    }

    @Override
    public int getCount() {
        return mItems.size();
    }

    @Override
    public Object getItem(int position) {

        return mItems.get(position);
    }

    @Override
    public long getItemId(int position) {
        return position;
    }

    @Override
    public View getView(int position, View convertView, ViewGroup parent) {
        ViewHolder holder = null;

        if (convertView == null) {
// Path: app/src/main/java/com/zhenghuiyan/todaything/bean/ThingMenuItem.java
// public class ThingMenuItem {
//     private FragmentName fragmentName;
// 
//     private int drawableId;
// 
//     private String name;
// 
//     private boolean isSelected;
// 
//     public FragmentName getFragmentName() {
//         return fragmentName;
//     }
// 
//     public void setFragmentName(FragmentName fragmentName) {
//         this.fragmentName = fragmentName;
//     }
// 
//     public boolean isSelected() {
//         return isSelected;
//     }
// 
//     public void setSelected(boolean isSelected) {
//         this.isSelected = isSelected;
//     }
// 
//     public int getDrawableId() {
//         return drawableId;
//     }
// 
//     public void setDrawableId(int drawableId) {
//         this.drawableId = drawableId;
//     }
// 
//     public String getName() {
//         return name;
//     }
// 
//     public void setName(String name) {
//         this.name = name;
//     }
// }
// 
// Path: app/src/main/java/com/zhenghuiyan/todaything/util/MiscUtil.java
// public class MiscUtil {
//     public static Context appContext = null;
// 
//     private MiscUtil() {}
// 
//     public static void setAppContext(Context c) {
//         appContext = c;
//     }
// 
//     public static Context getAppContext() {
//         return appContext;
//     }
// 
//     /**
//      *
//      * */
// 
//      public static void goToActivity(Activity a, Fragment f, Class<?> b, Bundle bundle, boolean isForResult) {
//         Intent intent = new Intent(a, b);
//         if (bundle != null) {
//             intent.putExtras(bundle);
//         }
//         if (isForResult && (f != null)) {
//             f.startActivityForResult(intent, 0);
//         } else if (isForResult && (f == null)) {
//             a.startActivityForResult(intent, 0);
//         } else {
//             a.startActivity(intent);
//         }
//         a.overridePendingTransition(R.anim.zero_scale_one, R.anim.keep_status);
//     }
// }


// Path: app/src/main/java/com/zhenghuiyan/todaything/adapter/MenuListViewAdapter.java
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.ImageView;
import android.widget.TextView;
import com.zhenghuiyan.todaything.R;
import com.zhenghuiyan.todaything.bean.ThingMenuItem;
import com.zhenghuiyan.todaything.util.MiscUtil;
import java.util.ArrayList;
import java.util.List;

package com.zhenghuiyan.todaything.adapter;




/**
 * Created by zhenghuiyan on 2015/1/28.
 */
public class MenuListViewAdapter extends BaseAdapter{
    private List<ThingMenuItem> mItems= null;

    public MenuListViewAdapter(List<ThingMenuItem> items) {
        this.mItems = items;
    }

    @Override
    public int getCount() {
        return mItems.size();
    }

    @Override
    public Object getItem(int position) {

        return mItems.get(position);
    }

    @Override
    public long getItemId(int position) {
        return position;
    }

    @Override
    public View getView(int position, View convertView, ViewGroup parent) {
        ViewHolder holder = null;

        if (convertView == null) {
            convertView = LayoutInflater.from(MiscUtil.getAppContext()).inflate(R.layout.listview_menu_item, null);