[
  {
    "path": ".gitignore",
    "content": "*.iml\n.gradle\n/local.properties\n/.idea/*\n.DS_Store\n/build\n/captures\n"
  },
  {
    "path": "README.md",
    "content": "# DropDownLayout\neffect\n![](https://github.com/sungerk/DropDownLayout/blob/master/art/shutcut.gif)\n##How to use?\n###1.config the layout like this\n* DropDownLayout\n the container who can controller the menu sho or dissmiss\n\n* RelativeLayout\n you custom  contentView,you can use RelativeLayout,LinearLayout or other layout view.\n\n* MaskView\n  when menu is show the mask will show,and when the menu dismiss the maskview will dismiss\n  ## you must set the alpha. so i set the background color with alpha #88838685\n\n* MenuLayout\nthe  menu layout\n\n###Like this\n```xml\n<org.net.sunger.widget.DropDownLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n     xmlns:tools=\"http://schemas.android.com/tools\"\n    android:id=\"@+id/dropdown\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n     tools:showIn=\"@layout/activity_main\">\n\n    <RelativeLayout\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"match_parent\"\n        android:background=\"#fff\"\n        >\n\n        <android.support.v7.widget.RecyclerView\n            android:id=\"@+id/recyclerView\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"match_parent\"\n             ></android.support.v7.widget.RecyclerView>\n    </RelativeLayout>\n\n     <org.net.sunger.widget.MaskView\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"match_parent\"\n        android:background=\"#88838685\" />\n\n\n    <org.net.sunger.widget.MenuLayout\n        android:id=\"@+id/menuLayout\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:background=\"#fff\"></org.net.sunger.widget.MenuLayout>\n\n\n</org.net.sunger.widget.DropDownLayout>\n\n```\n\n\n###2.controller it in java code\n\n```java\n        MenuLayout  menuLayout = (MenuLayout) findViewById(R.id.menuLayout);\n        DropDownLayout dropDownLayout = (DropDownLayout) findViewById(R.id.dropdown);\n        List<Fragment> fragments = new ArrayList<>();\n        fragments.add(new FragmentFloor());\n        fragments.add(new FragmentCategory());\n        fragments.add(new FragmentSort());\n        //you can set the anim by youself\n        //menuLayout.setAnimationIn(R.anim.an);\n        //menuLayout.setAnimationOut(R.anim.out);\n        menuLayout.setFragmentManager(getSupportFragmentManager());\n        menuLayout.bindFragments(fragments);\n        // dropDownLayout.closeMenu();\n        //  dropDownLayout.showMenuAt(position);\n```\n\n\n\n## License\n\n```\nCopyright 2016 sungerk\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n   http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n```\n"
  },
  {
    "path": "app/.gitignore",
    "content": "/build\n"
  },
  {
    "path": "app/build.gradle",
    "content": "apply plugin: 'com.android.application'\n\nandroid {\n    compileSdkVersion 23\n    buildToolsVersion \"23.0.3\"\n\n    defaultConfig {\n        applicationId \"sunger.net.org.dropmenu\"\n        minSdkVersion 15\n        targetSdkVersion 23\n        versionCode 1\n        versionName \"1.0\"\n    }\n    buildTypes {\n        release {\n            minifyEnabled false\n            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'\n        }\n    }\n}\n\ndependencies {\n    compile fileTree(dir: 'libs', include: ['*.jar'])\n    testCompile 'junit:junit:4.12'\n    compile 'com.android.support:appcompat-v7:23.3.0'\n    compile 'com.android.support:recyclerview-v7:23.3.0'\n    compile 'com.nineoldandroids:library:2.4.0'\n    compile 'com.jakewharton:butterknife:6.1.0'\n    compile project(':DropDownLayout')\n}\n"
  },
  {
    "path": "app/proguard-rules.pro",
    "content": "# Add project specific ProGuard rules here.\n# By default, the flags in this file are appended to flags specified\n# in /Users/sunger/android/sdk/tools/proguard/proguard-android.txt\n# You can edit the include path and order by changing the proguardFiles\n# directive in build.gradle.\n#\n# For more details, see\n#   http://developer.android.com/guide/developing/tools/proguard.html\n\n# Add any project specific keep options here:\n\n# If your project uses WebView with JS, uncomment the following\n# and specify the fully qualified class name to the JavaScript interface\n# class:\n#-keepclassmembers class fqcn.of.javascript.interface.for.webview {\n#   public *;\n#}\n"
  },
  {
    "path": "app/src/androidTest/java/sunger/net/org/dropmenu/ApplicationTest.java",
    "content": "package sunger.net.org.dropmenu;\n\nimport android.app.Application;\nimport android.test.ApplicationTestCase;\n\n/**\n * <a href=\"http://d.android.com/tools/testing/testing_android.html\">Testing Fundamentals</a>\n */\npublic class ApplicationTest extends ApplicationTestCase<Application> {\n    public ApplicationTest() {\n        super(Application.class);\n    }\n}"
  },
  {
    "path": "app/src/main/AndroidManifest.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    package=\"sunger.net.org.dropmenu\">\n\n    <application\n        android:allowBackup=\"true\"\n        android:icon=\"@mipmap/ic_launcher\"\n        android:label=\"@string/app_name\"\n        android:supportsRtl=\"true\"\n        android:theme=\"@style/AppTheme\">\n        <activity\n            android:name=\".MainActivity\"\n            android:label=\"@string/app_name\"\n            android:theme=\"@style/AppTheme\">\n            <intent-filter>\n                <action android:name=\"android.intent.action.MAIN\" />\n\n                <category android:name=\"android.intent.category.LAUNCHER\" />\n            </intent-filter>\n        </activity>\n    </application>\n\n</manifest>\n"
  },
  {
    "path": "app/src/main/java/sunger/net/org/dropmenu/MainActivity.java",
    "content": "package sunger.net.org.dropmenu;\n\nimport android.os.Bundle;\nimport android.support.v4.app.Fragment;\nimport android.support.v7.app.AppCompatActivity;\nimport android.support.v7.widget.LinearLayoutManager;\nimport android.support.v7.widget.RecyclerView;\n\nimport org.net.sunger.widget.DropDownLayout;\nimport org.net.sunger.widget.MenuLayout;\n\nimport java.util.ArrayList;\nimport java.util.List;\n\nimport sunger.net.org.dropmenu.adapter.ShopAdapter;\nimport sunger.net.org.dropmenu.fragment.FragmentCategory;\nimport sunger.net.org.dropmenu.fragment.FragmentFloor;\nimport sunger.net.org.dropmenu.fragment.FragmentSort;\nimport sunger.net.org.dropmenu.tab.CommonTabLayout;\nimport sunger.net.org.dropmenu.tab.listener.CustomTabEntity;\nimport sunger.net.org.dropmenu.tab.listener.OnTabSelectListener;\n\npublic class MainActivity extends AppCompatActivity {\n    private CommonTabLayout tabs;\n    private String[] mTitles = {\"All Floor\", \"All Merchant\", \"All Category\"};\n    private int[] mIconUnselectIds = {\n            R.mipmap.tab_floor_unselected, R.mipmap.tab_category_unseleted,\n            R.mipmap.tab_sort_unseleted};\n    private int[] mIconSelectIds = {\n            R.mipmap.tab_floor_selected, R.mipmap.tab_category_seleted,\n            R.mipmap.tab_floor_selected};\n    private ArrayList<CustomTabEntity> mTabEntities = new ArrayList<>();\n    private DropDownLayout dropDownLayout;\n    private MenuLayout menuLayout;\n\n    private ShopAdapter shopAdapter;\n\n    @Override\n    protected void onCreate(Bundle savedInstanceState) {\n        super.onCreate(savedInstanceState);\n        setContentView(R.layout.activity_main);\n        menuLayout = (MenuLayout) findViewById(R.id.menuLayout);\n        dropDownLayout = (DropDownLayout) findViewById(R.id.dropdown);\n        List<Fragment> fragments = new ArrayList<>();\n        fragments.add(new FragmentFloor());\n        fragments.add(new FragmentCategory());\n        fragments.add(new FragmentSort());\n//         menuLayout.setAnimationIn(R.anim.an);\n//         menuLayout.setAnimationOut(R.anim.out);\n        menuLayout.setFragmentManager(getSupportFragmentManager());\n        menuLayout.bindFragments(fragments);\n        tabs = (CommonTabLayout) findViewById(R.id.tabs);\n        updateTabData();\n\n        tabs.setOnTabSelectListener(new OnTabSelectListener() {\n            @Override\n            public void onTabSelect(int position) {\n                dropDownLayout.showMenuAt(position);\n            }\n\n            @Override\n            public void onTabReselect(int position) {\n                if (menuLayout.isShow()) {\n                    dropDownLayout.closeMenu();\n                } else {\n                    dropDownLayout.showMenuAt(position);\n                }\n\n            }\n        });\n\n        shopAdapter = new ShopAdapter();\n        RecyclerView recyclerView = (RecyclerView) findViewById(R.id.recyclerView);\n        recyclerView.setLayoutManager(new LinearLayoutManager(this));\n        recyclerView.setAdapter(shopAdapter);\n    }\n\n    private void updateTabData() {\n        mTabEntities.clear();\n        for (int i = 0; i < mTitles.length; i++) {\n            mTabEntities.add(new TabEntity(mTitles[i], mIconSelectIds[i], mIconUnselectIds[i]));\n        }\n        tabs.setTabData(mTabEntities);\n    }\n\n    public void onFilter(int type, String tag) {\n        dropDownLayout.closeMenu();\n        switch (type) {\n            case 0:\n                mTitles[0] = tag;\n                break;\n            case 1:\n                mTitles[1] = tag;\n\n                break;\n            case 2:\n                mTitles[2] = tag;\n                break;\n        }\n        updateTabData();\n    }\n\n\n}\n"
  },
  {
    "path": "app/src/main/java/sunger/net/org/dropmenu/TabEntity.java",
    "content": "package sunger.net.org.dropmenu;\n\nimport sunger.net.org.dropmenu.tab.listener.CustomTabEntity;\n\n/**\n * Created by sunger on 16/4/16.\n */\n\npublic class TabEntity implements CustomTabEntity {\n    public String title;\n    public int selectedIcon;\n    public int unSelectedIcon;\n\n    public TabEntity(String title, int selectedIcon, int unSelectedIcon) {\n        this.title = title;\n        this.selectedIcon = selectedIcon;\n        this.unSelectedIcon = unSelectedIcon;\n    }\n\n    @Override\n    public String getTabTitle() {\n        return title;\n    }\n\n    @Override\n    public int getTabSelectedIcon() {\n        return selectedIcon;\n    }\n\n    @Override\n    public int getTabUnselectedIcon() {\n        return unSelectedIcon;\n    }\n}\n"
  },
  {
    "path": "app/src/main/java/sunger/net/org/dropmenu/adapter/FilterAdapter.java",
    "content": "package sunger.net.org.dropmenu.adapter;\n\nimport android.content.Context;\nimport android.view.LayoutInflater;\nimport android.view.View;\nimport android.view.ViewGroup;\nimport android.widget.BaseAdapter;\nimport android.widget.TextView;\n\nimport java.util.List;\n\nimport butterknife.ButterKnife;\nimport butterknife.InjectView;\nimport sunger.net.org.dropmenu.R;\n\n\npublic class FilterAdapter extends BaseAdapter {\n\n    private Context context;\n    private List<String> list;\n    private int checkItemPosition = 0;\n\n    public void setCheckItem(int position) {\n        checkItemPosition = position;\n        notifyDataSetChanged();\n    }\n\n    public FilterAdapter(Context context, List<String> list) {\n        this.context = context;\n        this.list = list;\n    }\n\n    @Override\n    public int getCount() {\n        return list.size();\n    }\n\n    @Override\n    public Object getItem(int position) {\n        return null;\n    }\n\n    @Override\n    public long getItemId(int position) {\n        return position;\n    }\n\n    @Override\n    public View getView(int position, View convertView, ViewGroup parent) {\n        ViewHolder viewHolder;\n        if (convertView != null) {\n            viewHolder = (ViewHolder) convertView.getTag();\n        } else {\n            convertView = LayoutInflater.from(context).inflate(R.layout.item_default_drop_down, null);\n            viewHolder = new ViewHolder(convertView);\n            convertView.setTag(viewHolder);\n        }\n        fillValue(position, viewHolder);\n        return convertView;\n    }\n\n    private void fillValue(int position, ViewHolder viewHolder) {\n        viewHolder.mText.setText(list.get(position));\n        if (checkItemPosition != -1) {\n            if (checkItemPosition == position) {\n                viewHolder.mText.setTextColor(context.getResources().getColor(R.color.drop_down_selected));\n                viewHolder.mText.setBackgroundResource(R.color.check_bg);\n            } else {\n                viewHolder.mText.setTextColor(context.getResources().getColor(R.color.drop_down_unselected));\n                viewHolder.mText.setBackgroundResource(R.color.white);\n            }\n        }\n    }\n\n    static class ViewHolder {\n        @InjectView(R.id.text)\n        TextView mText;\n\n        ViewHolder(View view) {\n            ButterKnife.inject(this, view);\n        }\n    }\n}\n"
  },
  {
    "path": "app/src/main/java/sunger/net/org/dropmenu/adapter/ShopAdapter.java",
    "content": "package sunger.net.org.dropmenu.adapter;\n\nimport android.support.v7.widget.RecyclerView;\nimport android.view.View;\nimport android.view.ViewGroup;\nimport android.widget.TextView;\n\n/**\n * Created by sunger on 16/4/16.\n */\npublic class ShopAdapter  extends RecyclerView.Adapter<ShopAdapter.ShopViewHoler>{\nprivate  String[] data={\"shop1\",\"shop2\",\"shop3\",\"shop4\",\"shop5\",\"shop5\",\"shop6\",\"shop6\",\"shop7\",\"shop8\",\"shop9\",\"shop10\",\"shop1\",\"shop1\",\"shop1\",\"shop1\",\"shop1\",\"shop8\",\"shop9\",\"shop10\",\"shop1\",\"shop1\",\"shop1\",\"shop1\",\"shop1\",\"shop8\",\"shop9\",\"shop10\",\"shop1\",\"shop1\",\"shop1\",\"shop1\",\"shop1\"};\n\n    @Override\n    public ShopViewHoler onCreateViewHolder(ViewGroup parent, int viewType) {\n        TextView tv=  new TextView(parent.getContext());\n        tv.setHeight(300);\n        return new ShopViewHoler(tv);\n    }\n\n    @Override\n    public void onBindViewHolder(ShopViewHoler holder, int position) {\n        holder.mTextView.setText(data[position]);\n    }\n\n    @Override\n    public int getItemCount() {\n        return data.length;\n    }\n\n    public static   class ShopViewHoler extends  RecyclerView.ViewHolder{\n\n        public final TextView mTextView;\n        public ShopViewHoler(View itemView) {\n            super(itemView);\n            mTextView=(TextView)itemView;\n        }\n    }\n}\n"
  },
  {
    "path": "app/src/main/java/sunger/net/org/dropmenu/fragment/FragmentCategory.java",
    "content": "package sunger.net.org.dropmenu.fragment;\n\nimport android.os.Bundle;\nimport android.support.annotation.Nullable;\nimport android.support.v4.app.Fragment;\nimport android.view.LayoutInflater;\nimport android.view.View;\nimport android.view.ViewGroup;\nimport android.widget.AdapterView;\nimport android.widget.ListView;\n\nimport java.util.Arrays;\n\nimport sunger.net.org.dropmenu.MainActivity;\nimport sunger.net.org.dropmenu.adapter.FilterAdapter;\n\n/**\n * Created by sunger on 16/4/16.\n */\npublic class FragmentCategory extends Fragment {\n\n    private String clothes[] = {\"All\", \"Socks\", \"Hat\", \"Glove\", \"Briefs\", \"Jacket\"};\n    private ListView listView;\n    private FilterAdapter adapter;\n    private MainActivity mainActivity;\n\n    @Override\n    public void onCreate(@Nullable Bundle savedInstanceState) {\n        super.onCreate(savedInstanceState);\n        mainActivity=(MainActivity)getActivity();\n    }\n\n    @Nullable\n    @Override\n    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n        listView = new ListView(getActivity());\n        return listView;\n    }\n\n    @Override\n    public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {\n        super.onViewCreated(view, savedInstanceState);\n        listView.setDividerHeight(0);\n        adapter = new FilterAdapter(getActivity(), Arrays.asList(clothes));\n        listView.setAdapter(adapter);\n        listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n            @Override\n            public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n                mainActivity.onFilter(1,clothes[position]);\n                adapter.setCheckItem(position);\n            }\n        });\n    }\n}\n"
  },
  {
    "path": "app/src/main/java/sunger/net/org/dropmenu/fragment/FragmentFloor.java",
    "content": "package sunger.net.org.dropmenu.fragment;\n\nimport android.os.Bundle;\nimport android.support.annotation.Nullable;\nimport android.support.v4.app.Fragment;\nimport android.view.LayoutInflater;\nimport android.view.View;\nimport android.view.ViewGroup;\nimport android.widget.AdapterView;\nimport android.widget.ListView;\n\nimport java.util.Arrays;\n\nimport sunger.net.org.dropmenu.MainActivity;\nimport sunger.net.org.dropmenu.adapter.FilterAdapter;\n\n/**\n * Created by sunger on 16/4/16.\n */\npublic class FragmentFloor extends Fragment {\n\n    private ListView listView;\n    private FilterAdapter adapter;\n    private String floors[] = {\"B1\", \"B2\", \"B3\", \"1F\", \"2F\", \"3F\", \"4F\", \"5F\", \"6F\", \"7F\", \"9F\"};\n    private MainActivity mainActivity;\n\n    @Override\n    public void onCreate(@Nullable Bundle savedInstanceState) {\n        super.onCreate(savedInstanceState);\n        mainActivity=(MainActivity)getActivity();\n    }\n\n    @Nullable\n    @Override\n    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n        listView = new ListView(getActivity());\n          return listView;\n    }\n\n    @Override\n    public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {\n        super.onViewCreated(view, savedInstanceState);\n        adapter = new FilterAdapter(getActivity(), Arrays.asList(floors));\n        listView.setDividerHeight(0);\n        listView.setAdapter(adapter);\n        listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n            @Override\n            public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n                mainActivity.onFilter(0,floors[position]);\n                adapter.setCheckItem(position);\n            }\n        });\n    }\n}\n"
  },
  {
    "path": "app/src/main/java/sunger/net/org/dropmenu/fragment/FragmentSort.java",
    "content": "package sunger.net.org.dropmenu.fragment;\n\nimport android.os.Bundle;\nimport android.support.annotation.Nullable;\nimport android.support.v4.app.Fragment;\nimport android.view.LayoutInflater;\nimport android.view.View;\nimport android.view.ViewGroup;\nimport android.widget.AdapterView;\nimport android.widget.ListView;\n\nimport java.util.Arrays;\n\nimport sunger.net.org.dropmenu.MainActivity;\nimport sunger.net.org.dropmenu.adapter.FilterAdapter;\n\n/**\n * Created by sunger on 16/4/16.\n */\npublic class FragmentSort extends Fragment {\n    private String sorts[] = {\"All\", \"A-Z\", \"Z-A\", \"Near\"};\n    ListView listView;\n    FilterAdapter adapter;\n\n    private MainActivity mainActivity;\n\n    @Override\n    public void onCreate(@Nullable Bundle savedInstanceState) {\n        super.onCreate(savedInstanceState);\n        mainActivity=(MainActivity)getActivity();\n    }\n\n    @Nullable\n    @Override\n    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n        listView = new ListView(getActivity());\n        return listView;\n    }\n\n    @Override\n    public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {\n        super.onViewCreated(view, savedInstanceState);\n        listView.setDividerHeight(0);\n        adapter = new FilterAdapter(getActivity(), Arrays.asList(sorts));\n        listView.setAdapter(adapter);\n        listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n            @Override\n            public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n                mainActivity.onFilter(2,sorts[position]);\n                adapter.setCheckItem(position);\n            }\n        });\n    }\n}\n"
  },
  {
    "path": "app/src/main/java/sunger/net/org/dropmenu/tab/CommonTabLayout.java",
    "content": "package sunger.net.org.dropmenu.tab;\n\nimport android.content.Context;\nimport android.content.res.TypedArray;\nimport android.graphics.Canvas;\nimport android.graphics.Color;\nimport android.graphics.Paint;\nimport android.graphics.Path;\nimport android.graphics.Rect;\nimport android.graphics.drawable.GradientDrawable;\nimport android.os.Bundle;\nimport android.os.Parcelable;\nimport android.support.v4.app.Fragment;\nimport android.support.v4.app.FragmentActivity;\nimport android.util.AttributeSet;\nimport android.util.SparseArray;\nimport android.util.TypedValue;\nimport android.view.Gravity;\nimport android.view.View;\nimport android.view.ViewGroup;\nimport android.view.animation.OvershootInterpolator;\nimport android.widget.FrameLayout;\nimport android.widget.ImageView;\nimport android.widget.LinearLayout;\nimport android.widget.TextView;\n\nimport com.nineoldandroids.animation.TypeEvaluator;\nimport com.nineoldandroids.animation.ValueAnimator;\n\nimport java.util.ArrayList;\n\nimport sunger.net.org.dropmenu.R;\nimport sunger.net.org.dropmenu.tab.listener.CustomTabEntity;\nimport sunger.net.org.dropmenu.tab.listener.OnTabSelectListener;\nimport sunger.net.org.dropmenu.tab.utils.FragmentChangeManager;\nimport sunger.net.org.dropmenu.tab.utils.UnreadMsgUtils;\nimport sunger.net.org.dropmenu.tab.widget.MsgView;\n\n/** 没有继承HorizontalScrollView不能滑动,对于ViewPager无依赖 */\npublic class CommonTabLayout extends FrameLayout implements ValueAnimator.AnimatorUpdateListener {\n    private Context mContext;\n    private ArrayList<CustomTabEntity> mTabEntitys = new ArrayList<>();\n    private LinearLayout mTabsContainer;\n    private int mCurrentTab;\n    private int mLastTab;\n    private int mTabCount;\n    /** 用于绘制显示器 */\n    private Rect mIndicatorRect = new Rect();\n    private GradientDrawable mIndicatorDrawable = new GradientDrawable();\n\n    private Paint mRectPaint = new Paint(Paint.ANTI_ALIAS_FLAG);\n    private Paint mDividerPaint = new Paint(Paint.ANTI_ALIAS_FLAG);\n    private Paint mTrianglePaint = new Paint(Paint.ANTI_ALIAS_FLAG);\n    private Path mTrianglePath = new Path();\n    private static final int STYLE_NORMAL = 0;\n    private static final int STYLE_TRIANGLE = 1;\n    private static final int STYLE_BLOCK = 2;\n    private int mIndicatorStyle = STYLE_NORMAL;\n\n    private float mTabPadding;\n    private boolean mTabSpaceEqual;\n    private float mTabWidth;\n\n    /** indicator */\n    private int mIndicatorColor;\n    private float mIndicatorHeight;\n    private float mIndicatorWidth;\n    private float mIndicatorCornerRadius;\n    private float mIndicatorMarginLeft;\n    private float mIndicatorMarginTop;\n    private float mIndicatorMarginRight;\n    private float mIndicatorMarginBottom;\n    private long mIndicatorAnimDuration;\n    private boolean mIndicatorAnimEnable;\n    private boolean mIndicatorBounceEnable;\n    private int mIndicatorGravity;\n\n    /** underline */\n    private int mUnderlineColor;\n    private float mUnderlineHeight;\n    private int mUnderlineGravity;\n\n    /** divider */\n    private int mDividerColor;\n    private float mDividerWidth;\n    private float mDividerPadding;\n\n    /** title */\n    private float mTextsize;\n    private int mTextSelectColor;\n    private int mTextUnselectColor;\n    private boolean mTextBold;\n    private boolean mTextAllCaps;\n\n    /** icon */\n    private boolean mIconVisible;\n    private int mIconGravity;\n    private float mIconWidth;\n    private float mIconHeight;\n    private float mIconMargin;\n\n    private int mHeight;\n\n    /** anim */\n    private ValueAnimator mValueAnimator;\n    private OvershootInterpolator mInterpolator = new OvershootInterpolator(1.5f);\n\n    private FragmentChangeManager mFragmentChangeManager;\n\n    public CommonTabLayout(Context context) {\n        this(context, null, 0);\n    }\n\n    public CommonTabLayout(Context context, AttributeSet attrs) {\n        this(context, attrs, 0);\n    }\n\n    public CommonTabLayout(Context context, AttributeSet attrs, int defStyleAttr) {\n        super(context, attrs, defStyleAttr);\n        setWillNotDraw(false);//重写onDraw方法,需要调用这个方法来清除flag\n        setClipChildren(false);\n        setClipToPadding(false);\n\n        this.mContext = context;\n        mTabsContainer = new LinearLayout(context);\n        addView(mTabsContainer);\n\n        obtainAttributes(context, attrs);\n\n        //get layout_height\n        String height = attrs.getAttributeValue(\"http://schemas.android.com/apk/res/android\", \"layout_height\");\n\n        //create ViewPager\n        if (height.equals(ViewGroup.LayoutParams.MATCH_PARENT + \"\")) {\n        } else if (height.equals(ViewGroup.LayoutParams.WRAP_CONTENT + \"\")) {\n        } else {\n            int[] systemAttrs = {android.R.attr.layout_height};\n            TypedArray a = context.obtainStyledAttributes(attrs, systemAttrs);\n            mHeight = a.getDimensionPixelSize(0, ViewGroup.LayoutParams.WRAP_CONTENT);\n            a.recycle();\n        }\n\n        mValueAnimator = ValueAnimator.ofObject(new PointEvaluator(), mLastP, mCurrentP);\n        mValueAnimator.addUpdateListener(this);\n    }\n\n    private void obtainAttributes(Context context, AttributeSet attrs) {\n        TypedArray ta = context.obtainStyledAttributes(attrs, R.styleable.CommonTabLayout);\n\n        mIndicatorStyle = ta.getInt(R.styleable.CommonTabLayout_tl_indicator_style, 0);\n        mIndicatorColor = ta.getColor(R.styleable.CommonTabLayout_tl_indicator_color, Color.parseColor(mIndicatorStyle == STYLE_BLOCK ? \"#4B6A87\" : \"#ffffff\"));\n        mIndicatorHeight = ta.getDimension(R.styleable.CommonTabLayout_tl_indicator_height,\n                dp2px(mIndicatorStyle == STYLE_TRIANGLE ? 4 : (mIndicatorStyle == STYLE_BLOCK ? -1 : 2)));\n        mIndicatorWidth = ta.getDimension(R.styleable.CommonTabLayout_tl_indicator_width, dp2px(mIndicatorStyle == STYLE_TRIANGLE ? 10 : -1));\n        mIndicatorCornerRadius = ta.getDimension(R.styleable.CommonTabLayout_tl_indicator_corner_radius, dp2px(mIndicatorStyle == STYLE_BLOCK ? -1 : 0));\n        mIndicatorMarginLeft = ta.getDimension(R.styleable.CommonTabLayout_tl_indicator_margin_left, dp2px(0));\n        mIndicatorMarginTop = ta.getDimension(R.styleable.CommonTabLayout_tl_indicator_margin_top, dp2px(mIndicatorStyle == STYLE_BLOCK ? 7 : 0));\n        mIndicatorMarginRight = ta.getDimension(R.styleable.CommonTabLayout_tl_indicator_margin_right, dp2px(0));\n        mIndicatorMarginBottom = ta.getDimension(R.styleable.CommonTabLayout_tl_indicator_margin_bottom, dp2px(mIndicatorStyle == STYLE_BLOCK ? 7 : 0));\n        mIndicatorAnimEnable = ta.getBoolean(R.styleable.CommonTabLayout_tl_indicator_anim_enable, true);\n        mIndicatorBounceEnable = ta.getBoolean(R.styleable.CommonTabLayout_tl_indicator_bounce_enable, true);\n        mIndicatorAnimDuration = ta.getInt(R.styleable.CommonTabLayout_tl_indicator_anim_duration, -1);\n        mIndicatorGravity = ta.getInt(R.styleable.CommonTabLayout_tl_indicator_gravity, Gravity.BOTTOM);\n\n        mUnderlineColor = ta.getColor(R.styleable.CommonTabLayout_tl_underline_color, Color.parseColor(\"#ffffff\"));\n        mUnderlineHeight = ta.getDimension(R.styleable.CommonTabLayout_tl_underline_height, dp2px(0));\n        mUnderlineGravity = ta.getInt(R.styleable.CommonTabLayout_tl_underline_gravity, Gravity.BOTTOM);\n\n        mDividerColor = ta.getColor(R.styleable.CommonTabLayout_tl_divider_color, Color.parseColor(\"#ffffff\"));\n        mDividerWidth = ta.getDimension(R.styleable.CommonTabLayout_tl_divider_width, dp2px(0));\n        mDividerPadding = ta.getDimension(R.styleable.CommonTabLayout_tl_divider_padding, dp2px(12));\n\n        mTextsize = ta.getDimension(R.styleable.CommonTabLayout_tl_textsize, sp2px(13f));\n        mTextSelectColor = ta.getColor(R.styleable.CommonTabLayout_tl_textSelectColor, Color.parseColor(\"#ffffff\"));\n        mTextUnselectColor = ta.getColor(R.styleable.CommonTabLayout_tl_textUnselectColor, Color.parseColor(\"#AAffffff\"));\n        mTextBold = ta.getBoolean(R.styleable.CommonTabLayout_tl_textBold, false);\n        mTextAllCaps = ta.getBoolean(R.styleable.CommonTabLayout_tl_textAllCaps, false);\n\n        mIconVisible = ta.getBoolean(R.styleable.CommonTabLayout_tl_iconVisible, true);\n        mIconGravity = ta.getInt(R.styleable.CommonTabLayout_tl_iconGravity, Gravity.TOP);\n        mIconWidth = ta.getDimension(R.styleable.CommonTabLayout_tl_iconWidth, dp2px(0));\n        mIconHeight = ta.getDimension(R.styleable.CommonTabLayout_tl_iconHeight, dp2px(0));\n        mIconMargin = ta.getDimension(R.styleable.CommonTabLayout_tl_iconMargin, dp2px(2.5f));\n\n        mTabSpaceEqual = ta.getBoolean(R.styleable.CommonTabLayout_tl_tab_space_equal, true);\n        mTabWidth = ta.getDimension(R.styleable.CommonTabLayout_tl_tab_width, dp2px(-1));\n        mTabPadding = ta.getDimension(R.styleable.CommonTabLayout_tl_tab_padding, mTabSpaceEqual || mTabWidth > 0 ? dp2px(0) : dp2px(10));\n\n        ta.recycle();\n    }\n\n    public void setTabData(ArrayList<CustomTabEntity> tabEntitys) {\n        if (tabEntitys == null || tabEntitys.size() == 0) {\n            throw new IllegalStateException(\"TabEntitys can not be NULL or EMPTY !\");\n        }\n\n        this.mTabEntitys.clear();\n        this.mTabEntitys.addAll(tabEntitys);\n\n        notifyDataSetChanged();\n    }\n\n    /** 关联数据支持同时切换fragments */\n    public void setTabData(ArrayList<CustomTabEntity> tabEntitys, FragmentActivity fa, int containerViewId, ArrayList<Fragment> fragments) {\n        mFragmentChangeManager = new FragmentChangeManager(fa.getSupportFragmentManager(), containerViewId, fragments);\n        setTabData(tabEntitys);\n    }\n\n    /** 更新数据 */\n    public void notifyDataSetChanged() {\n        mTabsContainer.removeAllViews();\n        this.mTabCount = mTabEntitys.size();\n        View tabView;\n        for (int i = 0; i < mTabCount; i++) {\n            if (mIconGravity == Gravity.LEFT) {\n                tabView = View.inflate(mContext, R.layout.layout_tab_left, null);\n            } else if (mIconGravity == Gravity.RIGHT) {\n                tabView = View.inflate(mContext, R.layout.layout_tab_right, null);\n            } else if (mIconGravity == Gravity.BOTTOM) {\n                tabView = View.inflate(mContext, R.layout.layout_tab_bottom, null);\n            } else {\n                tabView = View.inflate(mContext, R.layout.layout_tab_top, null);\n            }\n\n            tabView.setTag(i);\n            addTab(i, tabView);\n        }\n\n        updateTabStyles();\n    }\n\n    /** 创建并添加tab */\n    private void addTab(final int position, View tabView) {\n        TextView tv_tab_title = (TextView) tabView.findViewById(R.id.tv_tab_title);\n        tv_tab_title.setText(mTabEntitys.get(position).getTabTitle());\n        ImageView iv_tab_icon = (ImageView) tabView.findViewById(R.id.iv_tab_icon);\n        iv_tab_icon.setImageResource(mTabEntitys.get(position).getTabUnselectedIcon());\n\n        tabView.setOnClickListener(new OnClickListener() {\n            @Override\n            public void onClick(View v) {\n                int position = (Integer) v.getTag();\n                if (mCurrentTab != position) {\n                    setCurrentTab(position);\n                    if (mListener != null) {\n                        mListener.onTabSelect(position);\n                    }\n                } else {\n                    if (mListener != null) {\n                        mListener.onTabReselect(position);\n                    }\n                }\n            }\n        });\n\n        /** 每一个Tab的布局参数 */\n        LinearLayout.LayoutParams lp_tab = mTabSpaceEqual ?\n                new LinearLayout.LayoutParams(0, LayoutParams.MATCH_PARENT, 1.0f) :\n                new LinearLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.MATCH_PARENT);\n        if (mTabWidth > 0) {\n            lp_tab = new LinearLayout.LayoutParams((int) mTabWidth, LayoutParams.MATCH_PARENT);\n        }\n        mTabsContainer.addView(tabView, position, lp_tab);\n    }\n\n    private void updateTabStyles() {\n        for (int i = 0; i < mTabCount; i++) {\n            View tabView = mTabsContainer.getChildAt(i);\n            tabView.setPadding((int) mTabPadding, 0, (int) mTabPadding, 0);\n            TextView tv_tab_title = (TextView) tabView.findViewById(R.id.tv_tab_title);\n            tv_tab_title.setTextColor(i == mCurrentTab ? mTextSelectColor : mTextUnselectColor);\n            tv_tab_title.setTextSize(TypedValue.COMPLEX_UNIT_PX, mTextsize);\n//            tv_tab_title.setPadding((int) mTabPadding, 0, (int) mTabPadding, 0);\n            if (mTextAllCaps) {\n                tv_tab_title.setText(tv_tab_title.getText().toString().toUpperCase());\n            }\n\n            if (mTextBold) {\n                tv_tab_title.getPaint().setFakeBoldText(mTextBold);\n            }\n\n            ImageView iv_tab_icon = (ImageView) tabView.findViewById(R.id.iv_tab_icon);\n            if (mIconVisible) {\n                iv_tab_icon.setVisibility(View.VISIBLE);\n                CustomTabEntity tabEntity = mTabEntitys.get(i);\n                iv_tab_icon.setImageResource(i == mCurrentTab ? tabEntity.getTabSelectedIcon() : tabEntity.getTabUnselectedIcon());\n                LinearLayout.LayoutParams lp = new LinearLayout.LayoutParams(\n                        mIconWidth <= 0 ? LinearLayout.LayoutParams.WRAP_CONTENT : (int) mIconWidth,\n                        mIconHeight <= 0 ? LinearLayout.LayoutParams.WRAP_CONTENT : (int) mIconHeight);\n                if (mIconGravity == Gravity.LEFT) {\n                    lp.rightMargin = (int) mIconMargin;\n                } else if (mIconGravity == Gravity.RIGHT) {\n                    lp.leftMargin = (int) mIconMargin;\n                } else if (mIconGravity == Gravity.BOTTOM) {\n                    lp.topMargin = (int) mIconMargin;\n                } else {\n                    lp.bottomMargin = (int) mIconMargin;\n                }\n\n                iv_tab_icon.setLayoutParams(lp);\n            } else {\n                iv_tab_icon.setVisibility(View.GONE);\n            }\n        }\n    }\n\n    private void updateTabSelection(int position) {\n        for (int i = 0; i < mTabCount; ++i) {\n            View tabView = mTabsContainer.getChildAt(i);\n            final boolean isSelect = i == position;\n            TextView tab_title = (TextView) tabView.findViewById(R.id.tv_tab_title);\n            tab_title.setTextColor(isSelect ? mTextSelectColor : mTextUnselectColor);\n            ImageView iv_tab_icon = (ImageView) tabView.findViewById(R.id.iv_tab_icon);\n            CustomTabEntity tabEntity = mTabEntitys.get(i);\n            iv_tab_icon.setImageResource(isSelect ? tabEntity.getTabSelectedIcon() : tabEntity.getTabUnselectedIcon());\n        }\n    }\n\n    private void calcOffset() {\n        final View currentTabView = mTabsContainer.getChildAt(this.mCurrentTab);\n        mCurrentP.left = currentTabView.getLeft();\n        mCurrentP.right = currentTabView.getRight();\n\n        final View lastTabView = mTabsContainer.getChildAt(this.mLastTab);\n        mLastP.left = lastTabView.getLeft();\n        mLastP.right = lastTabView.getRight();\n\n//        Log.d(\"AAA\", \"mLastP--->\" + mLastP.left + \"&\" + mLastP.right);\n//        Log.d(\"AAA\", \"mCurrentP--->\" + mCurrentP.left + \"&\" + mCurrentP.right);\n        if (mLastP.left == mCurrentP.left && mLastP.right == mCurrentP.right) {\n            invalidate();\n        } else {\n            mValueAnimator.setObjectValues(mLastP, mCurrentP);\n            if (mIndicatorBounceEnable) {\n                mValueAnimator.setInterpolator(mInterpolator);\n            }\n\n            if (mIndicatorAnimDuration < 0) {\n                mIndicatorAnimDuration = mIndicatorBounceEnable ? 500 : 250;\n            }\n            mValueAnimator.setDuration(mIndicatorAnimDuration);\n            mValueAnimator.start();\n        }\n    }\n\n    private void calcIndicatorRect() {\n        View currentTabView = mTabsContainer.getChildAt(this.mCurrentTab);\n        float left = currentTabView.getLeft();\n        float right = currentTabView.getRight();\n\n        mIndicatorRect.left = (int) left;\n        mIndicatorRect.right = (int) right;\n\n        if (mIndicatorWidth < 0) {   //indicatorWidth小于0时,原jpardogo's PagerSlidingTabStrip\n\n        } else {//indicatorWidth大于0时,圆角矩形以及三角形\n            float indicatorLeft = currentTabView.getLeft() + (currentTabView.getWidth() - mIndicatorWidth) / 2;\n\n            mIndicatorRect.left = (int) indicatorLeft;\n            mIndicatorRect.right = (int) (mIndicatorRect.left + mIndicatorWidth);\n        }\n    }\n\n    @Override\n    public void onAnimationUpdate(ValueAnimator animation) {\n        View currentTabView = mTabsContainer.getChildAt(this.mCurrentTab);\n        IndicatorPoint p = (IndicatorPoint) animation.getAnimatedValue();\n        mIndicatorRect.left = (int) p.left;\n        mIndicatorRect.right = (int) p.right;\n\n        if (mIndicatorWidth < 0) {   //indicatorWidth小于0时,原jpardogo's PagerSlidingTabStrip\n\n        } else {//indicatorWidth大于0时,圆角矩形以及三角形\n            float indicatorLeft = p.left + (currentTabView.getWidth() - mIndicatorWidth) / 2;\n\n            mIndicatorRect.left = (int) indicatorLeft;\n            mIndicatorRect.right = (int) (mIndicatorRect.left + mIndicatorWidth);\n        }\n        invalidate();\n    }\n\n    private boolean mIsFirstDraw = true;\n\n    @Override\n    protected void onDraw(Canvas canvas) {\n        super.onDraw(canvas);\n\n        if (isInEditMode() || mTabCount <= 0) {\n            return;\n        }\n\n        int height = getHeight();\n        int paddingLeft = getPaddingLeft();\n        // draw divider\n        if (mDividerWidth > 0) {\n            mDividerPaint.setStrokeWidth(mDividerWidth);\n            mDividerPaint.setColor(mDividerColor);\n            for (int i = 0; i < mTabCount - 1; i++) {\n                View tab = mTabsContainer.getChildAt(i);\n                canvas.drawLine(paddingLeft + tab.getRight(), mDividerPadding, paddingLeft + tab.getRight(), height - mDividerPadding, mDividerPaint);\n            }\n        }\n\n        // draw underline\n        if (mUnderlineHeight > 0) {\n            mRectPaint.setColor(mUnderlineColor);\n            if (mUnderlineGravity == Gravity.BOTTOM) {\n                canvas.drawRect(paddingLeft, height - mUnderlineHeight, mTabsContainer.getWidth() + paddingLeft, height, mRectPaint);\n            } else {\n                canvas.drawRect(paddingLeft, 0, mTabsContainer.getWidth() + paddingLeft, mUnderlineHeight, mRectPaint);\n            }\n        }\n\n        //draw indicator line\n        if (mIndicatorAnimEnable) {\n            if (mIsFirstDraw) {\n                mIsFirstDraw = false;\n                calcIndicatorRect();\n            }\n        } else {\n            calcIndicatorRect();\n        }\n\n\n        if (mIndicatorStyle == STYLE_TRIANGLE) {\n            if (mIndicatorHeight > 0) {\n                mTrianglePaint.setColor(mIndicatorColor);\n                mTrianglePath.reset();\n                mTrianglePath.moveTo(paddingLeft + mIndicatorRect.left, height);\n                mTrianglePath.lineTo(paddingLeft + mIndicatorRect.left / 2 + mIndicatorRect.right / 2, height - mIndicatorHeight);\n                mTrianglePath.lineTo(paddingLeft + mIndicatorRect.right, height);\n                mTrianglePath.close();\n                canvas.drawPath(mTrianglePath, mTrianglePaint);\n            }\n        } else if (mIndicatorStyle == STYLE_BLOCK) {\n            if (mIndicatorHeight < 0) {\n                mIndicatorHeight = height - mIndicatorMarginTop - mIndicatorMarginBottom;\n            } else {\n\n            }\n\n            if (mIndicatorHeight > 0) {\n                if (mIndicatorCornerRadius < 0 || mIndicatorCornerRadius > mIndicatorHeight / 2) {\n                    mIndicatorCornerRadius = mIndicatorHeight / 2;\n                }\n\n                mIndicatorDrawable.setColor(mIndicatorColor);\n                mIndicatorDrawable.setBounds(paddingLeft + (int) mIndicatorMarginLeft + mIndicatorRect.left,\n                        (int) mIndicatorMarginTop, (int) (paddingLeft + mIndicatorRect.right - mIndicatorMarginRight),\n                        (int) (mIndicatorMarginTop + mIndicatorHeight));\n                mIndicatorDrawable.setCornerRadius(mIndicatorCornerRadius);\n                mIndicatorDrawable.draw(canvas);\n            }\n        } else {\n               /* mRectPaint.setColor(mIndicatorColor);\n                calcIndicatorRect();\n                canvas.drawRect(getPaddingLeft() + mIndicatorRect.left, getHeight() - mIndicatorHeight,\n                        mIndicatorRect.right + getPaddingLeft(), getHeight(), mRectPaint);*/\n\n            if (mIndicatorHeight > 0) {\n                mIndicatorDrawable.setColor(mIndicatorColor);\n                if (mIndicatorGravity == Gravity.BOTTOM) {\n                    mIndicatorDrawable.setBounds(paddingLeft + (int) mIndicatorMarginLeft + mIndicatorRect.left,\n                            height - (int) mIndicatorHeight - (int) mIndicatorMarginBottom,\n                            paddingLeft + mIndicatorRect.right - (int) mIndicatorMarginRight,\n                            height - (int) mIndicatorMarginBottom);\n                } else {\n                    mIndicatorDrawable.setBounds(paddingLeft + (int) mIndicatorMarginLeft + mIndicatorRect.left,\n                            (int) mIndicatorMarginTop,\n                            paddingLeft + mIndicatorRect.right - (int) mIndicatorMarginRight,\n                            (int) mIndicatorHeight + (int) mIndicatorMarginTop);\n                }\n                mIndicatorDrawable.setCornerRadius(mIndicatorCornerRadius);\n                mIndicatorDrawable.draw(canvas);\n            }\n        }\n    }\n\n    //setter and getter\n    public void setCurrentTab(int currentTab) {\n        mLastTab = this.mCurrentTab;\n        this.mCurrentTab = currentTab;\n        updateTabSelection(currentTab);\n        if (mFragmentChangeManager != null) {\n            mFragmentChangeManager.setFragments(currentTab);\n        }\n        if (mIndicatorAnimEnable) {\n            calcOffset();\n        } else {\n            invalidate();\n        }\n    }\n\n    public void setIndicatorStyle(int indicatorStyle) {\n        this.mIndicatorStyle = indicatorStyle;\n        invalidate();\n    }\n\n    public void setTabPadding(float tabPadding) {\n        this.mTabPadding = dp2px(tabPadding);\n        updateTabStyles();\n    }\n\n    public void setTabSpaceEqual(boolean tabSpaceEqual) {\n        this.mTabSpaceEqual = tabSpaceEqual;\n        updateTabStyles();\n    }\n\n    public void setTabWidth(float tabWidth) {\n        this.mTabWidth = dp2px(tabWidth);\n        updateTabStyles();\n    }\n\n    public void setIndicatorColor(int indicatorColor) {\n        this.mIndicatorColor = indicatorColor;\n        invalidate();\n    }\n\n    public void setIndicatorHeight(float indicatorHeight) {\n        this.mIndicatorHeight = dp2px(indicatorHeight);\n        invalidate();\n    }\n\n    public void setIndicatorWidth(float indicatorWidth) {\n        this.mIndicatorWidth = dp2px(indicatorWidth);\n        invalidate();\n    }\n\n    public void setIndicatorCornerRadius(float indicatorCornerRadius) {\n        this.mIndicatorCornerRadius = dp2px(indicatorCornerRadius);\n        invalidate();\n    }\n\n    public void setIndicatorGravity(int indicatorGravity) {\n        this.mIndicatorGravity = indicatorGravity;\n        invalidate();\n    }\n\n    public void setIndicatorMargin(float indicatorMarginLeft, float indicatorMarginTop,\n                                   float indicatorMarginRight, float indicatorMarginBottom) {\n        this.mIndicatorMarginLeft = dp2px(indicatorMarginLeft);\n        this.mIndicatorMarginTop = dp2px(indicatorMarginTop);\n        this.mIndicatorMarginRight = dp2px(indicatorMarginRight);\n        this.mIndicatorMarginBottom = dp2px(indicatorMarginBottom);\n        invalidate();\n    }\n\n    public void setIndicatorAnimDuration(long indicatorAnimDuration) {\n        this.mIndicatorAnimDuration = indicatorAnimDuration;\n    }\n\n    public void setIndicatorAnimEnable(boolean indicatorAnimEnable) {\n        this.mIndicatorAnimEnable = indicatorAnimEnable;\n    }\n\n    public void setIndicatorBounceEnable(boolean indicatorBounceEnable) {\n        this.mIndicatorBounceEnable = indicatorBounceEnable;\n    }\n\n    public void setUnderlineColor(int underlineColor) {\n        this.mUnderlineColor = underlineColor;\n        invalidate();\n    }\n\n    public void setUnderlineHeight(float underlineHeight) {\n        this.mUnderlineHeight = dp2px(underlineHeight);\n        invalidate();\n    }\n\n    public void setUnderlineGravity(int underlineGravity) {\n        this.mUnderlineGravity = underlineGravity;\n        invalidate();\n    }\n\n    public void setDividerColor(int dividerColor) {\n        this.mDividerColor = dividerColor;\n        invalidate();\n    }\n\n    public void setDividerWidth(float dividerWidth) {\n        this.mDividerWidth = dp2px(dividerWidth);\n        invalidate();\n    }\n\n    public void setDividerPadding(float dividerPadding) {\n        this.mDividerPadding = dp2px(dividerPadding);\n        invalidate();\n    }\n\n    public void setTextsize(float textsize) {\n        this.mTextsize = sp2px(textsize);\n        updateTabStyles();\n    }\n\n    public void setTextSelectColor(int textSelectColor) {\n        this.mTextSelectColor = textSelectColor;\n        updateTabStyles();\n    }\n\n    public void setTextUnselectColor(int textUnselectColor) {\n        this.mTextUnselectColor = textUnselectColor;\n        updateTabStyles();\n    }\n\n    public void setTextBold(boolean textBold) {\n        this.mTextBold = textBold;\n        updateTabStyles();\n    }\n\n    public void setIconVisible(boolean iconVisible) {\n        this.mIconVisible = iconVisible;\n        updateTabStyles();\n    }\n\n    public void setIconGravity(int iconGravity) {\n        this.mIconGravity = iconGravity;\n        notifyDataSetChanged();\n    }\n\n    public void setIconWidth(float iconWidth) {\n        this.mIconWidth = dp2px(iconWidth);\n        updateTabStyles();\n    }\n\n    public void setIconHeight(float iconHeight) {\n        this.mIconHeight = dp2px(iconHeight);\n        updateTabStyles();\n    }\n\n    public void setIconMargin(float iconMargin) {\n        this.mIconMargin = dp2px(iconMargin);\n        updateTabStyles();\n    }\n\n    public void setTextAllCaps(boolean textAllCaps) {\n        this.mTextAllCaps = textAllCaps;\n        updateTabStyles();\n    }\n\n\n    public int getTabCount() {\n        return mTabCount;\n    }\n\n    public int getCurrentTab() {\n        return mCurrentTab;\n    }\n\n    public int getIndicatorStyle() {\n        return mIndicatorStyle;\n    }\n\n    public float getTabPadding() {\n        return mTabPadding;\n    }\n\n    public boolean isTabSpaceEqual() {\n        return mTabSpaceEqual;\n    }\n\n    public float getTabWidth() {\n        return mTabWidth;\n    }\n\n    public int getIndicatorColor() {\n        return mIndicatorColor;\n    }\n\n    public float getIndicatorHeight() {\n        return mIndicatorHeight;\n    }\n\n    public float getIndicatorWidth() {\n        return mIndicatorWidth;\n    }\n\n    public float getIndicatorCornerRadius() {\n        return mIndicatorCornerRadius;\n    }\n\n    public float getIndicatorMarginLeft() {\n        return mIndicatorMarginLeft;\n    }\n\n    public float getIndicatorMarginTop() {\n        return mIndicatorMarginTop;\n    }\n\n    public float getIndicatorMarginRight() {\n        return mIndicatorMarginRight;\n    }\n\n    public float getIndicatorMarginBottom() {\n        return mIndicatorMarginBottom;\n    }\n\n    public long getIndicatorAnimDuration() {\n        return mIndicatorAnimDuration;\n    }\n\n    public boolean isIndicatorAnimEnable() {\n        return mIndicatorAnimEnable;\n    }\n\n    public boolean isIndicatorBounceEnable() {\n        return mIndicatorBounceEnable;\n    }\n\n    public int getUnderlineColor() {\n        return mUnderlineColor;\n    }\n\n    public float getUnderlineHeight() {\n        return mUnderlineHeight;\n    }\n\n    public int getDividerColor() {\n        return mDividerColor;\n    }\n\n    public float getDividerWidth() {\n        return mDividerWidth;\n    }\n\n    public float getDividerPadding() {\n        return mDividerPadding;\n    }\n\n    public float getTextsize() {\n        return mTextsize;\n    }\n\n    public int getTextSelectColor() {\n        return mTextSelectColor;\n    }\n\n    public int getTextUnselectColor() {\n        return mTextUnselectColor;\n    }\n\n    public boolean isTextBold() {\n        return mTextBold;\n    }\n\n    public boolean isTextAllCaps() {\n        return mTextAllCaps;\n    }\n\n    public int getIconGravity() {\n        return mIconGravity;\n    }\n\n    public float getIconWidth() {\n        return mIconWidth;\n    }\n\n    public float getIconHeight() {\n        return mIconHeight;\n    }\n\n    public float getIconMargin() {\n        return mIconMargin;\n    }\n\n    public boolean isIconVisible() {\n        return mIconVisible;\n    }\n\n\n    public ImageView getIconView(int tab) {\n        View tabView = mTabsContainer.getChildAt(tab);\n        ImageView iv_tab_icon = (ImageView) tabView.findViewById(R.id.iv_tab_icon);\n        return iv_tab_icon;\n    }\n\n    public TextView getTitleView(int tab) {\n        View tabView = mTabsContainer.getChildAt(tab);\n        TextView tv_tab_title = (TextView) tabView.findViewById(R.id.tv_tab_title);\n        return tv_tab_title;\n    }\n\n    //setter and getter\n\n    // show MsgTipView\n    private Paint mTextPaint = new Paint(Paint.ANTI_ALIAS_FLAG);\n    private SparseArray<Boolean> mInitSetMap = new SparseArray<>();\n\n    /**\n     * 显示未读消息\n     *\n     * @param position 显示tab位置\n     * @param num      num小于等于0显示红点,num大于0显示数字\n     */\n    public void showMsg(int position, int num) {\n        if (position >= mTabCount) {\n            position = mTabCount - 1;\n        }\n\n        View tabView = mTabsContainer.getChildAt(position);\n        MsgView tipView = (MsgView) tabView.findViewById(R.id.rtv_msg_tip);\n        if (tipView != null) {\n            UnreadMsgUtils.show(tipView, num);\n\n            if (mInitSetMap.get(position) != null && mInitSetMap.get(position)) {\n                return;\n            }\n\n            if (!mIconVisible) {\n                setMsgMargin(position, 2, 2);\n            } else {\n                setMsgMargin(position, 0,\n                        mIconGravity == Gravity.LEFT || mIconGravity == Gravity.RIGHT ? 4 : 0);\n            }\n\n            mInitSetMap.put(position, true);\n        }\n    }\n\n    /**\n     * 显示未读红点\n     *\n     * @param position 显示tab位置\n     */\n    public void showDot(int position) {\n        if (position >= mTabCount) {\n            position = mTabCount - 1;\n        }\n        showMsg(position, 0);\n    }\n\n    public void hideMsg(int position) {\n        if (position >= mTabCount) {\n            position = mTabCount - 1;\n        }\n\n        View tabView = mTabsContainer.getChildAt(position);\n        MsgView tipView = (MsgView) tabView.findViewById(R.id.rtv_msg_tip);\n        if (tipView != null) {\n            tipView.setVisibility(View.GONE);\n        }\n    }\n\n    /**\n     * 设置提示红点偏移,注意\n     * 1.控件为固定高度:参照点为tab内容的右上角\n     * 2.控件高度不固定(WRAP_CONTENT):参照点为tab内容的右上角,此时高度已是红点的最高显示范围,所以这时bottomPadding其实就是topPadding\n     */\n    public void setMsgMargin(int position, float leftPadding, float bottomPadding) {\n        if (position >= mTabCount) {\n            position = mTabCount - 1;\n        }\n        View tabView = mTabsContainer.getChildAt(position);\n        MsgView tipView = (MsgView) tabView.findViewById(R.id.rtv_msg_tip);\n        if (tipView != null) {\n            TextView tv_tab_title = (TextView) tabView.findViewById(R.id.tv_tab_title);\n            mTextPaint.setTextSize(mTextsize);\n            float textWidth = mTextPaint.measureText(tv_tab_title.getText().toString());\n            float textHeight = mTextPaint.descent() - mTextPaint.ascent();\n            MarginLayoutParams lp = (MarginLayoutParams) tipView.getLayoutParams();\n\n            float iconH = mIconHeight;\n            float margin = 0;\n            if (mIconVisible) {\n                if (iconH <= 0) {\n                    iconH = mContext.getResources().getDrawable(mTabEntitys.get(position).getTabSelectedIcon()).getIntrinsicHeight();\n                }\n                margin = mIconMargin;\n            }\n\n            if (mIconGravity == Gravity.TOP || mIconGravity == Gravity.BOTTOM) {\n                lp.leftMargin = dp2px(leftPadding);\n                lp.topMargin = mHeight > 0 ? (int) (mHeight - textHeight - iconH - margin) / 2 - dp2px(bottomPadding) : dp2px(bottomPadding);\n            } else {\n                lp.leftMargin = dp2px(leftPadding);\n                lp.topMargin = mHeight > 0 ? (int) (mHeight - Math.max(textHeight, iconH)) / 2 - dp2px(bottomPadding) : dp2px(bottomPadding);\n            }\n\n            tipView.setLayoutParams(lp);\n        }\n    }\n\n    /** 当前类只提供了少许设置未读消息属性的方法,可以通过该方法获取MsgView对象从而各种设置 */\n    public MsgView getMsgView(int position) {\n        if (position >= mTabCount) {\n            position = mTabCount - 1;\n        }\n        View tabView = mTabsContainer.getChildAt(position);\n        MsgView tipView = (MsgView) tabView.findViewById(R.id.rtv_msg_tip);\n        return tipView;\n    }\n\n    private OnTabSelectListener mListener;\n\n    public void setOnTabSelectListener(OnTabSelectListener listener) {\n        this.mListener = listener;\n    }\n\n\n    @Override\n    protected Parcelable onSaveInstanceState() {\n        Bundle bundle = new Bundle();\n        bundle.putParcelable(\"instanceState\", super.onSaveInstanceState());\n        bundle.putInt(\"mCurrentTab\", mCurrentTab);\n        return bundle;\n    }\n\n    @Override\n    protected void onRestoreInstanceState(Parcelable state) {\n        if (state instanceof Bundle) {\n            Bundle bundle = (Bundle) state;\n            mCurrentTab = bundle.getInt(\"mCurrentTab\");\n            state = bundle.getParcelable(\"instanceState\");\n            if (mCurrentTab != 0 && mTabsContainer.getChildCount() > 0) {\n                updateTabSelection(mCurrentTab);\n            }\n        }\n        super.onRestoreInstanceState(state);\n    }\n\n    class IndicatorPoint {\n        public float left;\n        public float right;\n    }\n\n    private IndicatorPoint mCurrentP = new IndicatorPoint();\n    private IndicatorPoint mLastP = new IndicatorPoint();\n\n    class PointEvaluator implements TypeEvaluator<IndicatorPoint> {\n        @Override\n        public IndicatorPoint evaluate(float fraction, IndicatorPoint startValue, IndicatorPoint endValue) {\n            float left = startValue.left + fraction * (endValue.left - startValue.left);\n            float right = startValue.right + fraction * (endValue.right - startValue.right);\n            IndicatorPoint point = new IndicatorPoint();\n            point.left = left;\n            point.right = right;\n            return point;\n        }\n    }\n\n\n    protected int dp2px(float dp) {\n        final float scale = mContext.getResources().getDisplayMetrics().density;\n        return (int) (dp * scale + 0.5f);\n    }\n\n    protected int sp2px(float sp) {\n        final float scale = this.mContext.getResources().getDisplayMetrics().scaledDensity;\n        return (int) (sp * scale + 0.5f);\n    }\n\n}"
  },
  {
    "path": "app/src/main/java/sunger/net/org/dropmenu/tab/listener/CustomTabEntity.java",
    "content": "package sunger.net.org.dropmenu.tab.listener;\n\nimport android.view.View;\nimport android.view.ViewGroup;\n\npublic interface CustomTabEntity {\n    String getTabTitle();\n\n    int getTabSelectedIcon();\n\n    int getTabUnselectedIcon();\n}"
  },
  {
    "path": "app/src/main/java/sunger/net/org/dropmenu/tab/listener/OnTabSelectListener.java",
    "content": "package sunger.net.org.dropmenu.tab.listener;\n\npublic interface OnTabSelectListener {\n    void onTabSelect(int position);\n    void onTabReselect(int position);\n}"
  },
  {
    "path": "app/src/main/java/sunger/net/org/dropmenu/tab/utils/FragmentChangeManager.java",
    "content": "package sunger.net.org.dropmenu.tab.utils;\n\nimport android.support.v4.app.Fragment;\nimport android.support.v4.app.FragmentManager;\nimport android.support.v4.app.FragmentTransaction;\n\nimport java.util.ArrayList;\n\npublic class FragmentChangeManager {\n    private FragmentManager mFragmentManager;\n    private int mContainerViewId;\n    /** Fragment切换数组 */\n    private ArrayList<Fragment> mFragments;\n    /** 当前选中的Tab */\n    private int mCurrentTab;\n\n    public FragmentChangeManager(FragmentManager fm, int containerViewId, ArrayList<Fragment> fragments) {\n        this.mFragmentManager = fm;\n        this.mContainerViewId = containerViewId;\n        this.mFragments = fragments;\n        initFragments();\n    }\n\n    /** 初始化fragments */\n    private void initFragments() {\n        for (Fragment fragment : mFragments) {\n            mFragmentManager.beginTransaction().add(mContainerViewId, fragment).hide(fragment).commit();\n        }\n\n        setFragments(0);\n    }\n\n    /** 界面切换控制 */\n    public void setFragments(int index) {\n        for (int i = 0; i < mFragments.size(); i++) {\n            FragmentTransaction ft = mFragmentManager.beginTransaction();\n            Fragment fragment = mFragments.get(i);\n            if (i == index) {\n                ft.show(fragment);\n            } else {\n                ft.hide(fragment);\n            }\n            ft.commit();\n        }\n        mCurrentTab = index;\n    }\n\n    public int getCurrentTab() {\n        return mCurrentTab;\n    }\n\n    public Fragment getCurrentFragment() {\n        return mFragments.get(mCurrentTab);\n    }\n}"
  },
  {
    "path": "app/src/main/java/sunger/net/org/dropmenu/tab/utils/UnreadMsgUtils.java",
    "content": "package sunger.net.org.dropmenu.tab.utils;\n\n\nimport android.util.DisplayMetrics;\nimport android.view.View;\nimport android.widget.RelativeLayout;\n\nimport sunger.net.org.dropmenu.tab.widget.MsgView;\n\n\n/**\n * 未读消息提示View,显示小红点或者带有数字的红点:\n * 数字一位,圆\n * 数字两位,圆角矩形,圆角是高度的一半\n * 数字超过两位,显示99+\n */\npublic class UnreadMsgUtils {\n    public static void show(MsgView msgView, int num) {\n        if (msgView == null) {\n            return;\n        }\n        RelativeLayout.LayoutParams lp = (RelativeLayout.LayoutParams) msgView.getLayoutParams();\n        DisplayMetrics dm = msgView.getResources().getDisplayMetrics();\n        msgView.setVisibility(View.VISIBLE);\n        if (num <= 0) {//圆点,设置默认宽高\n            msgView.setStrokeWidth(0);\n            msgView.setText(\"\");\n\n            lp.width = (int) (5 * dm.density);\n            lp.height = (int) (5 * dm.density);\n            msgView.setLayoutParams(lp);\n        } else {\n            lp.height = (int) (18 * dm.density);\n            if (num > 0 && num < 10) {//圆\n                lp.width = (int) (18 * dm.density);\n                msgView.setText(num + \"\");\n            } else if (num > 9 && num < 100) {//圆角矩形,圆角是高度的一半,设置默认padding\n                lp.width = RelativeLayout.LayoutParams.WRAP_CONTENT;\n                msgView.setPadding((int) (6 * dm.density), 0, (int) (6 * dm.density), 0);\n                msgView.setText(num + \"\");\n            } else {//数字超过两位,显示99+\n                lp.width = RelativeLayout.LayoutParams.WRAP_CONTENT;\n                msgView.setPadding((int) (6 * dm.density), 0, (int) (6 * dm.density), 0);\n                msgView.setText(\"99+\");\n            }\n            msgView.setLayoutParams(lp);\n        }\n    }\n\n    public static void setSize(MsgView rtv, int size) {\n        if (rtv == null) {\n            return;\n        }\n        RelativeLayout.LayoutParams lp = (RelativeLayout.LayoutParams) rtv.getLayoutParams();\n        lp.width = size;\n        lp.height = size;\n        rtv.setLayoutParams(lp);\n    }\n}\n"
  },
  {
    "path": "app/src/main/java/sunger/net/org/dropmenu/tab/widget/MsgView.java",
    "content": "package sunger.net.org.dropmenu.tab.widget;\n\nimport android.content.Context;\nimport android.content.res.TypedArray;\nimport android.graphics.Color;\nimport android.graphics.drawable.GradientDrawable;\nimport android.graphics.drawable.StateListDrawable;\nimport android.os.Build;\nimport android.util.AttributeSet;\nimport android.widget.TextView;\n\nimport sunger.net.org.dropmenu.R;\n\n\n/** 用于需要圆角矩形框背景的TextView的情况,减少直接使用TextView时引入的shape资源文件 */\npublic class MsgView extends TextView {\n    private Context context;\n    private GradientDrawable gd_background = new GradientDrawable();\n    private int backgroundColor;\n    private int cornerRadius;\n    private int strokeWidth;\n    private int strokeColor;\n    private boolean isRadiusHalfHeight;\n    private boolean isWidthHeightEqual;\n\n    public MsgView(Context context) {\n        this(context, null);\n    }\n\n    public MsgView(Context context, AttributeSet attrs) {\n        this(context, attrs, 0);\n    }\n\n    public MsgView(Context context, AttributeSet attrs, int defStyleAttr) {\n        super(context, attrs, defStyleAttr);\n        this.context = context;\n        obtainAttributes(context, attrs);\n    }\n\n    private void obtainAttributes(Context context, AttributeSet attrs) {\n        TypedArray ta = context.obtainStyledAttributes(attrs, R.styleable.MsgView);\n        backgroundColor = ta.getColor(R.styleable.MsgView_mv_backgroundColor, Color.TRANSPARENT);\n        cornerRadius = ta.getDimensionPixelSize(R.styleable.MsgView_mv_cornerRadius, 0);\n        strokeWidth = ta.getDimensionPixelSize(R.styleable.MsgView_mv_strokeWidth, 0);\n        strokeColor = ta.getColor(R.styleable.MsgView_mv_strokeColor, Color.TRANSPARENT);\n        isRadiusHalfHeight = ta.getBoolean(R.styleable.MsgView_mv_isRadiusHalfHeight, false);\n        isWidthHeightEqual = ta.getBoolean(R.styleable.MsgView_mv_isWidthHeightEqual, false);\n\n        ta.recycle();\n    }\n\n    @Override\n    protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {\n        if (isWidthHeightEqual() && getWidth() > 0 && getHeight() > 0) {\n            int max = Math.max(getWidth(), getHeight());\n            int measureSpec = MeasureSpec.makeMeasureSpec(max, MeasureSpec.EXACTLY);\n            super.onMeasure(measureSpec, measureSpec);\n            return;\n        }\n\n        super.onMeasure(widthMeasureSpec, heightMeasureSpec);\n    }\n\n    @Override\n    protected void onLayout(boolean changed, int left, int top, int right, int bottom) {\n        super.onLayout(changed, left, top, right, bottom);\n        if (isRadiusHalfHeight()) {\n            setCornerRadius(getHeight() / 2);\n        } else {\n            setBgSelector();\n        }\n    }\n\n\n    public void setBackgroundColor(int backgroundColor) {\n        this.backgroundColor = backgroundColor;\n        setBgSelector();\n    }\n\n    public void setCornerRadius(int cornerRadius) {\n        this.cornerRadius = dp2px(cornerRadius);\n        setBgSelector();\n    }\n\n    public void setStrokeWidth(int strokeWidth) {\n        this.strokeWidth = dp2px(strokeWidth);\n        setBgSelector();\n    }\n\n    public void setStrokeColor(int strokeColor) {\n        this.strokeColor = strokeColor;\n        setBgSelector();\n    }\n\n    public void setIsRadiusHalfHeight(boolean isRadiusHalfHeight) {\n        this.isRadiusHalfHeight = isRadiusHalfHeight;\n        setBgSelector();\n    }\n\n    public void setIsWidthHeightEqual(boolean isWidthHeightEqual) {\n        this.isWidthHeightEqual = isWidthHeightEqual;\n        setBgSelector();\n    }\n\n    public int getBackgroundColor() {\n        return backgroundColor;\n    }\n\n    public int getCornerRadius() {\n        return cornerRadius;\n    }\n\n    public int getStrokeWidth() {\n        return strokeWidth;\n    }\n\n    public int getStrokeColor() {\n        return strokeColor;\n    }\n\n    public boolean isRadiusHalfHeight() {\n        return isRadiusHalfHeight;\n    }\n\n    public boolean isWidthHeightEqual() {\n        return isWidthHeightEqual;\n    }\n\n    protected int dp2px(float dp) {\n        final float scale = context.getResources().getDisplayMetrics().density;\n        return (int) (dp * scale + 0.5f);\n    }\n\n    protected int sp2px(float sp) {\n        final float scale = this.context.getResources().getDisplayMetrics().scaledDensity;\n        return (int) (sp * scale + 0.5f);\n    }\n\n    private void setDrawable(GradientDrawable gd, int color, int strokeColor) {\n        gd.setColor(color);\n        gd.setCornerRadius(cornerRadius);\n        gd.setStroke(strokeWidth, strokeColor);\n    }\n\n    public void setBgSelector() {\n        StateListDrawable bg = new StateListDrawable();\n\n        setDrawable(gd_background, backgroundColor, strokeColor);\n        bg.addState(new int[]{-android.R.attr.state_pressed}, gd_background);\n\n        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {//16\n            setBackground(bg);\n        } else {\n            //noinspection deprecation\n            setBackgroundDrawable(bg);\n        }\n    }\n}\n"
  },
  {
    "path": "app/src/main/res/drawable/check_bg.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<shape xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <corners android:radius=\"2dp\"/>\n    <stroke android:width=\"1dp\" android:color=\"@color/drop_down_selected\"/>\n    <solid android:color=\"@color/white\"/>\n\n</shape>"
  },
  {
    "path": "app/src/main/res/drawable/uncheck_bg.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<shape xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <corners android:radius=\"2dp\"/>\n    <stroke android:width=\"1dp\" android:color=\"@color/gray\"/>\n    <solid android:color=\"@color/white\"/>\n\n</shape>"
  },
  {
    "path": "app/src/main/res/layout/activity_main.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n     xmlns:tl=\"http://schemas.android.com/apk/res-auto\"\n     android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    android:orientation=\"vertical\"\n    >\n\n    <sunger.net.org.dropmenu.tab.CommonTabLayout\n        android:id=\"@+id/tabs\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"48dp\"\n        android:background=\"#ffffff\"\n         tl:tl_iconGravity=\"LEFT\"\n        tl:tl_iconHeight=\"18dp\"\n        tl:tl_iconMargin=\"5dp\"\n        tl:tl_iconWidth=\"18dp\"\n        tl:tl_tab_space_equal=\"true\"\n        tl:tl_textSelectColor=\"#ff8500\"\n        tl:tl_textUnselectColor=\"#4f4f4f\"\n        tl:tl_textsize=\"14sp\" />\n    <View\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"2dp\"\n        android:background=\"#edeeef\"></View>\n    <include layout=\"@layout/content_main\" />\n\n\n</LinearLayout>\n"
  },
  {
    "path": "app/src/main/res/layout/content_main.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<org.net.sunger.widget.DropDownLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n     xmlns:tools=\"http://schemas.android.com/tools\"\n    android:id=\"@+id/dropdown\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n     tools:showIn=\"@layout/activity_main\">\n\n    <RelativeLayout\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"match_parent\"\n        android:background=\"#fff\"\n        >\n\n        <android.support.v7.widget.RecyclerView\n            android:id=\"@+id/recyclerView\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"match_parent\"\n             ></android.support.v7.widget.RecyclerView>\n    </RelativeLayout>\n\n     <org.net.sunger.widget.MaskView\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"match_parent\"\n        android:background=\"#88838685\" />\n\n\n    <org.net.sunger.widget.MenuLayout\n        android:id=\"@+id/menuLayout\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:background=\"#fff\"></org.net.sunger.widget.MenuLayout>\n\n\n</org.net.sunger.widget.DropDownLayout>\n"
  },
  {
    "path": "app/src/main/res/layout/item_default_drop_down.xml",
    "content": "<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n              xmlns:tools=\"http://schemas.android.com/tools\"\n              android:layout_width=\"match_parent\"\n              android:layout_height=\"match_parent\"\n              android:background=\"@color/white\"\n              android:orientation=\"vertical\"\n              tools:context=\"com.car.cslm.widget.drop_down_menu.DefaultDropDownAdapter\">\n\n    <TextView\n        android:id=\"@+id/text\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:paddingBottom=\"10dp\"\n        android:gravity=\"center\"\n        android:paddingLeft=\"25dp\"\n        android:paddingRight=\"25dp\"\n        android:paddingTop=\"10dp\"\n        />\n\n    <View\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"0.5dp\"\n        android:background=\"@color/gray\"/>\n\n</LinearLayout>\n"
  },
  {
    "path": "app/src/main/res/layout/layout_tab.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<RelativeLayout\n    xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    android:clipChildren=\"false\"\n    android:clipToPadding=\"false\">\n\n    <TextView\n        android:id=\"@+id/tv_tab_title\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:layout_centerInParent=\"true\"\n        android:gravity=\"center\"\n        android:singleLine=\"true\"/>\n\n    <com.flyco.tablayout.widget.MsgView\n        android:id=\"@+id/rtv_msg_tip\"\n        xmlns:mv=\"http://schemas.android.com/apk/res-auto\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:gravity=\"center\"\n        android:textColor=\"#ffffff\"\n        android:textSize=\"11.5sp\"\n        android:visibility=\"gone\"\n        mv:mv_backgroundColor=\"#FD481F\"\n        mv:mv_isRadiusHalfHeight=\"true\"\n        mv:mv_strokeColor=\"#ffffff\"\n        mv:mv_strokeWidth=\"1dp\"/>\n\n</RelativeLayout>"
  },
  {
    "path": "app/src/main/res/layout/layout_tab_bottom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<RelativeLayout\n    xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    android:clipChildren=\"false\"\n    android:clipToPadding=\"false\">\n\n    <LinearLayout\n        android:id=\"@+id/ll_tap\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:layout_centerInParent=\"true\"\n        android:gravity=\"center\"\n        android:orientation=\"vertical\">\n\n        <TextView\n            android:id=\"@+id/tv_tab_title\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:singleLine=\"true\"/>\n\n        <ImageView\n            android:id=\"@+id/iv_tab_icon\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"/>\n\n    </LinearLayout>\n\n    <com.flyco.tablayout.widget.MsgView\n        android:id=\"@+id/rtv_msg_tip\"\n        xmlns:mv=\"http://schemas.android.com/apk/res-auto\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:layout_toRightOf=\"@+id/ll_tap\"\n        android:gravity=\"center\"\n        android:textColor=\"#ffffff\"\n        android:textSize=\"11.5sp\"\n        android:visibility=\"gone\"\n        mv:mv_backgroundColor=\"#FD481F\"\n        mv:mv_isRadiusHalfHeight=\"true\"\n        mv:mv_strokeColor=\"#ffffff\"\n        mv:mv_strokeWidth=\"1dp\"/>\n\n</RelativeLayout>"
  },
  {
    "path": "app/src/main/res/layout/layout_tab_left.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<RelativeLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    android:clipChildren=\"false\"\n    android:clipToPadding=\"false\">\n\n    <LinearLayout\n        android:id=\"@+id/ll_tap\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"match_parent\"\n        android:layout_centerInParent=\"true\"\n        android:gravity=\"center\"\n        android:orientation=\"horizontal\">\n\n        <ImageView\n            android:id=\"@+id/iv_tab_icon\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\" />\n\n        <TextView\n            android:id=\"@+id/tv_tab_title\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:singleLine=\"true\" />\n\n\n    </LinearLayout>\n\n\n    <sunger.net.org.dropmenu.tab.widget.MsgView xmlns:mv=\"http://schemas.android.com/apk/res-auto\"\n        android:id=\"@+id/rtv_msg_tip\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:layout_toRightOf=\"@+id/ll_tap\"\n        android:gravity=\"center\"\n        android:textColor=\"#ffffff\"\n        android:textSize=\"11.5sp\"\n        android:visibility=\"gone\"\n        mv:mv_backgroundColor=\"#FD481F\"\n        mv:mv_isRadiusHalfHeight=\"true\"\n        mv:mv_strokeColor=\"#ffffff\"\n        mv:mv_strokeWidth=\"1dp\" />\n\n    <View\n        android:layout_alignParentRight=\"true\"\n        android:layout_width=\"1dp\"\n        android:layout_height=\"match_parent\"\n        android:layout_marginBottom=\"2dp\"\n        android:layout_marginTop=\"2dp\"\n        android:background=\"#f0f0f0\"></View>\n\n</RelativeLayout>"
  },
  {
    "path": "app/src/main/res/layout/layout_tab_right.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<RelativeLayout\n    xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    android:clipChildren=\"false\"\n    android:clipToPadding=\"false\">\n\n    <LinearLayout\n        android:id=\"@+id/ll_tap\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:layout_centerInParent=\"true\"\n        android:gravity=\"center\"\n        android:orientation=\"horizontal\">\n\n        <TextView\n            android:id=\"@+id/tv_tab_title\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:singleLine=\"true\"/>\n\n        <ImageView\n            android:id=\"@+id/iv_tab_icon\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"/>\n\n    </LinearLayout>\n\n    <sunger.net.org.dropmenu.tab.widget.MsgView\n        android:id=\"@+id/rtv_msg_tip\"\n        xmlns:mv=\"http://schemas.android.com/apk/res-auto\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:layout_toRightOf=\"@+id/ll_tap\"\n        android:gravity=\"center\"\n        android:textColor=\"#ffffff\"\n        android:textSize=\"11.5sp\"\n        android:visibility=\"gone\"\n        mv:mv_backgroundColor=\"#FD481F\"\n        mv:mv_isRadiusHalfHeight=\"true\"\n        mv:mv_strokeColor=\"#ffffff\"\n        mv:mv_strokeWidth=\"1dp\"/>\n\n</RelativeLayout>"
  },
  {
    "path": "app/src/main/res/layout/layout_tab_segment.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<RelativeLayout\n    xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    android:clipChildren=\"false\"\n    android:clipToPadding=\"false\">\n\n    <LinearLayout\n        android:id=\"@+id/ll_tap\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:layout_centerInParent=\"true\"\n        android:gravity=\"center\"\n        android:orientation=\"horizontal\">\n\n        <TextView\n            android:id=\"@+id/tv_tab_title\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:singleLine=\"true\"/>\n    </LinearLayout>\n\n    <sunger.net.org.dropmenu.tab.widget.MsgView\n        android:layout_toRightOf=\"@+id/ll_tap\"\n        android:id=\"@+id/rtv_msg_tip\"\n        xmlns:mv=\"http://schemas.android.com/apk/res-auto\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:gravity=\"center\"\n        android:textColor=\"#ffffff\"\n        android:textSize=\"11.5sp\"\n        android:visibility=\"gone\"\n        mv:mv_backgroundColor=\"#FD481F\"\n        mv:mv_isRadiusHalfHeight=\"true\"\n        mv:mv_strokeColor=\"#ffffff\"\n        mv:mv_strokeWidth=\"1dp\"/>\n\n</RelativeLayout>"
  },
  {
    "path": "app/src/main/res/layout/layout_tab_top.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<RelativeLayout\n    xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    android:clipChildren=\"false\"\n    android:clipToPadding=\"false\">\n\n    <LinearLayout\n        android:id=\"@+id/ll_tap\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:layout_centerInParent=\"true\"\n        android:gravity=\"center\"\n        android:orientation=\"vertical\">\n\n        <ImageView\n            android:id=\"@+id/iv_tab_icon\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"/>\n\n        <TextView\n            android:id=\"@+id/tv_tab_title\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:singleLine=\"true\"/>\n    </LinearLayout>\n\n    <sunger.net.org.dropmenu.tab.widget.MsgView\n        android:id=\"@+id/rtv_msg_tip\"\n        xmlns:mv=\"http://schemas.android.com/apk/res-auto\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:layout_toRightOf=\"@+id/ll_tap\"\n        android:gravity=\"center\"\n        android:textColor=\"#ffffff\"\n        android:textSize=\"11.5sp\"\n        android:visibility=\"gone\"\n        mv:mv_backgroundColor=\"#FD481F\"\n        mv:mv_isRadiusHalfHeight=\"true\"\n        mv:mv_strokeColor=\"#ffffff\"\n        mv:mv_strokeWidth=\"1dp\"/>\n\n</RelativeLayout>"
  },
  {
    "path": "app/src/main/res/menu/menu_main.xml",
    "content": "<menu xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:app=\"http://schemas.android.com/apk/res-auto\"\n    xmlns:tools=\"http://schemas.android.com/tools\"\n    tools:context=\"sunger.net.org.dropmenu.MainActivity\">\n    <item\n        android:id=\"@+id/action_settings\"\n        android:orderInCategory=\"100\"\n        android:title=\"@string/action_settings\"\n        app:showAsAction=\"never\" />\n</menu>\n"
  },
  {
    "path": "app/src/main/res/values/attrs.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n    <!-- indicator -->\n    <!-- 设置显示器颜色 -->\n    <attr name=\"tl_indicator_color\" format=\"color\"/>\n    <!-- 设置显示器高度 -->\n    <attr name=\"tl_indicator_height\" format=\"dimension\"/>\n    <!-- 设置显示器固定宽度 -->\n    <attr name=\"tl_indicator_width\" format=\"dimension\"/>\n    <!-- 设置显示器margin,当indicator_width大于0,无效 -->\n    <attr name=\"tl_indicator_margin_left\" format=\"dimension\"/>\n    <attr name=\"tl_indicator_margin_top\" format=\"dimension\"/>\n    <attr name=\"tl_indicator_margin_right\" format=\"dimension\"/>\n    <attr name=\"tl_indicator_margin_bottom\" format=\"dimension\"/>\n    <!-- 设置显示器圆角弧度-->\n    <attr name=\"tl_indicator_corner_radius\" format=\"dimension\"/>\n    <!-- 设置显示器上方还是下方,只对圆角矩形有用-->\n    <attr name=\"tl_indicator_gravity\" format=\"enum\">\n        <enum name=\"TOP\" value=\"48\"/>\n        <enum name=\"BOTTOM\" value=\"80\"/>\n    </attr>\n    <!-- 设置显示器为常规|三角形|背景色块|-->\n    <attr name=\"tl_indicator_style\" format=\"enum\">\n        <enum name=\"NORMAL\" value=\"0\"/>\n        <enum name=\"TRIANGLE\" value=\"1\"/>\n        <enum name=\"BLOCK\" value=\"2\"/>\n    </attr>\n    <!-- 设置显示器长度与title一样长,只有在STYLE_NORMAL并且indicatorWidth小于零有效-->\n    <attr name=\"tl_indicator_width_equal_title\" format=\"boolean\"/>\n    <!-- 设置显示器支持动画-->\n    <attr name=\"tl_indicator_anim_enable\" format=\"boolean\"/>\n    <!-- 设置显示器动画时间-->\n    <attr name=\"tl_indicator_anim_duration\" format=\"integer\"/>\n    <!-- 设置显示器支持动画回弹效果-->\n    <attr name=\"tl_indicator_bounce_enable\" format=\"boolean\"/>\n\n    <!-- underline -->\n    <!-- 设置下划线颜色 -->\n    <attr name=\"tl_underline_color\" format=\"color\"/>\n    <!-- 设置下划线高度 -->\n    <attr name=\"tl_underline_height\" format=\"dimension\"/>\n    <!-- 设置下划线上方还是下方-->\n    <attr name=\"tl_underline_gravity\" format=\"enum\">\n        <enum name=\"TOP\" value=\"48\"/>\n        <enum name=\"BOTTOM\" value=\"80\"/>\n    </attr>\n\n    <!-- divider -->\n    <!-- 设置分割线颜色 -->\n    <attr name=\"tl_divider_color\" format=\"color\"/>\n    <!-- 设置分割线宽度 -->\n    <attr name=\"tl_divider_width\" format=\"dimension\"/>\n    <!-- 设置分割线的paddingTop和paddingBottom -->\n    <attr name=\"tl_divider_padding\" format=\"dimension\"/>\n\n    <!-- tab -->\n    <!-- 设置tab的paddingLeft和paddingRight -->\n    <attr name=\"tl_tab_padding\" format=\"dimension\"/>\n    <!-- 设置tab大小等分 -->\n    <attr name=\"tl_tab_space_equal\" format=\"boolean\"/>\n    <!-- 设置tab固定大小 -->\n    <attr name=\"tl_tab_width\" format=\"dimension\"/>\n\n    <!-- title -->\n    <!-- 设置字体大小 -->\n    <attr name=\"tl_textsize\" format=\"dimension\"/>\n    <!-- 设置字体选中颜色 -->\n    <attr name=\"tl_textSelectColor\" format=\"color\"/>\n    <!-- 设置字体未选中颜色 -->\n    <attr name=\"tl_textUnselectColor\" format=\"color\"/>\n    <!-- 设置字体加粗 -->\n    <attr name=\"tl_textBold\" format=\"boolean\"/>\n    <!-- 设置字体全大写 -->\n    <attr name=\"tl_textAllCaps\" format=\"boolean\"/>\n\n\n\n    <declare-styleable name=\"CommonTabLayout\">\n        <!-- indicator -->\n        <attr name=\"tl_indicator_color\"/>\n        <attr name=\"tl_indicator_height\"/>\n        <attr name=\"tl_indicator_width\"/>\n        <attr name=\"tl_indicator_margin_left\"/>\n        <attr name=\"tl_indicator_margin_top\"/>\n        <attr name=\"tl_indicator_margin_right\"/>\n        <attr name=\"tl_indicator_margin_bottom\"/>\n        <attr name=\"tl_indicator_corner_radius\"/>\n        <attr name=\"tl_indicator_gravity\"/>\n        <attr name=\"tl_indicator_style\"/>\n        <attr name=\"tl_indicator_anim_enable\"/>\n        <attr name=\"tl_indicator_anim_duration\"/>\n        <attr name=\"tl_indicator_bounce_enable\"/>\n\n        <!-- underline -->\n        <attr name=\"tl_underline_color\"/>\n        <attr name=\"tl_underline_height\"/>\n        <attr name=\"tl_underline_gravity\"/>\n\n        <!-- divider -->\n        <attr name=\"tl_divider_color\"/>\n        <attr name=\"tl_divider_width\"/>\n        <attr name=\"tl_divider_padding\"/>\n\n        <!-- tab -->\n        <attr name=\"tl_tab_padding\"/>\n        <attr name=\"tl_tab_space_equal\"/>\n        <attr name=\"tl_tab_width\"/>\n\n        <!-- title -->\n        <attr name=\"tl_textsize\"/>\n        <attr name=\"tl_textSelectColor\"/>\n        <attr name=\"tl_textUnselectColor\"/>\n        <attr name=\"tl_textBold\"/>\n        <attr name=\"tl_textAllCaps\"/>\n\n        <!-- icon -->\n        <!-- 设置icon宽度 -->\n        <attr name=\"tl_iconWidth\" format=\"dimension\"/>\n        <!-- 设置icon高度 -->\n        <attr name=\"tl_iconHeight\" format=\"dimension\"/>\n        <!-- 设置icon是否可见 -->\n        <attr name=\"tl_iconVisible\" format=\"boolean\"/>\n        <!-- 设置icon显示位置,对应Gravity中常量值 -->\n        <attr name=\"tl_iconGravity\" format=\"enum\">\n            <enum name=\"LEFT\" value=\"3\"/>\n            <enum name=\"TOP\" value=\"48\"/>\n            <enum name=\"RIGHT\" value=\"5\"/>\n            <enum name=\"BOTTOM\" value=\"80\"/>\n        </attr>\n        <!-- 设置icon与文字间距 -->\n        <attr name=\"tl_iconMargin\" format=\"dimension\"/>\n        <attr name=\"lineVertical\" format=\"boolean\"/>\n\n    </declare-styleable>\n\n    <declare-styleable name=\"MsgView\">\n        <!-- 圆角矩形背景色 -->\n        <attr name=\"mv_backgroundColor\" format=\"color\"/>\n        <!-- 圆角弧度,单位dp-->\n        <attr name=\"mv_cornerRadius\" format=\"dimension\"/>\n        <!-- 圆角弧度,单位dp-->\n        <attr name=\"mv_strokeWidth\" format=\"dimension\"/>\n        <!-- 圆角边框颜色-->\n        <attr name=\"mv_strokeColor\" format=\"color\"/>\n        <!-- 圆角弧度是高度一半-->\n        <attr name=\"mv_isRadiusHalfHeight\" format=\"boolean\"/>\n        <!-- 圆角矩形宽高相等,取较宽高中大值-->\n        <attr name=\"mv_isWidthHeightEqual\" format=\"boolean\"/>\n    </declare-styleable>\n</resources>"
  },
  {
    "path": "app/src/main/res/values/colors.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n    <color name=\"colorPrimary\">#3F51B5</color>\n    <color name=\"colorPrimaryDark\">#303F9F</color>\n    <color name=\"colorAccent\">#FF4081</color>\n    <color name=\"white\">#ffffff</color>\n    <color name=\"gray\">#cccccc</color>\n\n    <color name=\"drop_down_selected\">#ff8500</color>\n    <color name=\"drop_down_unselected\">#111111</color>\n\n    <color name=\"mask_color\">#88888888</color>\n    <color name=\"check_bg\">#f2f2f2</color>\n </resources>\n"
  },
  {
    "path": "app/src/main/res/values/dimens.xml",
    "content": "<resources>\n    <!-- Default screen margins, per the Android Design guidelines. -->\n    <dimen name=\"activity_horizontal_margin\">16dp</dimen>\n    <dimen name=\"activity_vertical_margin\">16dp</dimen>\n    <dimen name=\"fab_margin\">16dp</dimen>\n</resources>\n"
  },
  {
    "path": "app/src/main/res/values/strings.xml",
    "content": "<resources>\n    <string name=\"app_name\">dropmenu</string>\n    <string name=\"action_settings\">Settings</string>\n</resources>\n"
  },
  {
    "path": "app/src/main/res/values/styles.xml",
    "content": "<resources>\n\n    <style name=\"AppTheme\" parent=\"Theme.AppCompat.Light.DarkActionBar\">\n     </style>\n</resources>\n"
  },
  {
    "path": "app/src/main/res/values-w820dp/dimens.xml",
    "content": "<resources>\n    <!-- Example customization of dimensions originally defined in res/values/dimens.xml\n         (such as screen margins) for screens with more than 820dp of available width. This\n         would include 7\" and 10\" devices in landscape (~960dp and ~1280dp respectively). -->\n    <dimen name=\"activity_horizontal_margin\">64dp</dimen>\n</resources>\n"
  },
  {
    "path": "app/src/test/java/sunger/net/org/dropmenu/ExampleUnitTest.java",
    "content": "package sunger.net.org.dropmenu;\n\nimport org.junit.Test;\n\nimport static org.junit.Assert.*;\n\n/**\n * To work on unit tests, switch the Test Artifact in the Build Variants view.\n */\npublic class ExampleUnitTest {\n    @Test\n    public void addition_isCorrect() throws Exception {\n        assertEquals(4, 2 + 2);\n    }\n}"
  },
  {
    "path": "build.gradle",
    "content": "// Top-level build file where you can add configuration options common to all sub-projects/modules.\n\nbuildscript {\n    repositories {\n        jcenter()\n    }\n    dependencies {\n        classpath 'com.android.tools.build:gradle:1.5.0'\n\n    }\n}\n\nallprojects {\n    repositories {\n        jcenter()\n    }\n}\n\ntask clean(type: Delete) {\n    delete rootProject.buildDir\n}\n"
  },
  {
    "path": "dropdownlayout/.gitignore",
    "content": "/build\n"
  },
  {
    "path": "dropdownlayout/build.gradle",
    "content": "apply plugin: 'com.android.library'\napply plugin: 'com.novoda.bintray-release'\nandroid {\n    compileSdkVersion 23\n    buildToolsVersion \"23.0.3\"\n\n    defaultConfig {\n        minSdkVersion 15\n        targetSdkVersion 23\n        versionCode 1\n        versionName \"1.0\"\n    }\n    buildTypes {\n        release {\n            minifyEnabled false\n            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'\n        }\n    }\n}\nbuildscript {\n    repositories {\n        jcenter()\n    }\n    dependencies {\n        classpath 'com.novoda:bintray-release:0.3.4'\n    }\n}\n\ndependencies {\n    compile fileTree(dir: 'libs', include: ['*.jar'])\n    testCompile 'junit:junit:4.12'\n    compile 'com.android.support:appcompat-v7:23.3.0'\n}\npublish {\n    userOrg = 'sunger'\n    groupId = 'org.sunger.widget.dropdownlayout'\n    artifactId = 'dropdownlayout'\n    publishVersion = '0.0.1'\n    desc = 'Oh hi, this is a nice description for a project, right?'\n    website = 'https://github.com/sungerk'\n}"
  },
  {
    "path": "dropdownlayout/proguard-rules.pro",
    "content": "# Add project specific ProGuard rules here.\n# By default, the flags in this file are appended to flags specified\n# in /Users/sunger/android/sdk/tools/proguard/proguard-android.txt\n# You can edit the include path and order by changing the proguardFiles\n# directive in build.gradle.\n#\n# For more details, see\n#   http://developer.android.com/guide/developing/tools/proguard.html\n\n# Add any project specific keep options here:\n\n# If your project uses WebView with JS, uncomment the following\n# and specify the fully qualified class name to the JavaScript interface\n# class:\n#-keepclassmembers class fqcn.of.javascript.interface.for.webview {\n#   public *;\n#}\n"
  },
  {
    "path": "dropdownlayout/src/androidTest/java/net/org/sunger/dropdownlayout/ApplicationTest.java",
    "content": "package net.org.sunger.dropdownlayout;\n\nimport android.app.Application;\nimport android.test.ApplicationTestCase;\n\n/**\n * <a href=\"http://d.android.com/tools/testing/testing_android.html\">Testing Fundamentals</a>\n */\npublic class ApplicationTest extends ApplicationTestCase<Application> {\n    public ApplicationTest() {\n        super(Application.class);\n    }\n}"
  },
  {
    "path": "dropdownlayout/src/main/AndroidManifest.xml",
    "content": "<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    package=\"net.org.sunger.dropdownlayout\">\n\n    <application\n        android:allowBackup=\"true\"\n        android:label=\"@string/app_name\"\n        android:supportsRtl=\"true\">\n\n    </application>\n\n</manifest>\n"
  },
  {
    "path": "dropdownlayout/src/main/java/org/net/sunger/widget/DropDownLayout.java",
    "content": "package org.net.sunger.widget;\n\nimport android.annotation.TargetApi;\nimport android.content.Context;\nimport android.os.Build;\nimport android.util.AttributeSet;\nimport android.view.View;\nimport android.view.ViewTreeObserver;\nimport android.widget.FrameLayout;\n\n/**\n * Created by sunger on 16/4/16.\n */\npublic class DropDownLayout extends FrameLayout implements ViewTreeObserver.OnGlobalLayoutListener {\n\n    private MaskView mMaskView;\n    private MenuLayout mMenuLayout;\n\n    public DropDownLayout(Context context) {\n        this(context, null);\n    }\n\n    public DropDownLayout(Context context, AttributeSet attrs) {\n        this(context, attrs, 0);\n    }\n\n    public DropDownLayout(Context context, AttributeSet attrs, int defStyleAttr) {\n        this(context, attrs, defStyleAttr, 0);\n    }\n\n    @TargetApi(Build.VERSION_CODES.LOLLIPOP)\n    public DropDownLayout(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) {\n        super(context, attrs, defStyleAttr, defStyleRes);\n        getViewTreeObserver().addOnGlobalLayoutListener(this);\n    }\n\n    private void findChildView() {\n        for (int i = 0; i < getChildCount(); i++) {\n            if (mMaskView!=null&&mMenuLayout!=null)\n                break;\n            View childItem = getChildAt(i);\n            if (childItem instanceof MaskView) {\n                mMaskView = (MaskView) childItem;\n            } else if (childItem instanceof MenuLayout) {\n                mMenuLayout = (MenuLayout) childItem;\n            }\n        }\n    }\n    @Override\n    public void onGlobalLayout() {\n        findChildView();\n        if (mMaskView == null || mMenuLayout == null) {\n            throw new IllegalArgumentException(\"you layout must be contain  MaskView MenuLayout\");\n        }\n\n        if (Build.VERSION.SDK_INT < 16) {\n            removeLayoutListenerPre16();\n        } else {\n            removeLayoutListenerPost16();\n        }\n        mMenuLayout.setVisibility(GONE);\n        mMaskView.setVisibility(GONE);\n        mMaskView.setOnClickListener(new OnClickListener() {\n            @Override\n            public void onClick(View v) {\n                closeMenu();\n            }\n        });\n\n    }\n\n    @SuppressWarnings(\"deprecation\")\n    private void removeLayoutListenerPre16() {\n        getViewTreeObserver().removeGlobalOnLayoutListener(this);\n    }\n\n    @TargetApi(16)\n    private void removeLayoutListenerPost16() {\n        getViewTreeObserver().removeOnGlobalLayoutListener(this);\n    }\n\n\n    public void showMenuAt(int position) {\n        if (!mMenuLayout.isShow()) {\n            mMaskView.show();\n            mMenuLayout.show();\n        }\n        mMenuLayout.setCurrentItem(position);\n    }\n\n    public void closeMenu() {\n        mMaskView.dissMiss();\n        mMenuLayout.dissMiss();\n    }\n}\n"
  },
  {
    "path": "dropdownlayout/src/main/java/org/net/sunger/widget/MaskView.java",
    "content": "package org.net.sunger.widget;\n\nimport android.annotation.TargetApi;\nimport android.content.Context;\nimport android.os.Build;\nimport android.util.AttributeSet;\nimport android.view.View;\n\n/**\n * Created by sunger on 16/4/16.\n */\npublic class MaskView extends View {\n    public MaskView(Context context) {\n        this(context, null);\n    }\n\n    public MaskView(Context context, AttributeSet attrs) {\n        this(context, attrs, 0);\n    }\n\n    public MaskView(Context context, AttributeSet attrs, int defStyleAttr) {\n        this(context, attrs, defStyleAttr, 0);\n    }\n\n    @TargetApi(Build.VERSION_CODES.LOLLIPOP)\n    public MaskView(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) {\n        super(context, attrs, defStyleAttr, defStyleRes);\n    }\n\n\n    public void show() {\n        setVisibility(VISIBLE);\n     }\n\n    public void dissMiss() {\n        setVisibility(GONE);\n     }\n\n}\n"
  },
  {
    "path": "dropdownlayout/src/main/java/org/net/sunger/widget/MenuLayout.java",
    "content": "package org.net.sunger.widget;\n\nimport android.annotation.TargetApi;\nimport android.content.Context;\nimport android.os.Build;\nimport android.support.v4.app.Fragment;\nimport android.support.v4.app.FragmentManager;\nimport android.support.v4.app.FragmentTransaction;\nimport android.util.AttributeSet;\nimport android.view.animation.Animation;\nimport android.view.animation.AnimationUtils;\nimport android.widget.RelativeLayout;\n\nimport net.org.sunger.dropdownlayout.R;\n\nimport java.util.List;\n\n/**\n * Created by sunger on 16/4/16.\n */\npublic class MenuLayout extends RelativeLayout {\n    private Animation animationIn;\n    private Animation animationOut;\n    private FragmentManager fragmentManager;\n    private List<Fragment> fragments;\n    private int currentItem = 0;\n\n    public MenuLayout(Context context, AttributeSet attrs) {\n        this(context, attrs, 0);\n    }\n\n    public MenuLayout(Context context) {\n        this(context, null);\n    }\n\n    public MenuLayout(Context context, AttributeSet attrs, int defStyleAttr) {\n        this(context, attrs, defStyleAttr, 0);\n    }\n\n    @TargetApi(Build.VERSION_CODES.LOLLIPOP)\n    public MenuLayout(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) {\n        super(context, attrs, defStyleAttr, defStyleRes);\n        setClickable(true);\n    }\n\n    public void setFragmentManager(FragmentManager fragmentManager) {\n        this.fragmentManager = fragmentManager;\n    }\n\n    private int getMenuId() {\n        if (getId() == NO_ID) {\n            setId(R.id.menu_id);\n        }\n        return getId();\n    }\n\n    private void hideLastFragment(FragmentTransaction transaction) {\n        for (int i = 0; i < fragments.size(); i++) {\n            if (i != currentItem || !fragments.get(i).isHidden()) {\n                transaction.hide(fragments.get(i));\n            }\n        }\n    }\n\n    public void setCurrentItem(int position) {\n        currentItem = position;\n        FragmentTransaction transaction = fragmentManager.beginTransaction();\n        hideLastFragment(transaction);\n        transaction.show(fragments.get(position));\n        transaction.commit();\n    }\n\n\n    public void bindFragments(List<Fragment> fragmentList) {\n        this.fragments = fragmentList;\n        FragmentTransaction transaction = fragmentManager.beginTransaction();\n        for (Fragment frg : fragments) {\n            transaction.add(getMenuId(), frg);\n        }\n        transaction.commit();\n    }\n\n\n\n    public void show() {\n        if (animationIn == null) {\n            animationIn = AnimationUtils.loadAnimation(getContext(), R.anim.menu_in);\n        }\n        setVisibility(VISIBLE);\n        setAnimation(animationIn);\n        animationIn.start();\n    }\n\n    public void dissMiss() {\n        if (animationOut == null) {\n            animationOut = AnimationUtils.loadAnimation(getContext(), R.anim.menu_out);\n        }\n        setVisibility(GONE);\n        setAnimation(animationOut);\n        animationOut.start();\n    }\n\n\n    public Animation getAnimationIn() {\n        return animationIn;\n    }\n\n    public void setAnimationIn(Animation animationIn) {\n        this.animationIn = animationIn;\n    }\n\n    public void setAnimationIn(int animationInResid) {\n        this.animationIn = AnimationUtils.loadAnimation(getContext(), animationInResid);\n    }\n\n    public Animation getAnimationOut() {\n        return animationOut;\n    }\n\n    public void setAnimationOut(Animation animationOut) {\n        this.animationOut = animationOut;\n    }\n\n    public void setAnimationOut(int animationOutResId) {\n        this.animationOut = AnimationUtils.loadAnimation(getContext(), animationOutResId);\n    }\n\n\n    public boolean isShow() {\n        return getVisibility() == VISIBLE;\n    }\n\n\n}\n"
  },
  {
    "path": "dropdownlayout/src/main/res/anim/menu_in.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<set xmlns:android=\"http://schemas.android.com/apk/res/android\">\n\n    <translate\n        android:duration=\"300\"\n        android:fromYDelta=\"-100%p\"\n        android:toYDelta=\"0\" />\n</set>"
  },
  {
    "path": "dropdownlayout/src/main/res/anim/menu_out.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<set xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <translate\n        android:duration=\"300\"\n        android:fromYDelta=\"0\"\n        android:toYDelta=\"-100%p\" />\n</set>"
  },
  {
    "path": "dropdownlayout/src/main/res/values/ids.xml",
    "content": "<resources>\n     <item type=\"id\" name=\"menu_id\" />\n</resources>\n"
  },
  {
    "path": "dropdownlayout/src/main/res/values/strings.xml",
    "content": "<resources>\n    <string name=\"app_name\">DropDownLayout</string>\n</resources>\n"
  },
  {
    "path": "dropdownlayout/src/test/java/net/org/sunger/dropdownlayout/ExampleUnitTest.java",
    "content": "package net.org.sunger.dropdownlayout;\n\nimport org.junit.Test;\n\nimport static org.junit.Assert.*;\n\n/**\n * To work on unit tests, switch the Test Artifact in the Build Variants view.\n */\npublic class ExampleUnitTest {\n    @Test\n    public void addition_isCorrect() throws Exception {\n        assertEquals(4, 2 + 2);\n    }\n}"
  },
  {
    "path": "gradle/wrapper/gradle-wrapper.properties",
    "content": "#Wed Oct 21 11:34:03 PDT 2015\ndistributionBase=GRADLE_USER_HOME\ndistributionPath=wrapper/dists\nzipStoreBase=GRADLE_USER_HOME\nzipStorePath=wrapper/dists\ndistributionUrl=https\\://services.gradle.org/distributions/gradle-2.8-all.zip\n"
  },
  {
    "path": "gradle.properties",
    "content": "# Project-wide Gradle settings.\n\n# IDE (e.g. Android Studio) users:\n# Gradle settings configured through the IDE *will override*\n# any settings specified in this file.\n\n# For more details on how to configure your build environment visit\n# http://www.gradle.org/docs/current/userguide/build_environment.html\n\n# Specifies the JVM arguments used for the daemon process.\n# The setting is particularly useful for tweaking memory settings.\n# Default value: -Xmx10248m -XX:MaxPermSize=256m\n# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8\n\n# When configured, Gradle will run in incubating parallel mode.\n# This option should only be used with decoupled projects. More details, visit\n# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects\n# org.gradle.parallel=true"
  },
  {
    "path": "gradlew",
    "content": "#!/usr/bin/env bash\n\n##############################################################################\n##\n##  Gradle start up script for UN*X\n##\n##############################################################################\n\n# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.\nDEFAULT_JVM_OPTS=\"\"\n\nAPP_NAME=\"Gradle\"\nAPP_BASE_NAME=`basename \"$0\"`\n\n# Use the maximum available, or set MAX_FD != -1 to use that value.\nMAX_FD=\"maximum\"\n\nwarn ( ) {\n    echo \"$*\"\n}\n\ndie ( ) {\n    echo\n    echo \"$*\"\n    echo\n    exit 1\n}\n\n# OS specific support (must be 'true' or 'false').\ncygwin=false\nmsys=false\ndarwin=false\ncase \"`uname`\" in\n  CYGWIN* )\n    cygwin=true\n    ;;\n  Darwin* )\n    darwin=true\n    ;;\n  MINGW* )\n    msys=true\n    ;;\nesac\n\n# Attempt to set APP_HOME\n# Resolve links: $0 may be a link\nPRG=\"$0\"\n# Need this for relative symlinks.\nwhile [ -h \"$PRG\" ] ; do\n    ls=`ls -ld \"$PRG\"`\n    link=`expr \"$ls\" : '.*-> \\(.*\\)$'`\n    if expr \"$link\" : '/.*' > /dev/null; then\n        PRG=\"$link\"\n    else\n        PRG=`dirname \"$PRG\"`\"/$link\"\n    fi\ndone\nSAVED=\"`pwd`\"\ncd \"`dirname \\\"$PRG\\\"`/\" >/dev/null\nAPP_HOME=\"`pwd -P`\"\ncd \"$SAVED\" >/dev/null\n\nCLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar\n\n# Determine the Java command to use to start the JVM.\nif [ -n \"$JAVA_HOME\" ] ; then\n    if [ -x \"$JAVA_HOME/jre/sh/java\" ] ; then\n        # IBM's JDK on AIX uses strange locations for the executables\n        JAVACMD=\"$JAVA_HOME/jre/sh/java\"\n    else\n        JAVACMD=\"$JAVA_HOME/bin/java\"\n    fi\n    if [ ! -x \"$JAVACMD\" ] ; then\n        die \"ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME\n\nPlease set the JAVA_HOME variable in your environment to match the\nlocation of your Java installation.\"\n    fi\nelse\n    JAVACMD=\"java\"\n    which java >/dev/null 2>&1 || die \"ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.\n\nPlease set the JAVA_HOME variable in your environment to match the\nlocation of your Java installation.\"\nfi\n\n# Increase the maximum file descriptors if we can.\nif [ \"$cygwin\" = \"false\" -a \"$darwin\" = \"false\" ] ; then\n    MAX_FD_LIMIT=`ulimit -H -n`\n    if [ $? -eq 0 ] ; then\n        if [ \"$MAX_FD\" = \"maximum\" -o \"$MAX_FD\" = \"max\" ] ; then\n            MAX_FD=\"$MAX_FD_LIMIT\"\n        fi\n        ulimit -n $MAX_FD\n        if [ $? -ne 0 ] ; then\n            warn \"Could not set maximum file descriptor limit: $MAX_FD\"\n        fi\n    else\n        warn \"Could not query maximum file descriptor limit: $MAX_FD_LIMIT\"\n    fi\nfi\n\n# For Darwin, add options to specify how the application appears in the dock\nif $darwin; then\n    GRADLE_OPTS=\"$GRADLE_OPTS \\\"-Xdock:name=$APP_NAME\\\" \\\"-Xdock:icon=$APP_HOME/media/gradle.icns\\\"\"\nfi\n\n# For Cygwin, switch paths to Windows format before running java\nif $cygwin ; then\n    APP_HOME=`cygpath --path --mixed \"$APP_HOME\"`\n    CLASSPATH=`cygpath --path --mixed \"$CLASSPATH\"`\n    JAVACMD=`cygpath --unix \"$JAVACMD\"`\n\n    # We build the pattern for arguments to be converted via cygpath\n    ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`\n    SEP=\"\"\n    for dir in $ROOTDIRSRAW ; do\n        ROOTDIRS=\"$ROOTDIRS$SEP$dir\"\n        SEP=\"|\"\n    done\n    OURCYGPATTERN=\"(^($ROOTDIRS))\"\n    # Add a user-defined pattern to the cygpath arguments\n    if [ \"$GRADLE_CYGPATTERN\" != \"\" ] ; then\n        OURCYGPATTERN=\"$OURCYGPATTERN|($GRADLE_CYGPATTERN)\"\n    fi\n    # Now convert the arguments - kludge to limit ourselves to /bin/sh\n    i=0\n    for arg in \"$@\" ; do\n        CHECK=`echo \"$arg\"|egrep -c \"$OURCYGPATTERN\" -`\n        CHECK2=`echo \"$arg\"|egrep -c \"^-\"`                                 ### Determine if an option\n\n        if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then                    ### Added a condition\n            eval `echo args$i`=`cygpath --path --ignore --mixed \"$arg\"`\n        else\n            eval `echo args$i`=\"\\\"$arg\\\"\"\n        fi\n        i=$((i+1))\n    done\n    case $i in\n        (0) set -- ;;\n        (1) set -- \"$args0\" ;;\n        (2) set -- \"$args0\" \"$args1\" ;;\n        (3) set -- \"$args0\" \"$args1\" \"$args2\" ;;\n        (4) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" ;;\n        (5) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" \"$args4\" ;;\n        (6) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" \"$args4\" \"$args5\" ;;\n        (7) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" \"$args4\" \"$args5\" \"$args6\" ;;\n        (8) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" \"$args4\" \"$args5\" \"$args6\" \"$args7\" ;;\n        (9) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" \"$args4\" \"$args5\" \"$args6\" \"$args7\" \"$args8\" ;;\n    esac\nfi\n\n# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules\nfunction splitJvmOpts() {\n    JVM_OPTS=(\"$@\")\n}\neval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS\nJVM_OPTS[${#JVM_OPTS[*]}]=\"-Dorg.gradle.appname=$APP_BASE_NAME\"\n\nexec \"$JAVACMD\" \"${JVM_OPTS[@]}\" -classpath \"$CLASSPATH\" org.gradle.wrapper.GradleWrapperMain \"$@\"\n"
  },
  {
    "path": "gradlew.bat",
    "content": "@if \"%DEBUG%\" == \"\" @echo off\n@rem ##########################################################################\n@rem\n@rem  Gradle startup script for Windows\n@rem\n@rem ##########################################################################\n\n@rem Set local scope for the variables with windows NT shell\nif \"%OS%\"==\"Windows_NT\" setlocal\n\n@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.\nset DEFAULT_JVM_OPTS=\n\nset DIRNAME=%~dp0\nif \"%DIRNAME%\" == \"\" set DIRNAME=.\nset APP_BASE_NAME=%~n0\nset APP_HOME=%DIRNAME%\n\n@rem Find java.exe\nif defined JAVA_HOME goto findJavaFromJavaHome\n\nset JAVA_EXE=java.exe\n%JAVA_EXE% -version >NUL 2>&1\nif \"%ERRORLEVEL%\" == \"0\" goto init\n\necho.\necho ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.\necho.\necho Please set the JAVA_HOME variable in your environment to match the\necho location of your Java installation.\n\ngoto fail\n\n:findJavaFromJavaHome\nset JAVA_HOME=%JAVA_HOME:\"=%\nset JAVA_EXE=%JAVA_HOME%/bin/java.exe\n\nif exist \"%JAVA_EXE%\" goto init\n\necho.\necho ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%\necho.\necho Please set the JAVA_HOME variable in your environment to match the\necho location of your Java installation.\n\ngoto fail\n\n:init\n@rem Get command-line arguments, handling Windowz variants\n\nif not \"%OS%\" == \"Windows_NT\" goto win9xME_args\nif \"%@eval[2+2]\" == \"4\" goto 4NT_args\n\n:win9xME_args\n@rem Slurp the command line arguments.\nset CMD_LINE_ARGS=\nset _SKIP=2\n\n:win9xME_args_slurp\nif \"x%~1\" == \"x\" goto execute\n\nset CMD_LINE_ARGS=%*\ngoto execute\n\n:4NT_args\n@rem Get arguments from the 4NT Shell from JP Software\nset CMD_LINE_ARGS=%$\n\n:execute\n@rem Setup the command line\n\nset CLASSPATH=%APP_HOME%\\gradle\\wrapper\\gradle-wrapper.jar\n\n@rem Execute Gradle\n\"%JAVA_EXE%\" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% \"-Dorg.gradle.appname=%APP_BASE_NAME%\" -classpath \"%CLASSPATH%\" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%\n\n:end\n@rem End local scope for the variables with windows NT shell\nif \"%ERRORLEVEL%\"==\"0\" goto mainEnd\n\n:fail\nrem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of\nrem the _cmd.exe /c_ return code!\nif  not \"\" == \"%GRADLE_EXIT_CONSOLE%\" exit 1\nexit /b 1\n\n:mainEnd\nif \"%OS%\"==\"Windows_NT\" endlocal\n\n:omega\n"
  },
  {
    "path": "settings.gradle",
    "content": "include ':app', ':DropDownLayout'\n"
  }
]