Removed search button on main tab, it was redundant, added Exit button. Removed Help and Settings from remaining tabs. Start redesign of the Download tab
This commit is contained in:
parent
feca33c9ac
commit
97890e8929
|
@ -194,7 +194,8 @@
|
|||
a:id="@+id/download_album_art_layout"
|
||||
a:layout_width="fill_parent"
|
||||
a:layout_height="fill_parent"
|
||||
a:background="@drawable/album_art_background">
|
||||
a:background="@drawable/pinstripe_tile" >
|
||||
|
||||
<ImageView
|
||||
a:id="@+id/download_album_art_image"
|
||||
a:layout_width="wrap_content"
|
||||
|
|
|
@ -12,11 +12,11 @@
|
|||
|
||||
<RelativeLayout
|
||||
a:id="@+id/download_album_art_layout"
|
||||
a:orientation="vertical"
|
||||
a:layout_width="fill_parent"
|
||||
a:layout_height="fill_parent"
|
||||
a:layout_weight="1"
|
||||
a:background="@drawable/album_art_background">
|
||||
a:background="@drawable/pinstripe_tile"
|
||||
a:orientation="vertical" >
|
||||
|
||||
<ImageButton
|
||||
a:id="@+id/download_repeat"
|
||||
|
|
|
@ -63,7 +63,7 @@
|
|||
a:padding="5dp"
|
||||
a:scaleType="center"
|
||||
a:showAsAction="ifRoom|withText"
|
||||
a:src="@drawable/ic_menu_settings" />
|
||||
a:src="@drawable/ic_menu_exit" />
|
||||
|
||||
<ImageButton
|
||||
a:id="@+id/action_button_1"
|
||||
|
@ -75,7 +75,7 @@
|
|||
a:padding="5dp"
|
||||
a:scaleType="center"
|
||||
a:showAsAction="ifRoom|withText"
|
||||
a:src="@drawable/ic_menu_search" />
|
||||
a:src="@drawable/ic_menu_shuffle" />
|
||||
|
||||
<ImageButton
|
||||
a:id="@+id/action_button_2"
|
||||
|
@ -87,6 +87,6 @@
|
|||
a:padding="5dp"
|
||||
a:scaleType="center"
|
||||
a:showAsAction="ifRoom|withText"
|
||||
a:src="@drawable/ic_menu_shuffle" />
|
||||
a:src="@drawable/ic_menu_settings" />
|
||||
|
||||
</RelativeLayout>
|
|
@ -118,20 +118,8 @@ public class MainActivity extends SubsonicTabActivity {
|
|||
// Title: Subsonic
|
||||
setTitle(R.string.common_appname);
|
||||
|
||||
// Button 1: search
|
||||
ImageButton actionSearchButton = (ImageButton)findViewById(R.id.action_button_1);
|
||||
actionSearchButton.setImageResource(R.drawable.ic_menu_search);
|
||||
actionSearchButton.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
Intent intent = new Intent(MainActivity.this, SearchActivity.class);
|
||||
intent.putExtra(Constants.INTENT_EXTRA_REQUEST_SEARCH, true);
|
||||
Util.startActivityWithoutTransition(MainActivity.this, intent);
|
||||
}
|
||||
});
|
||||
|
||||
// Button 2: shuffle
|
||||
ImageButton actionShuffleButton = (ImageButton)findViewById(R.id.action_button_2);
|
||||
// Button 1: shuffle
|
||||
ImageButton actionShuffleButton = (ImageButton)findViewById(R.id.action_button_1);
|
||||
actionShuffleButton.setImageResource(R.drawable.ic_menu_shuffle);
|
||||
actionShuffleButton.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
|
@ -142,6 +130,16 @@ public class MainActivity extends SubsonicTabActivity {
|
|||
}
|
||||
});
|
||||
|
||||
// Button 2: settings
|
||||
ImageButton actionSettingsButton = (ImageButton)findViewById(R.id.action_button_2);
|
||||
actionSettingsButton.setImageResource(R.drawable.ic_menu_settings);
|
||||
actionSettingsButton.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
startActivity(new Intent(MainActivity.this, SettingsActivity.class));
|
||||
}
|
||||
});
|
||||
|
||||
// Button 3: help
|
||||
ImageButton actionHelpButton = (ImageButton)findViewById(R.id.action_button_3);
|
||||
actionHelpButton.setImageResource(R.drawable.ic_menu_help);
|
||||
|
@ -152,13 +150,13 @@ public class MainActivity extends SubsonicTabActivity {
|
|||
}
|
||||
});
|
||||
|
||||
// Button 4: settings
|
||||
ImageButton actionSettingsButton = (ImageButton)findViewById(R.id.action_button_4);
|
||||
actionSettingsButton.setImageResource(R.drawable.ic_menu_settings);
|
||||
actionSettingsButton.setOnClickListener(new View.OnClickListener() {
|
||||
// Button 4: exit
|
||||
ImageButton actionSearchButton = (ImageButton)findViewById(R.id.action_button_4);
|
||||
actionSearchButton.setImageResource(R.drawable.ic_menu_exit);
|
||||
actionSearchButton.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
startActivity(new Intent(MainActivity.this, SettingsActivity.class));
|
||||
exit();
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -138,8 +138,14 @@ public class SearchActivity extends SubsonicTabActivity {
|
|||
// Button 1: gone
|
||||
findViewById(R.id.action_button_1).setVisibility(View.GONE);
|
||||
|
||||
// Button 2: search
|
||||
final ImageButton actionSearchButton = (ImageButton)findViewById(R.id.action_button_2);
|
||||
// Button 2: gone
|
||||
findViewById(R.id.action_button_2).setVisibility(View.GONE);
|
||||
|
||||
// Button 3: gone
|
||||
findViewById(R.id.action_button_3).setVisibility(View.GONE);
|
||||
|
||||
// Button 4: search
|
||||
final ImageButton actionSearchButton = (ImageButton)findViewById(R.id.action_button_4);
|
||||
actionSearchButton.setImageResource(R.drawable.ic_menu_search);
|
||||
actionSearchButton.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
|
@ -148,26 +154,6 @@ public class SearchActivity extends SubsonicTabActivity {
|
|||
}
|
||||
});
|
||||
|
||||
// Button 3: help
|
||||
ImageButton actionHelpButton = (ImageButton)findViewById(R.id.action_button_3);
|
||||
actionHelpButton.setImageResource(R.drawable.ic_menu_help);
|
||||
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.setImageResource(R.drawable.ic_menu_settings);
|
||||
actionSettingsButton.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
startActivity(new Intent(SearchActivity.this, SettingsActivity.class));
|
||||
}
|
||||
});
|
||||
|
||||
onNewIntent(getIntent());
|
||||
}
|
||||
|
||||
|
|
|
@ -170,8 +170,14 @@ public class SelectAlbumActivity extends SubsonicTabActivity {
|
|||
getMusicDirectory(id, name);
|
||||
}
|
||||
|
||||
// Button 1: play all
|
||||
playAllButton = (ImageButton) findViewById(R.id.action_button_1);
|
||||
// Button 1: gone
|
||||
findViewById(R.id.action_button_1).setVisibility(View.GONE);
|
||||
|
||||
// Button 2: gone
|
||||
findViewById(R.id.action_button_2).setVisibility(View.GONE);
|
||||
|
||||
// Button 3: play all
|
||||
playAllButton = (ImageButton) findViewById(R.id.action_button_3);
|
||||
playAllButton.setImageResource(R.drawable.ic_menu_play_all);
|
||||
playAllButton.setVisibility(View.GONE);
|
||||
playAllButton.setOnClickListener(new View.OnClickListener() {
|
||||
|
@ -181,8 +187,8 @@ public class SelectAlbumActivity extends SubsonicTabActivity {
|
|||
}
|
||||
});
|
||||
|
||||
// Button 2: refresh
|
||||
ImageButton refreshButton = (ImageButton) findViewById(R.id.action_button_2);
|
||||
// Button 4: refresh
|
||||
ImageButton refreshButton = (ImageButton) findViewById(R.id.action_button_4);
|
||||
refreshButton.setImageResource(R.drawable.ic_menu_refresh);
|
||||
refreshButton.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
|
@ -190,26 +196,6 @@ public class SelectAlbumActivity extends SubsonicTabActivity {
|
|||
refresh();
|
||||
}
|
||||
});
|
||||
|
||||
// Button 3: help
|
||||
ImageButton actionHelpButton = (ImageButton)findViewById(R.id.action_button_3);
|
||||
actionHelpButton.setImageResource(R.drawable.ic_menu_help);
|
||||
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.setImageResource(R.drawable.ic_menu_settings);
|
||||
actionSettingsButton.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
startActivity(new Intent(SelectAlbumActivity.this, SettingsActivity.class));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void playAll() {
|
||||
|
|
|
@ -76,8 +76,14 @@ public class SelectArtistActivity extends SubsonicTabActivity implements Adapter
|
|||
|
||||
setTitle(Util.isOffline(this) ? R.string.music_library_label_offline : R.string.music_library_label);
|
||||
|
||||
// Button 1: shuffle
|
||||
ImageButton shuffleButton = (ImageButton) findViewById(R.id.action_button_1);
|
||||
// Button 1: gone
|
||||
findViewById(R.id.action_button_1).setVisibility(View.GONE);
|
||||
|
||||
// Button 2: gone
|
||||
findViewById(R.id.action_button_2).setVisibility(View.GONE);
|
||||
|
||||
// Button 3: shuffle
|
||||
ImageButton shuffleButton = (ImageButton) findViewById(R.id.action_button_3);
|
||||
shuffleButton.setImageResource(R.drawable.ic_menu_shuffle);
|
||||
shuffleButton.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
|
@ -88,8 +94,8 @@ public class SelectArtistActivity extends SubsonicTabActivity implements Adapter
|
|||
}
|
||||
});
|
||||
|
||||
// Button 2: refresh
|
||||
ImageButton refreshButton = (ImageButton) findViewById(R.id.action_button_2);
|
||||
// Button 4: refresh
|
||||
ImageButton refreshButton = (ImageButton) findViewById(R.id.action_button_4);
|
||||
refreshButton.setImageResource(R.drawable.ic_menu_refresh);
|
||||
refreshButton.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
|
@ -98,25 +104,7 @@ public class SelectArtistActivity extends SubsonicTabActivity implements Adapter
|
|||
}
|
||||
});
|
||||
|
||||
// Button 3: help
|
||||
ImageButton actionHelpButton = (ImageButton)findViewById(R.id.action_button_3);
|
||||
actionHelpButton.setImageResource(R.drawable.ic_menu_help);
|
||||
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.setImageResource(R.drawable.ic_menu_settings);
|
||||
actionSettingsButton.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
startActivity(new Intent(SelectArtistActivity.this, SettingsActivity.class));
|
||||
}
|
||||
});
|
||||
|
||||
musicFolders = null;
|
||||
load();
|
||||
|
|
|
@ -61,11 +61,16 @@ public class SelectPlaylistActivity extends SubsonicTabActivity implements Adapt
|
|||
setTitle(R.string.playlist_label);
|
||||
|
||||
// Button 1: gone
|
||||
ImageButton searchButton = (ImageButton)findViewById(R.id.action_button_1);
|
||||
searchButton.setVisibility(View.GONE);
|
||||
findViewById(R.id.action_button_1).setVisibility(View.GONE);
|
||||
|
||||
// Button 2: refresh
|
||||
ImageButton refreshButton = (ImageButton) findViewById(R.id.action_button_2);
|
||||
// Button 2: gone
|
||||
findViewById(R.id.action_button_2).setVisibility(View.GONE);
|
||||
|
||||
// Button 3: gone
|
||||
findViewById(R.id.action_button_3).setVisibility(View.GONE);
|
||||
|
||||
// Button 4: refresh
|
||||
ImageButton refreshButton = (ImageButton) findViewById(R.id.action_button_4);
|
||||
refreshButton.setImageResource(R.drawable.ic_menu_refresh);
|
||||
refreshButton.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
|
@ -74,26 +79,6 @@ public class SelectPlaylistActivity extends SubsonicTabActivity implements Adapt
|
|||
}
|
||||
});
|
||||
|
||||
// Button 3: help
|
||||
ImageButton actionHelpButton = (ImageButton)findViewById(R.id.action_button_3);
|
||||
actionHelpButton.setImageResource(R.drawable.ic_menu_help);
|
||||
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.setImageResource(R.drawable.ic_menu_settings);
|
||||
actionSettingsButton.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
startActivity(new Intent(SelectPlaylistActivity.this, SettingsActivity.class));
|
||||
}
|
||||
});
|
||||
|
||||
load();
|
||||
}
|
||||
|
||||
|
|
|
@ -66,7 +66,8 @@ public class ImageLoader implements Runnable {
|
|||
// Determine the density-dependent image sizes.
|
||||
imageSizeDefault = context.getResources().getDrawable(R.drawable.unknown_album).getIntrinsicHeight();
|
||||
DisplayMetrics metrics = context.getResources().getDisplayMetrics();
|
||||
imageSizeLarge = (int) Math.round(Math.min(metrics.widthPixels, metrics.heightPixels) * 0.6);
|
||||
/*imageSizeLarge = (int) Math.round(Math.min(metrics.widthPixels, metrics.heightPixels) * 0.6);*/
|
||||
imageSizeLarge = (int) Math.round(Math.min(metrics.widthPixels, metrics.heightPixels));
|
||||
|
||||
for (int i = 0; i < CONCURRENCY; i++) {
|
||||
new Thread(this, "ImageLoader").start();
|
||||
|
@ -98,7 +99,7 @@ public class ImageLoader implements Runnable {
|
|||
if (!large) {
|
||||
setUnknownImage(view, large);
|
||||
}
|
||||
queue.offer(new Task(view, entry, size, large, large, crossfade));
|
||||
queue.offer(new Task(view, entry, size, false, large, crossfade));
|
||||
}
|
||||
|
||||
private String getKey(String coverArtId, int size) {
|
||||
|
|
Loading…
Reference in New Issue