1379312ec6d3e517f8bb8fcf2e9876b42f9495df3Alan Viverette/*
2379312ec6d3e517f8bb8fcf2e9876b42f9495df3Alan Viverette * Copyright (C) 2013 The Android Open Source Project
3379312ec6d3e517f8bb8fcf2e9876b42f9495df3Alan Viverette *
4379312ec6d3e517f8bb8fcf2e9876b42f9495df3Alan Viverette * Licensed under the Apache License, Version 2.0 (the "License");
5379312ec6d3e517f8bb8fcf2e9876b42f9495df3Alan Viverette * you may not use this file except in compliance with the License.
6379312ec6d3e517f8bb8fcf2e9876b42f9495df3Alan Viverette * You may obtain a copy of the License at
7379312ec6d3e517f8bb8fcf2e9876b42f9495df3Alan Viverette *
8379312ec6d3e517f8bb8fcf2e9876b42f9495df3Alan Viverette *      http://www.apache.org/licenses/LICENSE-2.0
9379312ec6d3e517f8bb8fcf2e9876b42f9495df3Alan Viverette *
10379312ec6d3e517f8bb8fcf2e9876b42f9495df3Alan Viverette * Unless required by applicable law or agreed to in writing, software
11379312ec6d3e517f8bb8fcf2e9876b42f9495df3Alan Viverette * distributed under the License is distributed on an "AS IS" BASIS,
12379312ec6d3e517f8bb8fcf2e9876b42f9495df3Alan Viverette * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13379312ec6d3e517f8bb8fcf2e9876b42f9495df3Alan Viverette * See the License for the specific language governing permissions and
14379312ec6d3e517f8bb8fcf2e9876b42f9495df3Alan Viverette * limitations under the License.
15379312ec6d3e517f8bb8fcf2e9876b42f9495df3Alan Viverette */
16379312ec6d3e517f8bb8fcf2e9876b42f9495df3Alan Viverette
17379312ec6d3e517f8bb8fcf2e9876b42f9495df3Alan Viverettepackage android.support.v4.widget;
18379312ec6d3e517f8bb8fcf2e9876b42f9495df3Alan Viverette
19379312ec6d3e517f8bb8fcf2e9876b42f9495df3Alan Viveretteimport android.view.View.OnTouchListener;
20379312ec6d3e517f8bb8fcf2e9876b42f9495df3Alan Viveretteimport android.widget.PopupMenu;
21379312ec6d3e517f8bb8fcf2e9876b42f9495df3Alan Viverette
22379312ec6d3e517f8bb8fcf2e9876b42f9495df3Alan Viverette/**
23379312ec6d3e517f8bb8fcf2e9876b42f9495df3Alan Viverette * Implementation of PopupMenu compatibility that can call KitKat APIs.
24379312ec6d3e517f8bb8fcf2e9876b42f9495df3Alan Viverette */
25379312ec6d3e517f8bb8fcf2e9876b42f9495df3Alan Viveretteclass PopupMenuCompatKitKat {
26379312ec6d3e517f8bb8fcf2e9876b42f9495df3Alan Viverette    public static OnTouchListener getDragToOpenListener(Object popupMenu) {
27379312ec6d3e517f8bb8fcf2e9876b42f9495df3Alan Viverette        return ((PopupMenu) popupMenu).getDragToOpenListener();
28379312ec6d3e517f8bb8fcf2e9876b42f9495df3Alan Viverette    }
29379312ec6d3e517f8bb8fcf2e9876b42f9495df3Alan Viverette}
30