From 5d7b27e35d7d1044923496b42bf8155196aa8deb Mon Sep 17 00:00:00 2001 From: ruben Date: Tue, 1 Mar 2016 00:17:41 +0000 Subject: [PATCH] Remove unnecessary suppresion and refactor addMenuItems() --- .../rubensousa/bottomsheetbuilder/BottomSheetBuilder.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/library/src/main/java/com/github/rubensousa/bottomsheetbuilder/BottomSheetBuilder.java b/library/src/main/java/com/github/rubensousa/bottomsheetbuilder/BottomSheetBuilder.java index 8800a49..846c1e9 100644 --- a/library/src/main/java/com/github/rubensousa/bottomsheetbuilder/BottomSheetBuilder.java +++ b/library/src/main/java/com/github/rubensousa/bottomsheetbuilder/BottomSheetBuilder.java @@ -142,7 +142,6 @@ public BottomSheetBuilder setItemBackground(@DrawableRes int background) { return this; } - @SuppressLint("InflateParams") public View createView() { if (mCoordinatorLayout == null) { @@ -235,13 +234,11 @@ public void run() { private List addMenuItems() { List 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; }