Remove exit button

This commit is contained in:
Christopher Eby 2011-09-18 09:42:52 -05:00
parent e19ac9bca5
commit ccac623322
10 changed files with 4 additions and 172 deletions

View File

@ -1,62 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
version="1.1"
width="48"
height="48"
id="svg2890">
<defs
id="defs2892">
<filter
color-interpolation-filters="sRGB"
id="filter3805">
<feGaussianBlur
stdDeviation="0.037015625"
id="feGaussianBlur3807" />
</filter>
<filter
color-interpolation-filters="sRGB"
id="filter3817">
<feGaussianBlur
stdDeviation="0.037015625"
id="feGaussianBlur3819" />
</filter>
<filter
color-interpolation-filters="sRGB"
id="filter3813">
<feGaussianBlur
stdDeviation="0.037015625"
id="feGaussianBlur3815" />
</filter>
<filter
color-interpolation-filters="sRGB"
id="filter3809">
<feGaussianBlur
stdDeviation="0.037015625"
id="feGaussianBlur3811" />
</filter>
</defs>
<g
transform="translate(-0.19687702,10.18125)"
id="layer1">
<path
d="m 5.6968773,-4.6968752 0,13.0000004 4.0312501,-4.03125 5.9999996,6.0624998 4.96875,-5.0312498 -5.999999,-6.0000004 3.999999,-4 -12.9999997,0 z"
id="path3251"
style="color:#000000;fill:#e9e8e9;fill-opacity:1;fill-rule:evenodd;stroke:#d6d6d6;stroke-width:0.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:0.83137249;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;filter:url(#filter3817)" />
<path
d="m 42.696877,-4.6968752 0,13.0000004 -4.03125,-4.03125 -6,6.0624998 -4.96875,-5.0312498 6,-6.0000004 -4,-4 13,0 z"
id="path3268"
style="color:#000000;fill:#e9e8e9;fill-opacity:1;fill-rule:evenodd;stroke:#d6d6d6;stroke-width:0.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:0.83137249;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;filter:url(#filter3813)" />
<path
d="m 5.6968773,32.334375 0,-13 4.0312501,4.03125 5.9999996,-6.0625 4.96875,5.03125 -5.999999,6 3.999999,4 -12.9999997,0 z"
id="path3274"
style="color:#000000;fill:#e9e8e9;fill-opacity:1;fill-rule:evenodd;stroke:#d6d6d6;stroke-width:0.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:0.83137249;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;filter:url(#filter3805)" />
<path
d="m 42.696877,32.334375 0,-13 -4.03125,4.03125 -6,-6.0625 -4.96875,5.03125 6,6 -4,4 13,0 z"
id="path3276"
style="color:#000000;fill:#e9e8e9;fill-opacity:1;fill-rule:evenodd;stroke:#d6d6d6;stroke-width:0.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:0.83137249;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;filter:url(#filter3809)" />
</g>
</svg>

Before

Width:  |  Height:  |  Size: 3.0 KiB

View File

@ -1,28 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
version="1.1"
width="48"
height="48"
id="svg2821">
<defs
id="defs2823">
<filter
color-interpolation-filters="sRGB"
id="filter3595">
<feGaussianBlur
stdDeviation="0.07878462"
id="feGaussianBlur3597" />
</filter>
</defs>
<g
id="layer1">
<path
d="M 36.978553,5.4647048 15.426945,21.449954 22.204033,25.332104 11.021447,42.535295 32.573055,26.550046 25.795967,22.667896 z"
id="Lightning Bolt"
style="fill:#e9e8e9;fill-opacity:1;stroke:#d6d6d6;stroke-width:0.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:0.83137255;stroke-dasharray:none;filter:url(#filter3595)" />
</g>
</svg>

Before

Width:  |  Height:  |  Size: 907 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 782 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 830 B

View File

@ -34,22 +34,4 @@ THE SOFTWARE.
android:layout_width="wrap_content">
<include layout="@layout/playback_buttons" />
</LinearLayout>
<LinearLayout
android:orientation="horizontal"
android:layout_height="wrap_content"
android:layout_width="wrap_content">
<org.kreed.vanilla.ControlButton
android:id="@+id/open_button"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_marginLeft="15px"
android:src="@drawable/fullscreen" />
<org.kreed.vanilla.ControlButton
android:id="@+id/kill_button"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_marginLeft="25px"
android:layout_marginRight="15px"
android:src="@drawable/kill" />
</LinearLayout>
</org.kreed.vanilla.MiniPlaybackActivityLayout>
</org.kreed.vanilla.MiniPlaybackActivityLayout>

View File

@ -28,7 +28,6 @@ THE SOFTWARE.
<string name="empty_queue">No songs selected. Pick some from the library (search key) or enter random mode (in the menu).</string>
<string name="settings">Preferences</string>
<string name="library">Library</string>
<string name="quit">Stop and Exit</string>
<string name="display_mode">Display Mode</string>
<string name="shuffle_enable">Enable Shuffle</string>
<string name="shuffle_disable">Disable Shuffle</string>

