[Android] Specify the information message during the scan

Alexandre Perraud git at videolan.org
Tue Oct 2 16:26:47 CEST 2012


vlc-ports/android | branch: master | Alexandre Perraud <4leyx4ndre at gmail.com> | Tue Oct  2 11:57:12 2012 +0200| [53a01610325979d17e5f06d218dc8d0b0dfae63f] | committer: Jean-Baptiste Kempf

Specify the information message during the scan

    and correct vocabulary in a FIXME comment for a previous commit

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

 vlc-android/res/layout/video_list.xml              |   55 +++++++++++++++-----
 vlc-android/res/values-fr/strings.xml              |    1 +
 vlc-android/res/values/strings.xml                 |    6 ++-
 .../videolan/vlc/gui/video/VideoListFragment.java  |   10 ++--
 .../vlc/gui/video/VideoPlayerActivity.java         |    5 +-
 5 files changed, 57 insertions(+), 20 deletions(-)

diff --git a/vlc-android/res/layout/video_list.xml b/vlc-android/res/layout/video_list.xml
index 80e017e..18f4c1b 100644
--- a/vlc-android/res/layout/video_list.xml
+++ b/vlc-android/res/layout/video_list.xml
@@ -27,27 +27,58 @@
             android:textSize="20dip"
             android:visibility="visible" />
 
-        <ViewFlipper
-            android:id="@+id/flipper_loading"
+        <LinearLayout
+            android:id="@+id/layout_flipper_loading"
             android:layout_width="fill_parent"
-            android:layout_height="wrap_content"
-            android:autoStart="true"
-            android:flipInterval="1000"
+            android:layout_height="fill_parent"
+            android:orientation="horizontal"
             android:visibility="invisible" >
 
             <TextView
-                android:layout_width="fill_parent"
+                android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
-                android:gravity="center_horizontal"
+                android:layout_weight="1"
+                android:gravity="right"
                 android:text="@string/loadmedia"
                 android:textSize="20dip" />
 
-            <TextView
-                android:layout_width="fill_parent"
+            <ViewFlipper
+                android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
-                android:gravity="center_horizontal"
-                android:text="" />
-        </ViewFlipper>
+                android:layout_weight="1"
+                android:layout_gravity="left"
+                android:autoStart="true"
+                android:flipInterval="1000" >
+
+                <TextView
+                    android:layout_width="fill_parent"
+                    android:layout_height="wrap_content"
+                    android:layout_gravity="left"
+                    android:text="@string/load_no_period"
+                    android:textSize="20dip" />
+
+                <TextView
+                    android:layout_width="fill_parent"
+                    android:layout_height="wrap_content"
+                    android:layout_gravity="left"
+                    android:text="@string/load_1_period"
+                    android:textSize="20dip" />
+
+                <TextView
+                    android:layout_width="fill_parent"
+                    android:layout_height="wrap_content"
+                    android:layout_gravity="left"
+                    android:text="@string/load_2_period"
+                    android:textSize="20dip" />
+
+                <TextView
+                    android:layout_width="fill_parent"
+                    android:layout_height="wrap_content"
+                    android:layout_gravity="left"
+                    android:text="@string/load_3_period"
+                    android:textSize="20dip" />
+            </ViewFlipper>
+        </LinearLayout>
     </LinearLayout>
 
 </FrameLayout>
\ No newline at end of file
diff --git a/vlc-android/res/values-fr/strings.xml b/vlc-android/res/values-fr/strings.xml
index 0cf9593..f15e3d7 100644
--- a/vlc-android/res/values-fr/strings.xml
+++ b/vlc-android/res/values-fr/strings.xml
@@ -63,6 +63,7 @@
     <string name="directories">Répertoires</string>
     <string name="loading">Chargement…</string>
     <string name="nomedia">Pas de fichiers multimédia</string>
+    <string name="loadmedia">Chargement</string>
     <string name="mediafiles">Fichiers multimédia</string>
     <string name="notavailable">Non disponible</string>
     <string name="nosubdirectory">Pas de sous-répertoires</string>
