From fb80ee7c3ee61d442a237c79f85fc13472e3e932 Mon Sep 17 00:00:00 2001 From: Jay Date: Thu, 23 Jul 2015 18:03:44 +0800 Subject: [PATCH] update readme --- README.md | 72 +++++++++++++++++++++++++++++++++---------------------- 1 file changed, 44 insertions(+), 28 deletions(-) diff --git a/README.md b/README.md index 136ba0e..4912f65 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,7 @@ DropDownMenu for Android,Filter the list based on multiple condition. ---------- Step 1. Add the specific repository to your build file: + ``` repositories { maven { @@ -21,7 +22,7 @@ Step 2. Add the dependency in your build file (do not forget to specify the corr ``` dependencies { - compile 'com.github.JayFang1993:DropDownMenu:fe8bd100a0' + compile 'com.github.JayFang1993:DropDownMenu:3e8620dc99' } ``` That's it! @@ -30,35 +31,50 @@ Provided by:Android Arsenal Usage ---- ``` - - - -mMenu=(DropDownMenu)findViewById(R.id.menu); -mMenu.setMenuItems(ArrayList); -mMenu.setMenuCount(3); -mMenu.setShowCount(6); -mMenu.setShowCheck(true); -mMenu.setMenuTitleTextSize(16); -mMenu.setMenuTitleTextColor(Color.BLACK); -mMenu.setMenuListTextSize(16); -mMenu.setMenuListTextColor(Color.BLACK); -mMenu.setMenuBackColor(Color.GRAY); -mMenu.setMenuPressedBackColor(Color.CYAN); -mMenu.setCheckIcon(R.drawable.ico_make); -mMenu.setUpArrow(R.drawable.arrow_up); -mMenu.setDownArrow(R.drawable.arrow_down); -mMenu.setMenuSelectedListener(new OnMenuSelectedListener(){ - @Override - public void onSelected(View listview,int RowIndex, int ColumnIndex) { - - }}); + + + + mMenu=(DropDownMenu)findViewById(R.id.menu); + mMenu.setMenuCount(3);//Menu的个数 + mMenu.setShowCount(6);//Menu展开list数量太多是只显示的个数 + mMenu.setShowCheck(true);//是否显示展开list的选中项 + mMenu.setMenuTitleTextSize(16);//Menu的文字大小 + mMenu.setMenuTitleTextColor(Color.WHITE);//Menu的文字颜色 + mMenu.setMenuListTextSize(16);//Menu展开list的文字大小 + mMenu.setMenuListTextColor(Color.BLACK);//Menu展开list的文字颜色 + mMenu.setMenuBackColor(Color.GRAY);//Menu的背景颜色 + mMenu.setMenuPressedBackColor(Color.WHITE);//Menu按下的背景颜色 + mMenu.setCheckIcon(R.drawable.ico_make);//Menu展开list的勾选图片 + mMenu.setUpArrow(R.drawable.arrow_up);//Menu默认状态的箭头 + mMenu.setDownArrow(R.drawable.arrow_down);//Menu按下状态的箭头 + mMenu.setDefaultMenuTitle(strings);//默认未选择任何过滤的Menu title + mMenu.setMenuSelectedListener(new OnMenuSelectedListener() { + @Override + //Menu展开的list点击事件 RowIndex:list的索引 ColumnIndex:menu的索引 + public void onSelected(View listview, int RowIndex, int ColumnIndex) { + + + } + }); ``` +Update +---- + +### 2015.7.22 +``` + mMenu.setShowDivider(false); //是否显示展开list的分割线 + mMenu.setMenuListBackColor(getResources().getColor(R.color.white));//展开list的背景色 + mMenu.setMenuListSelectorRes(R.color.white);//展开list的listselector + mMenu.setArrowMarginTitle(20);//Menu上箭头图标距title的margin + mMenu.setMenuPressedTitleTextColor(Color.BLACK);//Menu按下状态的title文字颜色 + mMenu.setIsDebug(false);//关闭提醒 +``` Contact ----------