Skip to content

Commit

Permalink
Remove unnecessary suppresion and refactor addMenuItems()
Browse files Browse the repository at this point in the history
  • Loading branch information
rubensousa committed Mar 1, 2016
1 parent 410897a commit 5d7b27e
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,6 @@ public BottomSheetBuilder setItemBackground(@DrawableRes int background) {
return this;
}

@SuppressLint("InflateParams")
public View createView() {

if (mCoordinatorLayout == null) {
Expand Down Expand Up @@ -235,13 +234,11 @@ public void run() {

private List<BottomSheetItem> addMenuItems() {
List<BottomSheetItem> items = new ArrayList<>();
SupportMenuInflater menuInflater = new SupportMenuInflater(mContext);

Menu menu;

if (mMenu == null) {
menu = new MenuBuilder(mContext);
menuInflater.inflate(mMenuRes, menu);
new SupportMenuInflater(mContext).inflate(mMenuRes, menu);
} else {
menu = mMenu;
}
Expand Down

0 comments on commit 5d7b27e

Please sign in to comment.