From 0d4b5958d9c0db709a3ed7c66ab3678fa0a7e9c1 Mon Sep 17 00:00:00 2001 From: owner Date: Sat, 14 Jul 2012 09:28:13 -0700 Subject: Added settings/help buttons on action bar --- .../daneren2005/subphonic/activity/MainActivity.java | 18 ++++++++++++++++++ .../daneren2005/subphonic/activity/SearchActivity.java | 18 ++++++++++++++++++ .../subphonic/activity/SelectAlbumActivity.java | 18 ++++++++++++++++++ .../subphonic/activity/SelectArtistActivity.java | 18 ++++++++++++++++++ .../subphonic/activity/SelectPlaylistActivity.java | 18 ++++++++++++++++++ 5 files changed, 90 insertions(+) (limited to 'subsonic-android/src/github') diff --git a/subsonic-android/src/github/daneren2005/subphonic/activity/MainActivity.java b/subsonic-android/src/github/daneren2005/subphonic/activity/MainActivity.java index ba1c2855..89f2d4ae 100644 --- a/subsonic-android/src/github/daneren2005/subphonic/activity/MainActivity.java +++ b/subsonic-android/src/github/daneren2005/subphonic/activity/MainActivity.java @@ -140,6 +140,24 @@ public class MainActivity extends SubsonicTabActivity { Util.startActivityWithoutTransition(MainActivity.this, intent); } }); + + // Button 3: Help + ImageButton actionHelpButton = (ImageButton)findViewById(R.id.action_button_3); + actionHelpButton.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View view) { + startActivity(new Intent(MainActivity.this, HelpActivity.class)); + } + }); + + // Button 4: Settings + ImageButton actionSettingsButton = (ImageButton)findViewById(R.id.action_button_4); + actionSettingsButton.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View view) { + startActivity(new Intent(MainActivity.this, SettingsActivity.class)); + } + }); // Remember the current theme. theme = Util.getTheme(this); diff --git a/subsonic-android/src/github/daneren2005/subphonic/activity/SearchActivity.java b/subsonic-android/src/github/daneren2005/subphonic/activity/SearchActivity.java index a9d64fda..8bfc5b5b 100644 --- a/subsonic-android/src/github/daneren2005/subphonic/activity/SearchActivity.java +++ b/subsonic-android/src/github/daneren2005/subphonic/activity/SearchActivity.java @@ -147,6 +147,24 @@ public class SearchActivity extends SubsonicTabActivity { onSearchRequested(); } }); + + // Button 3: Help + ImageButton actionHelpButton = (ImageButton)findViewById(R.id.action_button_3); + actionHelpButton.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View view) { + startActivity(new Intent(SearchActivity.this, HelpActivity.class)); + } + }); + + // Button 4: Settings + ImageButton actionSettingsButton = (ImageButton)findViewById(R.id.action_button_4); + actionSettingsButton.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View view) { + startActivity(new Intent(SearchActivity.this, SettingsActivity.class)); + } + }); onNewIntent(getIntent()); } diff --git a/subsonic-android/src/github/daneren2005/subphonic/activity/SelectAlbumActivity.java b/subsonic-android/src/github/daneren2005/subphonic/activity/SelectAlbumActivity.java index 72439065..4125ee1b 100644 --- a/subsonic-android/src/github/daneren2005/subphonic/activity/SelectAlbumActivity.java +++ b/subsonic-android/src/github/daneren2005/subphonic/activity/SelectAlbumActivity.java @@ -188,6 +188,24 @@ public class SelectAlbumActivity extends SubsonicTabActivity { public void onClick(View view) { refresh(); } + }); + + // Button 3: Help + ImageButton actionHelpButton = (ImageButton)findViewById(R.id.action_button_3); + actionHelpButton.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View view) { + startActivity(new Intent(SelectAlbumActivity.this, HelpActivity.class)); + } + }); + + // Button 4: Settings + ImageButton actionSettingsButton = (ImageButton)findViewById(R.id.action_button_4); + actionSettingsButton.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View view) { + startActivity(new Intent(SelectAlbumActivity.this, SettingsActivity.class)); + } }); } diff --git a/subsonic-android/src/github/daneren2005/subphonic/activity/SelectArtistActivity.java b/subsonic-android/src/github/daneren2005/subphonic/activity/SelectArtistActivity.java index 91f2c7bf..bf9ff9ba 100644 --- a/subsonic-android/src/github/daneren2005/subphonic/activity/SelectArtistActivity.java +++ b/subsonic-android/src/github/daneren2005/subphonic/activity/SelectArtistActivity.java @@ -97,6 +97,24 @@ public class SelectArtistActivity extends SubsonicTabActivity implements Adapter refresh(); } }); + + // Button 3: Help + ImageButton actionHelpButton = (ImageButton)findViewById(R.id.action_button_3); + actionHelpButton.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View view) { + startActivity(new Intent(SelectArtistActivity.this, HelpActivity.class)); + } + }); + + // Button 4: Settings + ImageButton actionSettingsButton = (ImageButton)findViewById(R.id.action_button_4); + actionSettingsButton.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View view) { + startActivity(new Intent(SelectArtistActivity.this, SettingsActivity.class)); + } + }); musicFolders = null; load(); diff --git a/subsonic-android/src/github/daneren2005/subphonic/activity/SelectPlaylistActivity.java b/subsonic-android/src/github/daneren2005/subphonic/activity/SelectPlaylistActivity.java index 9882fad0..c2153de0 100644 --- a/subsonic-android/src/github/daneren2005/subphonic/activity/SelectPlaylistActivity.java +++ b/subsonic-android/src/github/daneren2005/subphonic/activity/SelectPlaylistActivity.java @@ -73,6 +73,24 @@ public class SelectPlaylistActivity extends SubsonicTabActivity implements Adapt refresh(); } }); + + // Button 3: Help + ImageButton actionHelpButton = (ImageButton)findViewById(R.id.action_button_3); + actionHelpButton.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View view) { + startActivity(new Intent(SelectPlaylistActivity.this, HelpActivity.class)); + } + }); + + // Button 4: Settings + ImageButton actionSettingsButton = (ImageButton)findViewById(R.id.action_button_4); + actionSettingsButton.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View view) { + startActivity(new Intent(SelectPlaylistActivity.this, SettingsActivity.class)); + } + }); load(); } -- cgit v1.2.3