[Android] Remove ContentLinearLayout

Geoffrey Métais git at videolan.org
Thu Oct 29 12:04:23 CET 2015


vlc-ports/android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Wed Oct 28 19:00:54 2015 +0100| [bb2c49abad65b4ba8094f9098b5c8f3ae0967d22] | committer: Geoffrey Métais

Remove ContentLinearLayout

> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=bb2c49abad65b4ba8094f9098b5c8f3ae0967d22
---

 vlc-android/res/layout/main.xml                    |    4 +-
 vlc-android/res/layout/secondary.xml               |    4 +-
 .../videolan/vlc/widget/ContentLinearLayout.java   |   50 --------------------
 3 files changed, 4 insertions(+), 54 deletions(-)

diff --git a/vlc-android/res/layout/main.xml b/vlc-android/res/layout/main.xml
index 9b296e4..873b664 100644
--- a/vlc-android/res/layout/main.xml
+++ b/vlc-android/res/layout/main.xml
@@ -19,7 +19,7 @@
             android:layout_height="match_parent"
             vlc:overhangSize="60dp" >
 
-            <org.videolan.vlc.widget.ContentLinearLayout
+            <LinearLayout
                 android:layout_width="fill_parent"
                 android:layout_height="fill_parent"
                 android:orientation="vertical" >
@@ -67,7 +67,7 @@
                     android:layout_width="fill_parent"
                     android:layout_height="60dp"
                     android:visibility="gone" />
-            </org.videolan.vlc.widget.ContentLinearLayout>
+            </LinearLayout>
 
             <FrameLayout
                 android:id="@+id/audio_player"
diff --git a/vlc-android/res/layout/secondary.xml b/vlc-android/res/layout/secondary.xml
index 98e1440..daca0a5 100644
--- a/vlc-android/res/layout/secondary.xml
+++ b/vlc-android/res/layout/secondary.xml
@@ -9,7 +9,7 @@
         android:layout_height="match_parent"
         vlc:overhangSize="60dp" >
 
-        <org.videolan.vlc.widget.ContentLinearLayout
+        <LinearLayout
             android:layout_width="fill_parent"
             android:layout_height="fill_parent"
             android:orientation="vertical" >
@@ -30,7 +30,7 @@
                 android:layout_width="fill_parent"
                 android:layout_height="60dp"
                 android:visibility="gone" />
-        </org.videolan.vlc.widget.ContentLinearLayout>
+        </LinearLayout>
 
         <FrameLayout
             android:id="@+id/audio_player"
diff --git a/vlc-android/src/org/videolan/vlc/widget/ContentLinearLayout.java b/vlc-android/src/org/videolan/vlc/widget/ContentLinearLayout.java
deleted file mode 100644
index 2c7b88d..0000000
--- a/vlc-android/src/org/videolan/vlc/widget/ContentLinearLayout.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*****************************************************************************
- * ContentLinearLayout.java
- *****************************************************************************
- * Copyright © 2011-2014 VLC authors and VideoLAN
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
- *****************************************************************************/
-package org.videolan.vlc.widget;
-
-import android.content.Context;
-import android.util.AttributeSet;
-import android.view.MotionEvent;
-import android.widget.LinearLayout;
-
-import com.android.widget.SlidingPaneLayout;
-
-
-/**
- * This class extends the linear layout class and override its onInterceptTouchEvent
- * method to intercept the touch events that should not be handled by its children.
- * This is necessary since else the layout children receive events even if the
- * audio player is displayed just under the touch event position.
- */
-public class ContentLinearLayout extends LinearLayout {
-
-    public ContentLinearLayout(Context context, AttributeSet attrs) {
-        super(context, attrs);
-    }
-
-    @Override
-    public boolean onInterceptTouchEvent(MotionEvent ev) {
-        SlidingPaneLayout slidingPaneLayout = (SlidingPaneLayout)getParent();
-        if (slidingPaneLayout.isSecondChildUnder((int)ev.getX(), (int)ev.getY()))
-            return true;
-        else
-            return super.onInterceptTouchEvent(ev);
-    }
-}



More information about the Android mailing list