<repo_name>zhouwei199388/CircleMenu<file_sep>/app/src/main/java/zw/com/circlemenu/MainActivity.java
package zw.com.circlemenu;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.Toast;

/**
 * Created by Admin on 2016/9/6.
 */
public class MainActivity extends Activity {

//    private String[] mItemTexts = new String[]{"安全中心 ", "特色服务", "投资理财",
//            "转账汇款", "我的账户"};


    private int[] mItemImgs = new int[]{R.drawable.home_mbank_1_normal,
            R.drawable.home_mbank_2_normal, R.drawable.home_mbank_3_normal,
            R.drawable.home_mbank_4_normal, R.drawable.home_mbank_5_normal, R.drawable
            .home_mbank_2_normal, R.drawable.home_mbank_3_normal,
            R.drawable.home_mbank_4_normal, R.drawable.home_mbank_5_normal};


    private zw.com.circlemenu.view.CircleMenuLayout mCircleMenu;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        mCircleMenu = (zw.com.circlemenu.view.CircleMenuLayout) findViewById(R.id.menu_layout);
//        mCircleMenu.setMenuItemIconsAndTexts(mItemImgs, mItemTexts);
        mCircleMenu.setMenuItemLayoutId(R.layout.item_cirle_menu);
        mCircleMenu.setMenuItemIconsAndTexts(mItemImgs);

        mCircleMenu.setOnMenuItemClickListener(new zw.com.circlemenu.view.CircleMenuLayout
                .OnMenuItemClickListener() {


            @Override
            public void itemClick(View view, int pos) {
//                Toast.makeText(MainActivity.this, mItemTexts[pos], Toast.LENGTH_SHORT).show();
            }

            @Override
            public void itemCenterClick(View view) {
                Toast.makeText(MainActivity.this, "center view", Toast.LENGTH_SHORT).show();
            }
        });
//        mCircleMenu.setOnMenuItemClickListener(new CircleMenuLayout.OnMenuItemClickListener() {
//            @Override
//            public void itemClick(View view, int pos) {
//                Toast.makeText(MainActivity.this, mItemTexts[pos], Toast.LENGTH_SHORT).show();
//            }
//
//            @Override
//            public void itemCenterClick(View view) {
//                Toast.makeText(MainActivity.this, "center view", Toast.LENGTH_SHORT).show();
//            }
//        });
    }
}
<file_sep>/Behavior/src/main/java/circlemenu/zw/com/myapplication/MainAcitivity.java
package circlemenu.zw.com.myapplication;

import android.app.Activity;
import android.os.Bundle;
import android.widget.ArrayAdapter;
import android.widget.LinearLayout;
import android.widget.ListView;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by Admin on 2016/9/22.
 */
public class MainAcitivity extends Activity {

    private List<String> mList = new ArrayList<>();
    private ListView mListView;
    private LinearLayout mBehavior;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        mListView = (ListView) findViewById(R.id.listview);
        mBehavior = (LinearLayout) findViewById(R.id.ll_behavior);
        setList();

        ArrayAdapter<String> adapter = new ArrayAdapter<String>(this, android.R
                .layout.simple_list_item_1, mList);
        mListView.setAdapter(adapter);
    }


    private void setList() {
        for (int i = 0; i < 30; i++) {
            mList.add("张三 " + i);
        }
    }
}
<file_sep>/Behavior/src/main/java/circlemenu/zw/com/myapplication/StackHeadLayout.java
package circlemenu.zw.com.myapplication;

import android.content.Context;
import android.util.AttributeSet;
import android.view.ViewGroup;

/**
 * Created by Admin on 2016/9/23.
 */
public class StackHeadLayout extends ViewGroup {
    public StackHeadLayout(Context context) {
        this(context, null);
    }

    public StackHeadLayout(Context context, AttributeSet attrs) {
        this(context, attrs, 0);
    }

    public StackHeadLayout(Context context, AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
    }

    @Override
    protected void onLayout(boolean b, int i, int i1, int i2, int i3) {

    }
}
