diff --git a/orig/previous_focused.svgz b/orig/previous_focused.svgz new file mode 100644 index 00000000..23cd6fdf Binary files /dev/null and b/orig/previous_focused.svgz differ diff --git a/res/drawable-hdpi/next.png b/res/drawable-hdpi/next_normal.png similarity index 100% rename from res/drawable-hdpi/next.png rename to res/drawable-hdpi/next_normal.png diff --git a/res/drawable-hdpi/pause.png b/res/drawable-hdpi/pause_normal.png similarity index 100% rename from res/drawable-hdpi/pause.png rename to res/drawable-hdpi/pause_normal.png diff --git a/res/drawable-hdpi/play.png b/res/drawable-hdpi/play_normal.png similarity index 100% rename from res/drawable-hdpi/play.png rename to res/drawable-hdpi/play_normal.png diff --git a/res/drawable-hdpi/previous_focused.png b/res/drawable-hdpi/previous_focused.png new file mode 100644 index 00000000..ace003a5 Binary files /dev/null and b/res/drawable-hdpi/previous_focused.png differ diff --git a/res/drawable-hdpi/previous.png b/res/drawable-hdpi/previous_normal.png similarity index 100% rename from res/drawable-hdpi/previous.png rename to res/drawable-hdpi/previous_normal.png diff --git a/res/drawable-mdpi/next.png b/res/drawable-mdpi/next_normal.png similarity index 100% rename from res/drawable-mdpi/next.png rename to res/drawable-mdpi/next_normal.png diff --git a/res/drawable-mdpi/pause.png b/res/drawable-mdpi/pause_normal.png similarity index 100% rename from res/drawable-mdpi/pause.png rename to res/drawable-mdpi/pause_normal.png diff --git a/res/drawable-mdpi/play.png b/res/drawable-mdpi/play_normal.png similarity index 100% rename from res/drawable-mdpi/play.png rename to res/drawable-mdpi/play_normal.png diff --git a/res/drawable-mdpi/previous_focused.png b/res/drawable-mdpi/previous_focused.png new file mode 100644 index 00000000..e3df0cf9 Binary files /dev/null and b/res/drawable-mdpi/previous_focused.png differ diff --git a/res/drawable-mdpi/previous.png b/res/drawable-mdpi/previous_normal.png similarity index 100% rename from res/drawable-mdpi/previous.png rename to res/drawable-mdpi/previous_normal.png diff --git a/res/drawable/next.xml b/res/drawable/next.xml new file mode 100644 index 00000000..052ddfff --- /dev/null +++ b/res/drawable/next.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/res/drawable/next_multi.xml b/res/drawable/next_multi.xml deleted file mode 100644 index 622be397..00000000 --- a/res/drawable/next_multi.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/res/drawable/pause.xml b/res/drawable/pause.xml new file mode 100644 index 00000000..bc7b5c1d --- /dev/null +++ b/res/drawable/pause.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/res/drawable/pause_multi.xml b/res/drawable/pause_multi.xml deleted file mode 100644 index 899963da..00000000 --- a/res/drawable/pause_multi.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/res/drawable/play.xml b/res/drawable/play.xml new file mode 100644 index 00000000..14308a1d --- /dev/null +++ b/res/drawable/play.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/res/drawable/play_multi.xml b/res/drawable/play_multi.xml deleted file mode 100644 index 4891bc78..00000000 --- a/res/drawable/play_multi.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/res/drawable/previous.xml b/res/drawable/previous.xml new file mode 100644 index 00000000..f8703de8 --- /dev/null +++ b/res/drawable/previous.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/res/layout/four_long_widget.xml b/res/layout/four_long_widget.xml index c0101e7f..74f1bf37 100644 --- a/res/layout/four_long_widget.xml +++ b/res/layout/four_long_widget.xml @@ -76,7 +76,7 @@ THE SOFTWARE. android:layout_width="fill_parent" android:layout_height="0px" android:layout_weight="1" - android:src="@drawable/play_multi" + android:src="@drawable/play" android:padding="5dip" android:background="#0000" android:scaleType="fitCenter" /> @@ -86,7 +86,7 @@ THE SOFTWARE. android:layout_height="0px" android:layout_weight="1" android:padding="5dip" - android:src="@drawable/next_multi" + android:src="@drawable/next" android:background="#0000" android:scaleType="fitCenter" /> diff --git a/res/layout/full_playback.xml b/res/layout/full_playback.xml index 6b424ad4..4d693277 100644 --- a/res/layout/full_playback.xml +++ b/res/layout/full_playback.xml @@ -1,6 +1,6 @@ - - - diff --git a/res/layout/library_content.xml b/res/layout/library_content.xml index 8811ee56..8cedc81d 100644 --- a/res/layout/library_content.xml +++ b/res/layout/library_content.xml @@ -153,12 +153,13 @@ THE SOFTWARE. android:layout_width="fill_parent" android:layout_height="wrap_content" android:inputType="textFilter" /> - + android:background="@null" + android:src="@drawable/ic_menu_close_clear_cancel" /> diff --git a/res/layout/library_withcontrols.xml b/res/layout/library_withcontrols.xml index 9bd3688e..1235696b 100644 --- a/res/layout/library_withcontrols.xml +++ b/res/layout/library_withcontrols.xml @@ -58,23 +58,29 @@ THE SOFTWARE. android:layout_toRightOf="@id/cover" android:layout_alignParentRight="true" android:layout_alignParentBottom="true"> - - - diff --git a/res/layout/mini_playback.xml b/res/layout/mini_playback.xml index a10d0398..7cd83f4a 100644 --- a/res/layout/mini_playback.xml +++ b/res/layout/mini_playback.xml @@ -1,6 +1,6 @@ - - - - - \ No newline at end of file diff --git a/src/org/kreed/vanilla/ControlButton.java b/src/org/kreed/vanilla/ControlButton.java deleted file mode 100644 index 45f76e78..00000000 --- a/src/org/kreed/vanilla/ControlButton.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright (C) 2010 Christopher Eby - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -package org.kreed.vanilla; - -import android.content.Context; -import android.graphics.Color; -import android.graphics.PorterDuff; -import android.util.AttributeSet; -import android.widget.ImageView; - -/** - * ControlButton is a simple extension of ImageView to make it clickable and - * focusable and provide a visual indication of when these states occur by - * tinting the image green. - */ -public class ControlButton extends ImageView { - private static final int ACTIVE_TINT = Color.argb(100, 0, 255, 0); - private static final int INACTIVE_TINT = Color.TRANSPARENT; - private int mTint = Color.TRANSPARENT; - - /** - * Constructor intended to be called by inflating from XML. - */ - public ControlButton(Context context, AttributeSet attrs) - { - super(context, attrs); - - setFocusable(true); - setClickable(true); - } - - /** - * Change the tint of the view when the state changes to pressed or - * focused. - */ - @Override - protected void drawableStateChanged() - { - super.drawableStateChanged(); - - int tint = isPressed() || isFocused() ? ACTIVE_TINT : INACTIVE_TINT; - if (tint != mTint) { - setColorFilter(tint, PorterDuff.Mode.SRC_ATOP); - mTint = tint; - } - } -} \ No newline at end of file diff --git a/src/org/kreed/vanilla/FourLongWidget.java b/src/org/kreed/vanilla/FourLongWidget.java index 8294fdb4..657625af 100644 --- a/src/org/kreed/vanilla/FourLongWidget.java +++ b/src/org/kreed/vanilla/FourLongWidget.java @@ -112,7 +112,7 @@ public class FourLongWidget extends AppWidgetProvider { } boolean playing = (state & PlaybackService.FLAG_PLAYING) != 0; - views.setImageViewResource(R.id.play_pause, playing ? R.drawable.pause_multi : R.drawable.play_multi); + views.setImageViewResource(R.id.play_pause, playing ? R.drawable.pause : R.drawable.play); Intent intent; PendingIntent pendingIntent; diff --git a/src/org/kreed/vanilla/FullPlaybackActivity.java b/src/org/kreed/vanilla/FullPlaybackActivity.java index 1151a4d2..0c641450 100644 --- a/src/org/kreed/vanilla/FullPlaybackActivity.java +++ b/src/org/kreed/vanilla/FullPlaybackActivity.java @@ -36,6 +36,7 @@ import android.view.MenuItem; import android.view.MotionEvent; import android.view.View; import android.view.ViewGroup; +import android.widget.ImageButton; import android.widget.LinearLayout; import android.widget.RelativeLayout; import android.widget.SeekBar; @@ -118,7 +119,7 @@ public class FullPlaybackActivity extends PlaybackActivity implements SeekBar.On View previousButton = findViewById(R.id.previous); previousButton.setOnClickListener(this); - mPlayPauseButton = (ControlButton)findViewById(R.id.play_pause); + mPlayPauseButton = (ImageButton)findViewById(R.id.play_pause); mPlayPauseButton.setOnClickListener(this); View nextButton = findViewById(R.id.next); nextButton.setOnClickListener(this); diff --git a/src/org/kreed/vanilla/LibraryActivity.java b/src/org/kreed/vanilla/LibraryActivity.java index ca26151e..18806c12 100644 --- a/src/org/kreed/vanilla/LibraryActivity.java +++ b/src/org/kreed/vanilla/LibraryActivity.java @@ -47,6 +47,7 @@ import android.view.SubMenu; import android.view.View; import android.view.ViewGroup; import android.widget.AdapterView; +import android.widget.ImageButton; import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.ListView; @@ -121,7 +122,7 @@ public class LibraryActivity extends PlaybackActivity implements AdapterView.OnI mStatusText = (TextView)mControls.findViewById(R.id.status_text); mCover = (ImageView)mControls.findViewById(R.id.cover); View previous = mControls.findViewById(R.id.previous); - mPlayPauseButton = (ControlButton)mControls.findViewById(R.id.play_pause); + mPlayPauseButton = (ImageButton)mControls.findViewById(R.id.play_pause); View next = mControls.findViewById(R.id.next); mCover.setOnClickListener(this); diff --git a/src/org/kreed/vanilla/MiniPlaybackActivity.java b/src/org/kreed/vanilla/MiniPlaybackActivity.java index 47e36cab..fd5ab28c 100644 --- a/src/org/kreed/vanilla/MiniPlaybackActivity.java +++ b/src/org/kreed/vanilla/MiniPlaybackActivity.java @@ -26,6 +26,7 @@ import android.content.Intent; import android.os.Bundle; import android.view.View; import android.view.Window; +import android.widget.ImageButton; /** * Compact playback activity that displays itself like a dialog. That is, the @@ -48,7 +49,7 @@ public class MiniPlaybackActivity extends PlaybackActivity { View previousButton = findViewById(R.id.previous); previousButton.setOnClickListener(this); - mPlayPauseButton = (ControlButton)findViewById(R.id.play_pause); + mPlayPauseButton = (ImageButton)findViewById(R.id.play_pause); mPlayPauseButton.setOnClickListener(this); View nextButton = findViewById(R.id.next); nextButton.setOnClickListener(this); diff --git a/src/org/kreed/vanilla/PlaybackActivity.java b/src/org/kreed/vanilla/PlaybackActivity.java index 0ced4a5f..e452a3d1 100644 --- a/src/org/kreed/vanilla/PlaybackActivity.java +++ b/src/org/kreed/vanilla/PlaybackActivity.java @@ -37,6 +37,7 @@ import android.view.KeyEvent; import android.view.Menu; import android.view.MenuItem; import android.view.View; +import android.widget.ImageButton; import android.widget.Toast; public class PlaybackActivity extends Activity @@ -68,7 +69,7 @@ public class PlaybackActivity extends Activity protected Looper mLooper; protected CoverView mCoverView; - protected ControlButton mPlayPauseButton; + protected ImageButton mPlayPauseButton; protected int mState; private long mLastStateEvent;