View File

@ -171,17 +171,4 @@ public class ContextApplication extends Application {
if (mInstance != null)
mInstance.sendBroadcast(intent);
}
/**
* Stop the PlaybackService, if running, and close all Activities that
* have been added with <code>addActivity</code>.
*/
public static void quit()
{
if (mActivities != null) {
for (int i = mActivities.size(); --i != -1; )
mActivities.remove(i).finish();
}
mInstance.stopService(new Intent(mInstance, PlaybackService.class));
}
}

View File

@ -32,7 +32,7 @@ import android.view.Window;
* window is not fullscreen but only as large as it needs to be. Includes a
* CoverView and control buttons.
*/
public class MiniPlaybackActivity extends PlaybackActivity implements View.OnClickListener {
public class MiniPlaybackActivity extends PlaybackActivity {
@Override
public void onCreate(Bundle state)
{
@ -42,12 +42,9 @@ public class MiniPlaybackActivity extends PlaybackActivity implements View.OnCli
setContentView(R.layout.mini_playback);
mCoverView = (CoverView)findViewById(R.id.cover_view);
mCoverView.setOnClickListener(this);
mCoverView.setup(mLooper, this, CoverBitmap.STYLE_OVERLAPPING_BOX);
View openButton = findViewById(R.id.open_button);
openButton.setOnClickListener(this);
View killButton = findViewById(R.id.kill_button);
killButton.setOnClickListener(this);
View previousButton = findViewById(R.id.previous);
previousButton.setOnClickListener(this);
mPlayPauseButton = (ControlButton)findViewById(R.id.play_pause);
@ -60,10 +57,7 @@ public class MiniPlaybackActivity extends PlaybackActivity implements View.OnCli
public void onClick(View view)
{
switch (view.getId()) {
case R.id.kill_button:
ContextApplication.quit();
break;
case R.id.open_button:
case R.id.cover_view:
startActivity(new Intent(this, FullPlaybackActivity.class));
finish();
break;

View File

@ -118,17 +118,6 @@ public class PlaybackActivity extends Activity implements Handler.Callback, View
}
}
public static boolean handleKeyLongPress(int keyCode)
{
switch (keyCode) {
case KeyEvent.KEYCODE_BACK:
ContextApplication.quit();
return true;
}
return false;
}
@Override
public boolean onKeyDown(int keyCode, KeyEvent event)
{
@ -157,12 +146,6 @@ public class PlaybackActivity extends Activity implements Handler.Callback, View
return super.onKeyUp(keyCode, event);
}
@Override
public boolean onKeyLongPress(int keyCode, KeyEvent event)
{
return handleKeyLongPress(keyCode);
}
public void nextSong()
{
setSong(ContextApplication.getService().nextSong());
@ -291,7 +274,6 @@ public class PlaybackActivity extends Activity implements Handler.Callback, View
{
}
static final int MENU_QUIT = 0;
static final int MENU_DISPLAY = 1;
static final int MENU_PREFS = 2;
static final int MENU_LIBRARY = 3;
@ -308,7 +290,6 @@ public class PlaybackActivity extends Activity implements Handler.Callback, View
menu.add(0, MENU_SHUFFLE, 0, R.string.shuffle_enable).setIcon(R.drawable.ic_menu_shuffle);
menu.add(0, MENU_REPEAT, 0, R.string.repeat_enable).setIcon(R.drawable.ic_menu_refresh);
menu.add(0, MENU_RANDOM, 0, R.string.random_enable).setIcon(R.drawable.ic_menu_shuffle);
menu.add(0, MENU_QUIT, 0, R.string.quit).setIcon(R.drawable.ic_menu_close_clear_cancel);
return true;
}
@ -330,9 +311,6 @@ public class PlaybackActivity extends Activity implements Handler.Callback, View
public boolean onOptionsItemSelected(MenuItem item)
{
switch (item.getItemId()) {
case MENU_QUIT:
ContextApplication.quit();
return true;
case MENU_SHUFFLE:
toggleShuffle();
return true;

View File

@ -24,7 +24,6 @@ package org.kreed.vanilla;
import android.os.Bundle;
import android.preference.PreferenceActivity;
import android.view.KeyEvent;
/**
* The preferences activity in which one can change application preferences.
@ -37,23 +36,6 @@ public class PreferencesActivity extends PreferenceActivity {
protected void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
ContextApplication.addActivity(this);
addPreferencesFromResource(R.xml.preferences);
}
@Override
public void onDestroy()
{
super.onDestroy();
ContextApplication.removeActivity(this);
}
/**
* Implement the long-press-back-quits-application behavior.
*/
@Override
public boolean onKeyLongPress(int keyCode, KeyEvent event)
{
return PlaybackActivity.handleKeyLongPress(keyCode);
}
}