mirror of
https://github.com/ultrasonic/ultrasonic
synced 2025-03-12 09:30:14 +01:00
Remove MyViewFlipper.java
It was a workaround for a bug in Android 2, which is fixed in Android 3 and later.
This commit is contained in:
parent
97eb753413
commit
b1cb70764c
@ -1,58 +0,0 @@
|
|||||||
/*
|
|
||||||
This file is part of Subsonic.
|
|
||||||
|
|
||||||
Subsonic 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 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
Subsonic 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 Subsonic. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
Copyright 2009 (C) Sindre Mehus
|
|
||||||
*/
|
|
||||||
package org.moire.ultrasonic.util;
|
|
||||||
|
|
||||||
import android.content.Context;
|
|
||||||
import android.util.AttributeSet;
|
|
||||||
import android.widget.ViewFlipper;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Work-around for Android Issue 6191 (http://code.google.com/p/android/issues/detail?id=6191)
|
|
||||||
*
|
|
||||||
* @author Sindre Mehus
|
|
||||||
* @version $Id$
|
|
||||||
*/
|
|
||||||
public class MyViewFlipper extends ViewFlipper
|
|
||||||
{
|
|
||||||
|
|
||||||
public MyViewFlipper(Context context)
|
|
||||||
{
|
|
||||||
super(context);
|
|
||||||
}
|
|
||||||
|
|
||||||
public MyViewFlipper(Context context, AttributeSet attrs)
|
|
||||||
{
|
|
||||||
super(context, attrs);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void onDetachedFromWindow()
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
super.onDetachedFromWindow();
|
|
||||||
}
|
|
||||||
catch (IllegalArgumentException e)
|
|
||||||
{
|
|
||||||
// Call stopFlipping() in order to kick off updateRunning()
|
|
||||||
stopFlipping();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,21 +1,23 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<LinearLayout xmlns:a="http://schemas.android.com/apk/res/android"
|
<LinearLayout xmlns:a="http://schemas.android.com/apk/res/android"
|
||||||
a:layout_width="fill_parent"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
a:layout_height="fill_parent"
|
a:layout_width="fill_parent"
|
||||||
a:orientation="horizontal">
|
a:layout_height="fill_parent"
|
||||||
|
a:baselineAligned="false"
|
||||||
|
a:orientation="horizontal">
|
||||||
|
|
||||||
<org.moire.ultrasonic.util.MyViewFlipper
|
<ViewFlipper
|
||||||
a:id="@+id/current_playing_playlist_flipper"
|
a:id="@+id/current_playing_playlist_flipper"
|
||||||
a:layout_width="0dp"
|
a:layout_width="0dp"
|
||||||
a:layout_height="fill_parent"
|
a:layout_height="fill_parent"
|
||||||
a:layout_weight="1">
|
a:layout_weight="1"
|
||||||
|
tools:ignore="UselessParent">
|
||||||
|
|
||||||
<FrameLayout
|
<FrameLayout
|
||||||
a:id="@+id/current_playing_album_art_layout"
|
a:id="@+id/current_playing_album_art_layout"
|
||||||
a:layout_width="fill_parent"
|
a:layout_width="fill_parent"
|
||||||
a:layout_height="fill_parent"
|
a:layout_height="fill_parent"
|
||||||
a:layout_weight="1"
|
a:gravity="start"
|
||||||
a:gravity="left"
|
|
||||||
a:orientation="horizontal">
|
a:orientation="horizontal">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
@ -31,9 +33,9 @@
|
|||||||
a:layout_width="fill_parent"
|
a:layout_width="fill_parent"
|
||||||
a:layout_height="fill_parent"
|
a:layout_height="fill_parent"
|
||||||
a:gravity="bottom"
|
a:gravity="bottom"
|
||||||
a:orientation="vertical" >
|
a:orientation="vertical">
|
||||||
|
|
||||||
<include layout="@layout/player_media_info"/>
|
<include layout="@layout/player_media_info" />
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
a:id="@+id/song_rating"
|
a:id="@+id/song_rating"
|
||||||
@ -48,10 +50,11 @@
|
|||||||
a:layout_width="0dip"
|
a:layout_width="0dip"
|
||||||
a:layout_height="fill_parent"
|
a:layout_height="fill_parent"
|
||||||
a:layout_weight="1"
|
a:layout_weight="1"
|
||||||
a:padding="10dip"
|
|
||||||
a:background="@android:color/transparent"
|
a:background="@android:color/transparent"
|
||||||
a:focusable="false"
|
a:focusable="false"
|
||||||
a:gravity="center_vertical"
|
a:gravity="center_vertical"
|
||||||
|
a:importantForAccessibility="no"
|
||||||
|
a:padding="10dip"
|
||||||
a:scaleType="fitCenter"
|
a:scaleType="fitCenter"
|
||||||
a:src="?attr/star_hollow" />
|
a:src="?attr/star_hollow" />
|
||||||
|
|
||||||
@ -60,10 +63,11 @@
|
|||||||
a:layout_width="0dip"
|
a:layout_width="0dip"
|
||||||
a:layout_height="fill_parent"
|
a:layout_height="fill_parent"
|
||||||
a:layout_weight="1"
|
a:layout_weight="1"
|
||||||
a:padding="10dip"
|
|
||||||
a:background="@android:color/transparent"
|
a:background="@android:color/transparent"
|
||||||
a:focusable="false"
|
a:focusable="false"
|
||||||
a:gravity="center_vertical"
|
a:gravity="center_vertical"
|
||||||
|
a:importantForAccessibility="no"
|
||||||
|
a:padding="10dip"
|
||||||
a:scaleType="fitCenter"
|
a:scaleType="fitCenter"
|
||||||
a:src="?attr/star_hollow" />
|
a:src="?attr/star_hollow" />
|
||||||
|
|
||||||
@ -72,10 +76,11 @@
|
|||||||
a:layout_width="0dip"
|
a:layout_width="0dip"
|
||||||
a:layout_height="fill_parent"
|
a:layout_height="fill_parent"
|
||||||
a:layout_weight="1"
|
a:layout_weight="1"
|
||||||
a:padding="10dip"
|
|
||||||
a:background="@android:color/transparent"
|
a:background="@android:color/transparent"
|
||||||
a:focusable="false"
|
a:focusable="false"
|
||||||
a:gravity="center_vertical"
|
a:gravity="center_vertical"
|
||||||
|
a:importantForAccessibility="no"
|
||||||
|
a:padding="10dip"
|
||||||
a:scaleType="fitCenter"
|
a:scaleType="fitCenter"
|
||||||
a:src="?attr/star_hollow" />
|
a:src="?attr/star_hollow" />
|
||||||
|
|
||||||
@ -84,10 +89,11 @@
|
|||||||
a:layout_width="0dip"
|
a:layout_width="0dip"
|
||||||
a:layout_height="fill_parent"
|
a:layout_height="fill_parent"
|
||||||
a:layout_weight="1"
|
a:layout_weight="1"
|
||||||
a:padding="10dip"
|
|
||||||
a:background="@android:color/transparent"
|
a:background="@android:color/transparent"
|
||||||
a:focusable="false"
|
a:focusable="false"
|
||||||
a:gravity="center_vertical"
|
a:gravity="center_vertical"
|
||||||
|
a:importantForAccessibility="no"
|
||||||
|
a:padding="10dip"
|
||||||
a:scaleType="fitCenter"
|
a:scaleType="fitCenter"
|
||||||
a:src="?attr/star_hollow" />
|
a:src="?attr/star_hollow" />
|
||||||
|
|
||||||
@ -96,10 +102,11 @@
|
|||||||
a:layout_width="0dip"
|
a:layout_width="0dip"
|
||||||
a:layout_height="fill_parent"
|
a:layout_height="fill_parent"
|
||||||
a:layout_weight="1"
|
a:layout_weight="1"
|
||||||
a:padding="10dip"
|
|
||||||
a:background="@android:color/transparent"
|
a:background="@android:color/transparent"
|
||||||
a:focusable="false"
|
a:focusable="false"
|
||||||
a:gravity="center_vertical"
|
a:gravity="center_vertical"
|
||||||
|
a:importantForAccessibility="no"
|
||||||
|
a:padding="10dip"
|
||||||
a:scaleType="fitCenter"
|
a:scaleType="fitCenter"
|
||||||
a:src="?attr/star_hollow" />
|
a:src="?attr/star_hollow" />
|
||||||
|
|
||||||
@ -113,15 +120,16 @@
|
|||||||
a:layout_marginStart="60dip"
|
a:layout_marginStart="60dip"
|
||||||
a:layout_marginEnd="60dip"
|
a:layout_marginEnd="60dip"
|
||||||
a:background="@color/translucent"
|
a:background="@color/translucent"
|
||||||
a:orientation="vertical"/>
|
a:orientation="vertical" />
|
||||||
|
|
||||||
<include layout="@layout/player_slider"/>
|
<include layout="@layout/player_slider" />
|
||||||
<include layout="@layout/media_buttons"/>
|
|
||||||
|
<include layout="@layout/media_buttons" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
|
|
||||||
<include layout="@layout/current_playlist"/>
|
<include layout="@layout/current_playlist" />
|
||||||
</org.moire.ultrasonic.util.MyViewFlipper>
|
</ViewFlipper>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
@ -4,7 +4,7 @@
|
|||||||
a:layout_height="fill_parent"
|
a:layout_height="fill_parent"
|
||||||
a:orientation="vertical" >
|
a:orientation="vertical" >
|
||||||
|
|
||||||
<org.moire.ultrasonic.util.MyViewFlipper
|
<ViewFlipper
|
||||||
a:id="@+id/current_playing_playlist_flipper"
|
a:id="@+id/current_playing_playlist_flipper"
|
||||||
a:layout_width="fill_parent"
|
a:layout_width="fill_parent"
|
||||||
a:layout_height="0dip"
|
a:layout_height="0dip"
|
||||||
@ -14,7 +14,6 @@
|
|||||||
a:id="@+id/current_playing_album_art_layout"
|
a:id="@+id/current_playing_album_art_layout"
|
||||||
a:layout_width="fill_parent"
|
a:layout_width="fill_parent"
|
||||||
a:layout_height="fill_parent"
|
a:layout_height="fill_parent"
|
||||||
a:layout_weight="1"
|
|
||||||
a:gravity="start"
|
a:gravity="start"
|
||||||
a:orientation="vertical" >
|
a:orientation="vertical" >
|
||||||
|
|
||||||
@ -52,7 +51,8 @@
|
|||||||
a:focusable="false"
|
a:focusable="false"
|
||||||
a:gravity="center_vertical"
|
a:gravity="center_vertical"
|
||||||
a:scaleType="fitCenter"
|
a:scaleType="fitCenter"
|
||||||
a:src="?attr/star_hollow" />
|
a:src="?attr/star_hollow"
|
||||||
|
a:importantForAccessibility="no" />
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
a:id="@+id/song_five_star_2"
|
a:id="@+id/song_five_star_2"
|
||||||
@ -64,7 +64,8 @@
|
|||||||
a:focusable="false"
|
a:focusable="false"
|
||||||
a:gravity="center_vertical"
|
a:gravity="center_vertical"
|
||||||
a:scaleType="fitCenter"
|
a:scaleType="fitCenter"
|
||||||
a:src="?attr/star_hollow" />
|
a:src="?attr/star_hollow"
|
||||||
|
a:importantForAccessibility="no" />
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
a:id="@+id/song_five_star_3"
|
a:id="@+id/song_five_star_3"
|
||||||
@ -76,7 +77,8 @@
|
|||||||
a:focusable="false"
|
a:focusable="false"
|
||||||
a:gravity="center_vertical"
|
a:gravity="center_vertical"
|
||||||
a:scaleType="fitCenter"
|
a:scaleType="fitCenter"
|
||||||
a:src="?attr/star_hollow" />
|
a:src="?attr/star_hollow"
|
||||||
|
a:importantForAccessibility="no" />
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
a:id="@+id/song_five_star_4"
|
a:id="@+id/song_five_star_4"
|
||||||
@ -88,7 +90,8 @@
|
|||||||
a:focusable="false"
|
a:focusable="false"
|
||||||
a:gravity="center_vertical"
|
a:gravity="center_vertical"
|
||||||
a:scaleType="fitCenter"
|
a:scaleType="fitCenter"
|
||||||
a:src="?attr/star_hollow" />
|
a:src="?attr/star_hollow"
|
||||||
|
a:importantForAccessibility="no" />
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
a:id="@+id/song_five_star_5"
|
a:id="@+id/song_five_star_5"
|
||||||
@ -100,7 +103,8 @@
|
|||||||
a:focusable="false"
|
a:focusable="false"
|
||||||
a:gravity="center_vertical"
|
a:gravity="center_vertical"
|
||||||
a:scaleType="fitCenter"
|
a:scaleType="fitCenter"
|
||||||
a:src="?attr/star_hollow" />
|
a:src="?attr/star_hollow"
|
||||||
|
a:importantForAccessibility="no" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
@ -119,7 +123,7 @@
|
|||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
<include layout="@layout/current_playlist" />
|
<include layout="@layout/current_playlist" />
|
||||||
</org.moire.ultrasonic.util.MyViewFlipper>
|
</ViewFlipper>
|
||||||
|
|
||||||
<include layout="@layout/player_media_info" />
|
<include layout="@layout/player_media_info" />
|
||||||
|
|
||||||
|
@ -5,8 +5,7 @@
|
|||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
a:orientation="vertical"
|
a:orientation="vertical"
|
||||||
a:layout_width="fill_parent"
|
a:layout_width="fill_parent"
|
||||||
a:layout_height="fill_parent"
|
a:layout_height="fill_parent">
|
||||||
a:layout_weight="1">
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
a:id="@+id/playlist_empty"
|
a:id="@+id/playlist_empty"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user