[Android] Progress layout shown over everything

Geoffrey Métais git at videolan.org
Tue Nov 8 13:47:09 CET 2016


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Tue Nov  8 12:05:45 2016 +0100| [f0614a2423c602d50782b356d0182d252760a54a] | committer: Geoffrey Métais

Progress layout shown over everything

> https://code.videolan.org/videolan/vlc-android/commit/f0614a2423c602d50782b356d0182d252760a54a
---

 vlc-android/res/layout/main.xml                    | 76 ++++++++++------------
 .../src/org/videolan/vlc/gui/MainActivity.java     |  2 -
 2 files changed, 34 insertions(+), 44 deletions(-)

diff --git a/vlc-android/res/layout/main.xml b/vlc-android/res/layout/main.xml
index 5c9f97a..f2cb492 100644
--- a/vlc-android/res/layout/main.xml
+++ b/vlc-android/res/layout/main.xml
@@ -18,48 +18,11 @@
 
             <include layout="@layout/toolbar"/>
 
-            <LinearLayout
-                android:id="@+id/content_container"
-                android:layout_width="fill_parent"
-                android:layout_height="fill_parent"
-                app:layout_behavior="@string/appbar_scrolling_view_behavior"
-                android:orientation="vertical" >
-
-                <FrameLayout
-                    android:id="@+id/fragment_placeholder"
-                    android:layout_width="fill_parent"
-                    android:layout_height="0dp"
-                    android:layout_weight="1" />
-
-                <RelativeLayout
-                    android:id="@+id/info_layout"
-                    android:layout_width="fill_parent"
-                    android:layout_height="20dp"
-                    android:visibility="gone" >
-
-                    <ProgressBar
-                        android:id="@+id/info_progress"
-                        style="?android:attr/progressBarStyleHorizontal"
-                        android:layout_width="fill_parent"
-                        android:layout_height="fill_parent"
-                        android:progressDrawable="@drawable/progress"
-                        android:visibility="gone" />
-
-                    <TextView
-                        android:id="@+id/info_text"
-                        android:layout_width="wrap_content"
-                        android:layout_height="wrap_content"
-                        android:layout_marginLeft="5dip"
-                        android:layout_marginRight="5dip"
-                        android:shadowColor="#CC000000"
-                        android:shadowDx="1"
-                        android:shadowDy="1"
-                        android:shadowRadius="1.5"
-                        android:singleLine="true"
-                        android:textColor="#FFFFFFFF" />
-                </RelativeLayout>
-
-            </LinearLayout>
+            <FrameLayout
+                android:id="@+id/fragment_placeholder"
+                android:layout_width="match_parent"
+                android:layout_height="match_parent"
+                app:layout_behavior="@string/appbar_scrolling_view_behavior" />
 
             <FrameLayout
                 android:id="@+id/audio_player_container"
@@ -73,6 +36,35 @@
                     android:layout_height="fill_parent" />
             </FrameLayout>
 
+            <FrameLayout
+                android:id="@+id/info_layout"
+                android:layout_width="fill_parent"
+                android:layout_height="20dp"
+                android:layout_gravity="bottom"
+                android:visibility="gone" >
+
+                <ProgressBar
+                    android:id="@+id/info_progress"
+                    style="?android:attr/progressBarStyleHorizontal"
+                    android:layout_width="fill_parent"
+                    android:layout_height="fill_parent"
+                    android:progressDrawable="@drawable/progress"
+                    android:visibility="gone" />
+
+                <TextView
+                    android:id="@+id/info_text"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_marginLeft="5dip"
+                    android:layout_marginRight="5dip"
+                    android:shadowColor="#CC000000"
+                    android:shadowDx="1"
+                    android:shadowDy="1"
+                    android:shadowRadius="1.5"
+                    android:singleLine="true"
+                    android:textColor="#FFFFFFFF" />
+            </FrameLayout>
+
             <android.support.design.widget.FloatingActionButton
                 android:id="@+id/fab"
                 android:layout_width="wrap_content"
diff --git a/vlc-android/src/org/videolan/vlc/gui/MainActivity.java b/vlc-android/src/org/videolan/vlc/gui/MainActivity.java
index 19933da..d5a9d3a 100644
--- a/vlc-android/src/org/videolan/vlc/gui/MainActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/MainActivity.java
@@ -798,13 +798,11 @@ public class MainActivity extends AudioPlayerContainerActivity implements Device
             switch (msg.what) {
                 case ACTIVITY_SHOW_INFOLAYOUT:
                     if (ma.mInfoLayout.getVisibility() != View.VISIBLE)
-                        ma.mAppBarLayout.setExpanded(false, true);
                     ma.mInfoLayout.setVisibility(View.VISIBLE);
                     break;
                 case ACTIVITY_HIDE_INFOLAYOUT:
                     removeMessages(ACTIVITY_SHOW_INFOLAYOUT);
                     ma.mInfoLayout.setVisibility(View.GONE);
-                    ma.mAppBarLayout.setExpanded(true, true);
                     break;
                 case ACTIVITY_SHOW_PROGRESSBAR:
                     ma.mInfoProgress.setVisibility(View.VISIBLE);



More information about the Android mailing list