mirror of
https://github.com/ultrasonic/ultrasonic
synced 2025-02-11 01:00:58 +01:00
Merge pull request #629 from ultrasonic/ready/rm-viewflipper
Remove MyViewFlipper.java
This commit is contained in:
commit
5fac1b74a3
@ -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"?>
|
||||
<LinearLayout xmlns:a="http://schemas.android.com/apk/res/android"
|
||||
a:layout_width="fill_parent"
|
||||
a:layout_height="fill_parent"
|
||||
a:orientation="horizontal">
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
a:layout_width="fill_parent"
|
||||
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:layout_width="0dp"
|
||||
a:layout_height="fill_parent"
|
||||
a:layout_weight="1">
|
||||
a:layout_weight="1"
|
||||
tools:ignore="UselessParent">
|
||||
|
||||
<FrameLayout
|
||||
a:id="@+id/current_playing_album_art_layout"
|
||||
a:layout_width="fill_parent"
|
||||
a:layout_height="fill_parent"
|
||||
a:layout_weight="1"
|
||||
a:gravity="left"
|
||||
a:gravity="start"
|
||||
a:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
@ -31,9 +33,9 @@
|
||||
a:layout_width="fill_parent"
|
||||
a:layout_height="fill_parent"
|
||||
a:gravity="bottom"
|
||||
a:orientation="vertical" >
|
||||
a:orientation="vertical">
|
||||
|
||||
<include layout="@layout/player_media_info"/>
|
||||
<include layout="@layout/player_media_info" />
|
||||
|
||||
<LinearLayout
|
||||
a:id="@+id/song_rating"
|
||||
@ -48,10 +50,11 @@
|
||||
a:layout_width="0dip"
|
||||
a:layout_height="fill_parent"
|
||||
a:layout_weight="1"
|
||||
a:padding="10dip"
|
||||
a:background="@android:color/transparent"
|
||||
a:focusable="false"
|
||||
a:gravity="center_vertical"
|
||||
a:importantForAccessibility="no"
|
||||
a:padding="10dip"
|
||||
a:scaleType="fitCenter"
|
||||
a:src="?attr/star_hollow" />
|
||||
|
||||
@ -60,10 +63,11 @@
|
||||
a:layout_width="0dip"
|
||||
a:layout_height="fill_parent"
|
||||
a:layout_weight="1"
|
||||
a:padding="10dip"
|
||||
a:background="@android:color/transparent"
|
||||
a:focusable="false"
|
||||
a:gravity="center_vertical"
|
||||
a:importantForAccessibility="no"
|
||||
a:padding="10dip"
|
||||
a:scaleType="fitCenter"
|
||||
a:src="?attr/star_hollow" />
|
||||
|
||||
@ -72,10 +76,11 @@
|
||||
a:layout_width="0dip"
|
||||
a:layout_height="fill_parent"
|
||||
a:layout_weight="1"
|
||||
a:padding="10dip"
|
||||
a:background="@android:color/transparent"
|
||||
a:focusable="false"
|
||||
a:gravity="center_vertical"
|
||||
a:importantForAccessibility="no"
|
||||
a:padding="10dip"
|
||||
a:scaleType="fitCenter"
|
||||
a:src="?attr/star_hollow" />
|
||||
|
||||
@ -84,10 +89,11 @@
|
||||
a:layout_width="0dip"
|
||||
a:layout_height="fill_parent"
|
||||
a:layout_weight="1"
|
||||
a:padding="10dip"
|
||||
a:background="@android:color/transparent"
|
||||
a:focusable="false"
|
||||
a:gravity="center_vertical"
|
||||
a:importantForAccessibility="no"
|
||||
a:padding="10dip"
|
||||
a:scaleType="fitCenter"
|
||||
a:src="?attr/star_hollow" />
|
||||
|
||||
@ -96,10 +102,11 @@
|
||||
a:layout_width="0dip"
|
||||
a:layout_height="fill_parent"
|
||||
a:layout_weight="1"
|
||||
a:padding="10dip"
|
||||
a:background="@android:color/transparent"
|
||||
a:focusable="false"
|
||||
a:gravity="center_vertical"
|
||||
a:importantForAccessibility="no"
|
||||
a:padding="10dip"
|
||||
a:scaleType="fitCenter"
|
||||
a:src="?attr/star_hollow" />
|
||||
|
||||
@ -113,15 +120,16 @@
|
||||
a:layout_marginStart="60dip"
|
||||
a:layout_marginEnd="60dip"
|
||||
a:background="@color/translucent"
|
||||
a:orientation="vertical"/>
|
||||
a:orientation="vertical" />
|
||||
|
||||
<include layout="@layout/player_slider"/>
|
||||
<include layout="@layout/media_buttons"/>
|
||||
<include layout="@layout/player_slider" />
|
||||
|
||||
<include layout="@layout/media_buttons" />
|
||||
|
||||
</LinearLayout>
|
||||
</FrameLayout>
|
||||
|
||||
<include layout="@layout/current_playlist"/>
|
||||
</org.moire.ultrasonic.util.MyViewFlipper>
|
||||
<include layout="@layout/current_playlist" />
|
||||
</ViewFlipper>
|
||||
|
||||
</LinearLayout>
|
@ -4,7 +4,7 @@
|
||||
a:layout_height="fill_parent"
|
||||
a:orientation="vertical" >
|
||||
|
||||
<org.moire.ultrasonic.util.MyViewFlipper
|
||||
<ViewFlipper
|
||||
a:id="@+id/current_playing_playlist_flipper"
|
||||
a:layout_width="fill_parent"
|
||||
a:layout_height="0dip"
|
||||
@ -14,7 +14,6 @@
|
||||
a:id="@+id/current_playing_album_art_layout"
|
||||
a:layout_width="fill_parent"
|
||||
a:layout_height="fill_parent"
|
||||
a:layout_weight="1"
|
||||
a:gravity="start"
|
||||
a:orientation="vertical" >
|
||||
|
||||
@ -52,7 +51,8 @@
|
||||
a:focusable="false"
|
||||
a:gravity="center_vertical"
|
||||
a:scaleType="fitCenter"
|
||||
a:src="?attr/star_hollow" />
|
||||
a:src="?attr/star_hollow"
|
||||
a:importantForAccessibility="no" />
|
||||
|
||||
<ImageView
|
||||
a:id="@+id/song_five_star_2"
|
||||
@ -64,7 +64,8 @@
|
||||
a:focusable="false"
|
||||
a:gravity="center_vertical"
|
||||
a:scaleType="fitCenter"
|
||||
a:src="?attr/star_hollow" />
|
||||
a:src="?attr/star_hollow"
|
||||
a:importantForAccessibility="no" />
|
||||
|
||||
<ImageView
|
||||
a:id="@+id/song_five_star_3"
|
||||
@ -76,7 +77,8 @@
|
||||
a:focusable="false"
|
||||
a:gravity="center_vertical"
|
||||
a:scaleType="fitCenter"
|
||||
a:src="?attr/star_hollow" />
|
||||
a:src="?attr/star_hollow"
|
||||
a:importantForAccessibility="no" />
|
||||
|
||||
<ImageView
|
||||
a:id="@+id/song_five_star_4"
|
||||
@ -88,7 +90,8 @@
|
||||
a:focusable="false"
|
||||
a:gravity="center_vertical"
|
||||
a:scaleType="fitCenter"
|
||||
a:src="?attr/star_hollow" />
|
||||
a:src="?attr/star_hollow"
|
||||
a:importantForAccessibility="no" />
|
||||
|
||||
<ImageView
|
||||
a:id="@+id/song_five_star_5"
|
||||
@ -100,7 +103,8 @@
|
||||
a:focusable="false"
|
||||
a:gravity="center_vertical"
|
||||
a:scaleType="fitCenter"
|
||||
a:src="?attr/star_hollow" />
|
||||
a:src="?attr/star_hollow"
|
||||
a:importantForAccessibility="no" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
@ -119,7 +123,7 @@
|
||||
</RelativeLayout>
|
||||
|
||||
<include layout="@layout/current_playlist" />
|
||||
</org.moire.ultrasonic.util.MyViewFlipper>
|
||||
</ViewFlipper>
|
||||
|
||||
<include layout="@layout/player_media_info" />
|
||||
|
||||
|
@ -5,8 +5,7 @@
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
a:orientation="vertical"
|
||||
a:layout_width="fill_parent"
|
||||
a:layout_height="fill_parent"
|
||||
a:layout_weight="1">
|
||||
a:layout_height="fill_parent">
|
||||
|
||||
<TextView
|
||||
a:id="@+id/playlist_empty"
|
||||
|
Loading…
x
Reference in New Issue
Block a user