[Android] Audio player: remove the qvga layout to prepare for big changes

Adrien Maglo git at videolan.org
Wed Nov 27 14:26:29 CET 2013


vlc-ports/android | branch: master | Adrien Maglo <magsoft at videolan.org> | Tue Nov 26 16:41:29 2013 +0100| [b5c70957255cbf149ca3afd44532a6806b0f83a1] | committer: Adrien Maglo

Audio player: remove the qvga layout to prepare for big changes

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

 vlc-android/res/layout/audio_player_qvga.xml       |  207 --------------------
 .../vlc/gui/audio/AudioPlayerFragment.java         |    6 +-
 2 files changed, 1 insertion(+), 212 deletions(-)

diff --git a/vlc-android/res/layout/audio_player_qvga.xml b/vlc-android/res/layout/audio_player_qvga.xml
deleted file mode 100644
index 67373f3..0000000
--- a/vlc-android/res/layout/audio_player_qvga.xml
+++ /dev/null
@@ -1,207 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<LinearLayout
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    android:orientation="vertical"
-    android:layout_width="fill_parent"
-    android:layout_height="fill_parent"
-    android:background="@drawable/bg_with_shadow">
-
-    <LinearLayout
-        android:layout_width="fill_parent"
-        android:layout_height="0dip"
-        android:layout_weight="1">
-
-        <ImageView
-            android:id="@+id/cover"
-            android:layout_width="0dip"
-            android:layout_height="fill_parent"
-            android:layout_marginLeft="15dip"
-            android:layout_marginTop="15dip"
-            android:layout_weight="1"
-            android:background="#00ffffff"
-            android:contentDescription="@string/cover_art"
-            android:focusable="false" />
-
-        <ImageButton
-            android:src="@drawable/dots"
-            android:background="#00000000"
-            android:id="@+id/adv_function"
-            android:layout_width="35dp"
-            android:layout_height="35dp"
-            android:scaleType="fitXY"
-            android:onClick="showAdvancedOptions" />
-
-        <LinearLayout
-            android:layout_width="90dip"
-            android:layout_height="fill_parent"
-            android:gravity="bottom"
-            android:paddingLeft="15dip"
-            android:orientation="vertical">
-            <ImageButton
-                android:id="@+id/shuffle"
-                android:layout_width="50dip"
-                android:layout_height="50dip"
-                android:layout_marginBottom="-5dip"
-                android:background="@android:color/transparent"
-                android:contentDescription="@string/shuffle"
-                android:focusable="true"
-                android:onClick="onShuffleClick"
-                android:padding="5dip"
-                android:scaleType="fitXY"
-                android:src="@drawable/ic_shuffle" />
-
-            <ImageButton
-                android:id="@+id/repeat"
-                android:layout_width="50dip"
-                android:layout_height="50dip"
-                android:layout_marginBottom="-5dip"
-                android:layout_marginTop="-5dip"
-                android:background="@android:color/transparent"
-                android:contentDescription="@string/repeat"
-                android:focusable="true"
-                android:onClick="onRepeatClick"
-                android:padding="5dip"
-                android:scaleType="fitXY"
-                android:src="@drawable/ic_repeat" />
-        </LinearLayout>
-    </LinearLayout>
-    <LinearLayout
-        android:orientation="horizontal"
-        android:layout_height="wrap_content"
-        android:layout_width="fill_parent"
-        android:layout_marginLeft="15dip"
-        android:layout_marginTop="10dip"
-        android:layout_marginRight="15dip">
-        <TextView
-            android:layout_width="0dip"
-            android:layout_height="wrap_content"
-            android:layout_weight="1"
-            android:textSize="18sp"
-            android:text="@string/time_0"
-            android:textColor="#ffffff"
-            android:id="@+id/time"
-            android:clickable="true"
-            android:onClick="onTimeLabelClick" />
-
-        <TextView
-            android:id="@+id/length"
-            android:layout_width="0dip"
-            android:layout_height="wrap_content"
-            android:layout_weight="1"
-            android:focusable="false"
-            android:gravity="right"
-            android:text="@string/time_0"
-            android:textColor="#ffffff"
-            android:textSize="18sp" />
-
-    </LinearLayout>
-    <SeekBar
-        android:layout_width="fill_parent"
-        android:layout_height="wrap_content"
-        android:minHeight="4dip"
-        android:maxHeight="4dip"
-        android:progressDrawable="@drawable/po_seekbar"
-        android:thumb="@drawable/ic_seekbar_thumb"
-        android:paddingTop="5dip"
-        android:paddingBottom="10dip"
-        android:paddingLeft="15dip"
-        android:paddingRight="15dip"
-        android:id="@+id/timeline" />
-
-    <TextView
-        android:id="@+id/title"
-        android:layout_width="fill_parent"
-        android:layout_height="wrap_content"
-        android:layout_marginBottom="4dip"
-        android:ellipsize="marquee"
-        android:focusable="false"
-        android:paddingLeft="20dip"
-        android:paddingRight="20dip"
-        android:singleLine="true"
-        android:text="@string/title"
-        android:textColor="#ffffff"
-        android:textSize="20sp" />
-
-    <TextView
-        android:id="@+id/artist"
-        android:layout_width="fill_parent"
-        android:layout_height="wrap_content"
-        android:layout_marginBottom="4dip"
-        android:ellipsize="marquee"
-        android:focusable="false"
-        android:paddingLeft="20dip"
-        android:paddingRight="20dip"
-        android:singleLine="true"
-        android:text="@string/artist"
-        android:textColor="#888888"
-        android:textSize="18sp" />
-
-    <TextView
-        android:id="@+id/album"
-        android:layout_width="fill_parent"
-        android:layout_height="wrap_content"
-        android:ellipsize="marquee"
-        android:focusable="false"
-        android:paddingLeft="20dip"
-        android:paddingRight="20dip"
-        android:singleLine="true"
-        android:text="@string/album"
-        android:textColor="#888888"
-        android:textSize="18sp" />
-
-    <LinearLayout
-        android:layout_width="fill_parent"
-        android:layout_height="wrap_content"
-        android:orientation="horizontal"
-        android:gravity="center"
-        android:layout_margin="10dip">
-        <ImageButton
-            android:id="@+id/previous"
-            android:layout_width="70dip"
-            android:layout_height="70dip"
-            android:background="@android:color/transparent"
-            android:contentDescription="@string/previous"
-            android:focusable="true"
-            android:onClick="onPreviousClick"
-            android:scaleType="fitXY"
-            android:src="@drawable/ic_backward" />
-
-        <ImageButton
-            android:id="@+id/play_pause"
-            android:layout_width="70dip"
-            android:layout_height="70dip"
-            android:layout_marginLeft="10dip"
-            android:layout_marginRight="10dip"
-            android:background="@android:color/transparent"
-            android:contentDescription="@string/pause"
-            android:focusable="true"
-            android:onClick="onPlayPauseClick"
-            android:scaleType="fitXY"
-            android:src="@drawable/ic_pause" />
-
-        <ImageButton
-            android:id="@+id/stop"
-            android:layout_width="70dip"
-            android:layout_height="70dip"
-            android:layout_marginLeft="10dip"
-            android:layout_marginRight="10dip"
-            android:background="@android:color/transparent"
-            android:contentDescription="@string/stop"
-            android:focusable="true"
-            android:onClick="onStopClick"
-            android:scaleType="fitXY"
-            android:src="@drawable/ic_stop" />
-
-        <ImageButton
-            android:id="@+id/next"
-            android:layout_width="70dip"
-            android:layout_height="70dip"
-            android:background="@android:color/transparent"
-            android:contentDescription="@string/next"
-            android:focusable="true"
-            android:onClick="onNextClick"
-            android:scaleType="fitXY"
-            android:src="@drawable/ic_forward" />
-
-    </LinearLayout>
-</LinearLayout>
diff --git a/vlc-android/src/org/videolan/vlc/gui/audio/AudioPlayerFragment.java b/vlc-android/src/org/videolan/vlc/gui/audio/AudioPlayerFragment.java
index 086ef51..dd53cd2 100644
--- a/vlc-android/src/org/videolan/vlc/gui/audio/AudioPlayerFragment.java
+++ b/vlc-android/src/org/videolan/vlc/gui/audio/AudioPlayerFragment.java
@@ -87,12 +87,8 @@ public class AudioPlayerFragment extends SherlockFragment implements IAudioPlaye
         DisplayMetrics screen = new DisplayMetrics();
         getActivity().getWindowManager().getDefaultDisplay().getMetrics(screen);
         Log.v(TAG, "width = " + screen.widthPixels + " : height = " + screen.heightPixels);
-        if(screen.widthPixels == 240 && screen.heightPixels == 320) /* QVGA 2.7in */
-            v = inflater.inflate(R.layout.audio_player_qvga, container, false);
-        else
-            v = inflater.inflate(R.layout.audio_player, container, false);
+        v = inflater.inflate(R.layout.audio_player, container, false);
 
-        mCover = (ImageView) v.findViewById(R.id.cover);
         mTitle = (TextView) v.findViewById(R.id.title);
         mArtist = (TextView) v.findViewById(R.id.artist);
         mAlbum = (TextView) v.findViewById(R.id.album);



More information about the Android mailing list