DropDownMenu
DropDownMenu for Android,filter the list based on multiple condition.
To get this project into your build
Step 1. Add the specific repository to your build file:
repositories {
maven {
url "https://jitpack.io"
}
}
Step 2. Add the dependency in your build file (do not forget to specify the correct qualifier, usually 'aar'):
dependencies {
compile 'com.github.JayFang1993:DropDownMenu:v0.9'
}
That's it! Provided by?Android Arsenal
Usage
<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.8.17
1.???onDraw???new??????
2.?????????
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
- Blog: https://fangjie.me/
- Email: [email protected]
- Twitter:@ jayfang1993
- Weibo:@ ??
Remark
if you use this library?please tell me your App?thanks?
License
Copyright 2015 JayFang, Inc. Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.