aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorowner <owner@DeeDee-Laptop>2012-07-14 09:28:13 -0700
committerowner <owner@DeeDee-Laptop>2012-07-14 09:28:13 -0700
commit0d4b5958d9c0db709a3ed7c66ab3678fa0a7e9c1 (patch)
tree884021b11e36bf5f388ecc1a0e39ec6ff6d01730
parentf78f88c0ba42c8ebe5e0db1c22dc43b2a872e66d (diff)
downloaddsub-0d4b5958d9c0db709a3ed7c66ab3678fa0a7e9c1.tar.gz
dsub-0d4b5958d9c0db709a3ed7c66ab3678fa0a7e9c1.tar.bz2
dsub-0d4b5958d9c0db709a3ed7c66ab3678fa0a7e9c1.zip
Added settings/help buttons on action bar
-rw-r--r--subsonic-android/res/layout/action_bar.xml28
-rw-r--r--subsonic-android/src/github/daneren2005/subphonic/activity/MainActivity.java18
-rw-r--r--subsonic-android/src/github/daneren2005/subphonic/activity/SearchActivity.java18
-rw-r--r--subsonic-android/src/github/daneren2005/subphonic/activity/SelectAlbumActivity.java18
-rw-r--r--subsonic-android/src/github/daneren2005/subphonic/activity/SelectArtistActivity.java18
-rw-r--r--subsonic-android/src/github/daneren2005/subphonic/activity/SelectPlaylistActivity.java18
6 files changed, 117 insertions, 1 deletions
diff --git a/subsonic-android/res/layout/action_bar.xml b/subsonic-android/res/layout/action_bar.xml
index 7439c0d8..c22260d9 100644
--- a/subsonic-android/res/layout/action_bar.xml
+++ b/subsonic-android/res/layout/action_bar.xml
@@ -19,15 +19,41 @@
android:paddingBottom="2dip"
android:scaleType="centerInside"
/>
+
+ <ImageButton
+ android:id="@+id/action_button_4"
+ android:src="@drawable/ic_menu_settings"
+ android:layout_width="44dip"
+ android:layout_height="wrap_content"
+ android:layout_alignParentRight="true"
+ android:layout_alignParentTop="true"
+ android:layout_alignParentBottom="true"
+ android:scaleType="center"
+ android:padding="5dp"
+ android:background="@drawable/actionbar_button"
+ />
+
+ <ImageButton
+ android:id="@+id/action_button_3"
+ android:src="@drawable/ic_menu_help"
+ android:layout_width="44dip"
+ android:layout_height="wrap_content"
+ android:layout_alignParentTop="true"
+ android:layout_alignParentBottom="true"
+ android:layout_toLeftOf="@id/action_button_4"
+ android:scaleType="center"
+ android:padding="5dp"
+ android:background="@drawable/actionbar_button"
+ />
<ImageButton
android:id="@+id/action_button_2"
android:src="@drawable/action_search"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:layout_alignParentBottom="true"
+ android:layout_toLeftOf="@id/action_button_3"
android:scaleType="center"
android:padding="5dp"
android:background="@drawable/actionbar_button"
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
@@ -189,6 +189,24 @@ public class SelectAlbumActivity extends SubsonicTabActivity {
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));
+ }
+ });
}
private void playAll() {
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();
}