一个更好的 DropDownMenu 解决方案, 完整的筛选器解决方案
This is a DropDownMenu with the advantage of all the dropDownMenus by others before, I have written it for several times, Now the code is most clearly.
##Feature
getView() method to supply the wantted view.Checkable, so you can use selector to respond to all user action.toString() you will get the url.##ScreenShot
the xml:
the JavaCode:
//set the Adapter.
dropDownView.setMenuAdapter(new DropMenuAdapter(this, titleList));the DropMenuAdapter:
@Override
public int getMenuCount() {
return titles.length;
}
@Override
public String getMenuTitle(int position) {
return titles[position];
}
@Override
public int getBottomMargin(int position) {
return 0;
}
@Override
public View getView(int position, FrameLayout parentContainer) {
...
return createSingleListView();
}add a SingleListView:
…Copyright (C) 2016 zhe zhu
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.暂无开放 Issues,或尚未同步最近议题。