Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
JayFang1993 committed Jul 23, 2015
1 parent 3e8620d commit fb80ee7
Showing 1 changed file with 44 additions and 28 deletions.
72 changes: 44 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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!
Expand All @@ -30,35 +31,50 @@ Provided by:Android Arsenal
Usage
----
```
<com.jayfang.dropdownmenu.DropDownMenu
android:orientation="horizontal"
android:layout_width="fill_parent"
android:id="@+id/menu"
android:background="@color/ripple_material_dark"
android:layout_height="60dp"/>
mMenu=(DropDownMenu)findViewById(R.id.menu);
mMenu.setMenuItems(ArrayList<String[]>);
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) {
}});
<com.jayfang.dropdownmenu.DropDownMenu
android:orientation="horizontal"
android:layout_width="fill_parent"
android:id="@+id/menu"
android:background="@color/white"
android:layout_height="60dp"/>
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
----------
Expand Down

0 comments on commit fb80ee7

Please sign in to comment.