diff --git a/vlc-android/res/values/strings.xml b/vlc-android/res/values/strings.xml
index 18d56e7..ad04fa5 100644
--- a/vlc-android/res/values/strings.xml
+++ b/vlc-android/res/values/strings.xml
@@ -65,7 +65,11 @@
     <string name="loading">Loading…</string>
     <string name="please_wait">Please wait…</string>
     <string name="nomedia">No media files found, please transfer files to your device or adjust your preferences.</string>
-    <string name="loadmedia">Loading...</string>
+    <string name="loadmedia">Loading</string>
+    <string name="load_no_period"></string>
+    <string name="load_1_period">.</string>
+    <string name="load_2_period">..</string>
+    <string name="load_3_period">...</string>
     <string name="mediafiles">Media files</string>
     <string name="notavailable">not available</string>
     <string name="nosubdirectory">No subdirectories.</string>
diff --git a/vlc-android/src/org/videolan/vlc/gui/video/VideoListFragment.java b/vlc-android/src/org/videolan/vlc/gui/video/VideoListFragment.java
index 8492f93..b058585 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoListFragment.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoListFragment.java
@@ -54,9 +54,9 @@ import android.view.MenuItem;
 import android.view.View;
 import android.view.ViewGroup;
 import android.widget.AdapterView.AdapterContextMenuInfo;
+import android.widget.LinearLayout;
 import android.widget.ListView;
 import android.widget.TextView;
-import android.widget.ViewFlipper;
 
 import com.actionbarsherlock.app.SherlockListFragment;
 
@@ -65,7 +65,7 @@ public class VideoListFragment extends SherlockListFragment implements ISortable
     protected static final String ACTION_SCAN_START = "org.videolan.vlc.gui.ScanStart";
     protected static final String ACTION_SCAN_STOP = "org.videolan.vlc.gui.ScanStop";
 
-    protected ViewFlipper mFlipperViewLoading;
+    protected LinearLayout mLayoutFlipperLoading;
     protected TextView mTextViewNomedia;
 
     public final static String TAG = "VLC/VideoListFragment";
@@ -101,7 +101,7 @@ public class VideoListFragment extends SherlockListFragment implements ISortable
         View v = inflater.inflate(R.layout.video_list, container, false);
 
         // init the information for the scan (1/2)
-        mFlipperViewLoading = (ViewFlipper) v.findViewById(R.id.flipper_loading);
+        mLayoutFlipperLoading = (LinearLayout) v.findViewById(R.id.layout_flipper_loading);
         mTextViewNomedia = (TextView) v.findViewById(R.id.textview_nomedia);
 
         return v;
@@ -297,10 +297,10 @@ public class VideoListFragment extends SherlockListFragment implements ISortable
             String action = intent.getAction();
 
             if (action.equalsIgnoreCase(ACTION_SCAN_START)) {
-                mFlipperViewLoading.setVisibility(View.VISIBLE);
+                mLayoutFlipperLoading.setVisibility(View.VISIBLE);
                 mTextViewNomedia.setVisibility(View.INVISIBLE);
             } else if (action.equalsIgnoreCase(ACTION_SCAN_STOP)) {
-                mFlipperViewLoading.setVisibility(View.INVISIBLE);
+                mLayoutFlipperLoading.setVisibility(View.INVISIBLE);
                 mTextViewNomedia.setVisibility(View.VISIBLE);
             }
         }
diff --git a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
index 6fc0e61..b8dad9e 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
@@ -212,8 +212,8 @@ public class VideoPlayerActivity extends Activity {
             public void onScrollStarted() {
                 showOverlay(OVERLAY_INFINITE);
                 /*FIXME
-                 * The setTracksAndSubtitles function probably doesn't work in case of many many Tracks and Subtitles
-                 * Moreover, in a video flux, if Tracks & Subtitles change, they won't be updated
+                 * The setTracksAndSubtitles method probably doesn't work in case of many many Tracks and Subtitles
+                 * Moreover, in a video stream, if Tracks & Subtitles change, they won't be updated
                  */
                 setTracksAndSubtitles();
             }
@@ -1103,6 +1103,7 @@ public class VideoPlayerActivity extends Activity {
         updateOverlayPausePlay();
     }
 
+
     /**
      * hider overlay
      */



More information about the Android mailing list