diff options
Diffstat (limited to 'src/de/danoeh/antennapod/activity')
6 files changed, 40 insertions, 12 deletions
diff --git a/src/de/danoeh/antennapod/activity/AudioplayerActivity.java b/src/de/danoeh/antennapod/activity/AudioplayerActivity.java index 50f5d8f2e..18d27ddda 100644 --- a/src/de/danoeh/antennapod/activity/AudioplayerActivity.java +++ b/src/de/danoeh/antennapod/activity/AudioplayerActivity.java @@ -343,7 +343,6 @@ public class AudioplayerActivity extends MediaplayerActivity implements ItemDesc } else { ft.add(R.id.contentView, currentlyShownFragment); } - ft.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_OPEN); ft.disallowAddToBackStack(); ft.commit(); updateNavButtonDrawable(); @@ -383,6 +382,7 @@ public class AudioplayerActivity extends MediaplayerActivity implements ItemDesc public void run() { PicassoProvider.getMediaMetadataPicassoInstance(AudioplayerActivity.this) .load(media.getImageUri()) + .fit() .into(butNavLeft); } }); @@ -399,6 +399,7 @@ public class AudioplayerActivity extends MediaplayerActivity implements ItemDesc public void run() { PicassoProvider.getMediaMetadataPicassoInstance(AudioplayerActivity.this) .load(media.getImageUri()) + .fit() .into(butNavLeft); } diff --git a/src/de/danoeh/antennapod/activity/DefaultOnlineFeedViewActivity.java b/src/de/danoeh/antennapod/activity/DefaultOnlineFeedViewActivity.java index 86b278bf0..e8bc75293 100644 --- a/src/de/danoeh/antennapod/activity/DefaultOnlineFeedViewActivity.java +++ b/src/de/danoeh/antennapod/activity/DefaultOnlineFeedViewActivity.java @@ -122,11 +122,10 @@ public class DefaultOnlineFeedViewActivity extends OnlineFeedViewActivity { subscribeButton = (Button) header.findViewById(R.id.butSubscribe); - if (feed.getImage() != null) { - int imageSize = (int) getResources().getDimension(R.dimen.thumbnail_length); + if (feed.getImage() != null && StringUtils.isNoneBlank(feed.getImage().getDownload_url())) { PicassoProvider.getDefaultPicassoInstance(this) .load(feed.getImage().getDownload_url()) - .resize(imageSize, imageSize) + .fit() .into(cover); } diff --git a/src/de/danoeh/antennapod/activity/FeedInfoActivity.java b/src/de/danoeh/antennapod/activity/FeedInfoActivity.java index b46bc7546..5cf187eb6 100644 --- a/src/de/danoeh/antennapod/activity/FeedInfoActivity.java +++ b/src/de/danoeh/antennapod/activity/FeedInfoActivity.java @@ -80,6 +80,7 @@ public class FeedInfoActivity extends ActionBarActivity { public void run() { PicassoProvider.getDefaultPicassoInstance(FeedInfoActivity.this) .load(feed.getImageUri()) + .fit() .into(imgvCover); } }); diff --git a/src/de/danoeh/antennapod/activity/MediaplayerActivity.java b/src/de/danoeh/antennapod/activity/MediaplayerActivity.java index 13e7b8a82..2e5372b60 100644 --- a/src/de/danoeh/antennapod/activity/MediaplayerActivity.java +++ b/src/de/danoeh/antennapod/activity/MediaplayerActivity.java @@ -502,18 +502,24 @@ public abstract class MediaplayerActivity extends ActionBarActivity @Override public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) { - prog = controller.onSeekBarProgressChanged(seekBar, progress, fromUser, - txtvPosition); + if (controller != null) { + prog = controller.onSeekBarProgressChanged(seekBar, progress, fromUser, + txtvPosition); + } } @Override public void onStartTrackingTouch(SeekBar seekBar) { - controller.onSeekBarStartTrackingTouch(seekBar); + if (controller != null) { + controller.onSeekBarStartTrackingTouch(seekBar); + } } @Override public void onStopTrackingTouch(SeekBar seekBar) { - controller.onSeekBarStopTrackingTouch(seekBar, prog); + if (controller != null) { + controller.onSeekBarStopTrackingTouch(seekBar, prog); + } } } diff --git a/src/de/danoeh/antennapod/activity/PreferenceActivity.java b/src/de/danoeh/antennapod/activity/PreferenceActivity.java index cd6731c02..a21985bb8 100644 --- a/src/de/danoeh/antennapod/activity/PreferenceActivity.java +++ b/src/de/danoeh/antennapod/activity/PreferenceActivity.java @@ -9,6 +9,7 @@ import android.content.res.Resources.Theme; import android.net.wifi.WifiConfiguration; import android.net.wifi.WifiManager; import android.os.Bundle; +import android.os.Build; import android.preference.CheckBoxPreference; import android.preference.ListPreference; import android.preference.Preference; @@ -60,6 +61,9 @@ public class PreferenceActivity extends android.preference.PreferenceActivity { private static final String PREF_GPODNET_LOGOUT = "pref_gpodnet_logout"; private static final String PREF_GPODNET_HOSTNAME = "pref_gpodnet_hostname"; + private static final String PREF_EXPANDED_NOTIFICATION = "prefExpandNotify"; + private static final String PREF_PERSISTENT_NOTIFICATION = "prefPersistNotify"; + private CheckBoxPreference[] selectedNetworks; @SuppressLint("NewApi") @@ -77,6 +81,23 @@ public class PreferenceActivity extends android.preference.PreferenceActivity { } addPreferencesFromResource(R.xml.preferences); + + if (android.os.Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN) { + // disable expanded notification option on unsupported android versions + findPreference(PREF_EXPANDED_NOTIFICATION).setEnabled(false); + findPreference(PREF_EXPANDED_NOTIFICATION).setOnPreferenceClickListener( + new OnPreferenceClickListener() { + + @Override + public boolean onPreferenceClick(Preference preference) { + Toast toast = Toast.makeText(PreferenceActivity.this, R.string.pref_expand_notify_unsupport_toast, Toast.LENGTH_SHORT); + toast.show(); + return true; + } + } + ); + } + findPreference(PREF_FLATTR_THIS_APP).setOnPreferenceClickListener( new OnPreferenceClickListener() { @@ -272,8 +293,6 @@ public class PreferenceActivity extends android.preference.PreferenceActivity { buildAutodownloadSelectedNetworsPreference(); setSelectedNetworksEnabled(UserPreferences .isEnableAutodownloadWifiFilter()); - - } private void updateGpodnetPreferenceScreen() { diff --git a/src/de/danoeh/antennapod/activity/gpoddernet/GpodnetAuthenticationActivity.java b/src/de/danoeh/antennapod/activity/gpoddernet/GpodnetAuthenticationActivity.java index cb6dc41cf..6a60f65fe 100644 --- a/src/de/danoeh/antennapod/activity/gpoddernet/GpodnetAuthenticationActivity.java +++ b/src/de/danoeh/antennapod/activity/gpoddernet/GpodnetAuthenticationActivity.java @@ -270,8 +270,10 @@ public class GpodnetAuthenticationActivity extends ActionBarActivity { @Override public void onClick(View v) { final int position = spinnerDevices.getSelectedItemPosition(); - selectedDevice = devices.get().get(position); - advance(); + if (position != AdapterView.INVALID_POSITION) { + selectedDevice = devices.get().get(position); + advance(); + } } }); } |