summaryrefslogtreecommitdiffstats
path: root/src/com/android/gallery3d/ui/PopupList.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/gallery3d/ui/PopupList.java')
-rw-r--r--src/com/android/gallery3d/ui/PopupList.java22
1 files changed, 20 insertions, 2 deletions
diff --git a/src/com/android/gallery3d/ui/PopupList.java b/src/com/android/gallery3d/ui/PopupList.java
index a5fbb09a8..9cd381430 100644
--- a/src/com/android/gallery3d/ui/PopupList.java
+++ b/src/com/android/gallery3d/ui/PopupList.java
@@ -1,4 +1,18 @@
-// Copyright 2012 Google Inc. All Rights Reserved.
+/*
+ * Copyright (C) 2012 The Android Open Source Project
+ *
+ * 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.
+ */
package com.android.gallery3d.ui;
@@ -65,6 +79,10 @@ public class PopupList {
mItems.add(new Item(id, title));
}
+ public void clearItems() {
+ mItems.clear();
+ }
+
private final PopupWindow.OnDismissListener mOnDismissListener =
new PopupWindow.OnDismissListener() {
@SuppressWarnings("deprecation")
@@ -134,7 +152,7 @@ public class PopupList {
}
private PopupWindow createPopupWindow() {
- PopupWindow popup = new PopupWindow();
+ PopupWindow popup = new PopupWindow(mContext);
popup.setOnDismissListener(mOnDismissListener);
popup.setBackgroundDrawable(mContext.getResources().getDrawable(