Alexandre Lision | a8b7872 | 2013-12-13 10:18:33 -0500 | [diff] [blame] | 1 | /* |
Alexandre Lision | c1024c0 | 2014-01-06 11:12:53 -0500 | [diff] [blame] | 2 | * Copyright (C) 2004-2014 Savoir-Faire Linux Inc. |
Alexandre Lision | a8b7872 | 2013-12-13 10:18:33 -0500 | [diff] [blame] | 3 | * |
| 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 Lision | 064e1e0 | 2013-10-01 16:18:42 -0400 | [diff] [blame] | 32 | package org.sflphone.views; |
| 33 | |
| 34 | import org.sflphone.fragments.CallFragment; |
Adrien Béraud | c9c424d | 2013-05-30 17:47:35 +1000 | [diff] [blame] | 35 | |
| 36 | import android.content.Context; |
| 37 | import android.support.v4.widget.SlidingPaneLayout; |
| 38 | import android.util.AttributeSet; |
| 39 | import android.view.MotionEvent; |
| 40 | |
Adrien Béraud | c9c424d | 2013-05-30 17:47:35 +1000 | [diff] [blame] | 41 | public class CallPaneLayout extends SlidingPaneLayout |
| 42 | { |
alision | 58356b7 | 2013-06-03 17:13:36 -0400 | [diff] [blame] | 43 | private CallFragment curFragment = null; |
Adrien Béraud | c9c424d | 2013-05-30 17:47:35 +1000 | [diff] [blame] | 44 | |
alision | 58356b7 | 2013-06-03 17:13:36 -0400 | [diff] [blame] | 45 | 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éraud | c9c424d | 2013-05-30 17:47:35 +1000 | [diff] [blame] | 54 | { |
| 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 Lision | f1850c0 | 2013-09-23 14:19:34 -0400 | [diff] [blame] | 69 | |
Alexandre Lision | 666b377 | 2013-10-28 17:42:48 -0400 | [diff] [blame] | 70 | // return false; |
| 71 | return super.onInterceptTouchEvent(event); |
Adrien Béraud | c9c424d | 2013-05-30 17:47:35 +1000 | [diff] [blame] | 72 | } |
| 73 | |
| 74 | } |