blob: eb53b8e2ab8dd5f21d56fa4b5a27be5af1f21811 [file] [log] [blame]
Alexandre Lisiona8b78722013-12-13 10:18:33 -05001/*
Alexandre Lisionc1024c02014-01-06 11:12:53 -05002 * Copyright (C) 2004-2014 Savoir-Faire Linux Inc.
Alexandre Lisiona8b78722013-12-13 10:18:33 -05003 *
4 * Author: Adrien Beraud <adrien.beraud@gmail.com>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 3 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19 *
20 * Additional permission under GNU GPL version 3 section 7:
21 *
22 * If you modify this program, or any covered work, by linking or
23 * combining it with the OpenSSL project's OpenSSL library (or a
24 * modified version of that library), containing parts covered by the
25 * terms of the OpenSSL or SSLeay licenses, Savoir-Faire Linux Inc.
26 * grants you additional permission to convey the resulting work.
27 * Corresponding Source for a non-source form of such a combination
28 * shall include the source code for the parts of OpenSSL used as well
29 * as that of the covered work.
30 */
31
Alexandre Lision064e1e02013-10-01 16:18:42 -040032package org.sflphone.views;
33
34import org.sflphone.fragments.CallFragment;
Adrien Béraudc9c424d2013-05-30 17:47:35 +100035
36import android.content.Context;
37import android.support.v4.widget.SlidingPaneLayout;
38import android.util.AttributeSet;
39import android.view.MotionEvent;
40
Adrien Béraudc9c424d2013-05-30 17:47:35 +100041public class CallPaneLayout extends SlidingPaneLayout
42{
alision58356b72013-06-03 17:13:36 -040043 private CallFragment curFragment = null;
Adrien Béraudc9c424d2013-05-30 17:47:35 +100044
alision58356b72013-06-03 17:13:36 -040045 public CallFragment getCurFragment() {
46 return curFragment;
47 }
48
49 public void setCurFragment(CallFragment curFragment) {
50 this.curFragment = curFragment;
51 }
52
53 public CallPaneLayout(Context context, AttributeSet attrs)
Adrien Béraudc9c424d2013-05-30 17:47:35 +100054 {
55 super(context, attrs);
56 }
57
58 public CallPaneLayout(Context context, AttributeSet attrs, int defStyle)
59 {
60 super(context, attrs, defStyle);
61 }
62
63 @Override
64 public boolean onInterceptTouchEvent(MotionEvent event)
65 {
66 if(curFragment!=null && curFragment.draggingBubble()) {
67 return false;
68 }
Alexandre Lisionf1850c02013-09-23 14:19:34 -040069
Alexandre Lision666b3772013-10-28 17:42:48 -040070// return false;
71 return super.onInterceptTouchEvent(event);
Adrien Béraudc9c424d2013-05-30 17:47:35 +100072 }
73
74}