Merge branch 'develop' into typos
This commit is contained in:
commit
178ef66647
@ -71,6 +71,7 @@ android {
|
||||
versionName "${getMyVersionName()}"
|
||||
testApplicationId "de.test.antennapod"
|
||||
testInstrumentationRunner "de.test.antennapod.AntennaPodTestRunner"
|
||||
generatedDensities = []
|
||||
}
|
||||
|
||||
signingConfigs {
|
||||
@ -132,6 +133,10 @@ android {
|
||||
sourceCompatibility JavaVersion.VERSION_1_8
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
}
|
||||
|
||||
aaptOptions {
|
||||
additionalParameters "--no-version-vectors"
|
||||
}
|
||||
}
|
||||
|
||||
// about.html is templatized so that we can automatically insert
|
||||
|
@ -1,8 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="de.danoeh.antennapod"
|
||||
android:versionCode="1050008"
|
||||
android:versionName="1.5.0.8">
|
||||
android:versionCode="1050104"
|
||||
android:versionName="1.5.1.4">
|
||||
<!--
|
||||
Version code schema:
|
||||
"1.2.3-SNAPSHOT" -> 1020300
|
||||
|
@ -94,8 +94,8 @@ public class AudioplayerActivity extends MediaplayerActivity implements NavDrawe
|
||||
private int mPosition = -1;
|
||||
|
||||
private Playable media;
|
||||
private ViewPager mPager;
|
||||
private AudioplayerPagerAdapter mPagerAdapter;
|
||||
private ViewPager pager;
|
||||
private AudioplayerPagerAdapter pagerAdapter;
|
||||
|
||||
private Subscription subscription;
|
||||
|
||||
@ -116,8 +116,8 @@ public class AudioplayerActivity extends MediaplayerActivity implements NavDrawe
|
||||
// don't risk creating memory leaks
|
||||
navAdapter = null;
|
||||
drawerToggle = null;
|
||||
mPager = null;
|
||||
mPagerAdapter = null;
|
||||
pager = null;
|
||||
pagerAdapter = null;
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -126,27 +126,29 @@ public class AudioplayerActivity extends MediaplayerActivity implements NavDrawe
|
||||
}
|
||||
|
||||
private void saveCurrentFragment() {
|
||||
if(mPager == null) {
|
||||
if(pager == null) {
|
||||
return;
|
||||
}
|
||||
Log.d(TAG, "Saving preferences");
|
||||
SharedPreferences prefs = getSharedPreferences(PREFS, MODE_PRIVATE);
|
||||
prefs.edit()
|
||||
.putInt(PREF_KEY_SELECTED_FRAGMENT_POSITION, mPager.getCurrentItem())
|
||||
.putInt(PREF_KEY_SELECTED_FRAGMENT_POSITION, pager.getCurrentItem())
|
||||
.commit();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onConfigurationChanged(Configuration newConfig) {
|
||||
super.onConfigurationChanged(newConfig);
|
||||
drawerToggle.onConfigurationChanged(newConfig);
|
||||
if(drawerToggle != null) {
|
||||
drawerToggle.onConfigurationChanged(newConfig);
|
||||
}
|
||||
}
|
||||
|
||||
private void loadLastFragment() {
|
||||
Log.d(TAG, "Restoring instance state");
|
||||
SharedPreferences prefs = getSharedPreferences(PREFS, MODE_PRIVATE);
|
||||
int lastPosition = prefs.getInt(PREF_KEY_SELECTED_FRAGMENT_POSITION, -1);
|
||||
mPager.setCurrentItem(lastPosition);
|
||||
pager.setCurrentItem(lastPosition);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -166,9 +168,9 @@ public class AudioplayerActivity extends MediaplayerActivity implements NavDrawe
|
||||
true);
|
||||
startService(launchIntent);
|
||||
}
|
||||
if(mPagerAdapter != null && controller != null && controller.getMedia() != media) {
|
||||
if(pagerAdapter != null && controller != null && controller.getMedia() != media) {
|
||||
media = controller.getMedia();
|
||||
mPagerAdapter.onMediaChanged(media);
|
||||
pagerAdapter.onMediaChanged(media);
|
||||
}
|
||||
|
||||
EventDistributor.getInstance().register(contentUpdate);
|
||||
@ -255,13 +257,13 @@ public class AudioplayerActivity extends MediaplayerActivity implements NavDrawe
|
||||
startActivity(new Intent(AudioplayerActivity.this, PreferenceController.getPreferenceActivity()));
|
||||
});
|
||||
|
||||
mPager = (ViewPager) findViewById(R.id.pager);
|
||||
mPagerAdapter = new AudioplayerPagerAdapter(getSupportFragmentManager());
|
||||
mPager.setAdapter(mPagerAdapter);
|
||||
pager = (ViewPager) findViewById(R.id.pager);
|
||||
pagerAdapter = new AudioplayerPagerAdapter(getSupportFragmentManager());
|
||||
pager.setAdapter(pagerAdapter);
|
||||
CirclePageIndicator pageIndicator = (CirclePageIndicator) findViewById(R.id.page_indicator);
|
||||
pageIndicator.setViewPager(mPager);
|
||||
pageIndicator.setViewPager(pager);
|
||||
loadLastFragment();
|
||||
mPager.onSaveInstanceState();
|
||||
pager.onSaveInstanceState();
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -277,13 +279,16 @@ public class AudioplayerActivity extends MediaplayerActivity implements NavDrawe
|
||||
}
|
||||
if(controller.getMedia() != media) {
|
||||
media = controller.getMedia();
|
||||
mPagerAdapter.onMediaChanged(media);
|
||||
pagerAdapter.onMediaChanged(media);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public void notifyMediaPositionChanged() {
|
||||
ChaptersFragment chaptersFragment = mPagerAdapter.getChaptersFragment();
|
||||
if(pagerAdapter == null) {
|
||||
return;
|
||||
}
|
||||
ChaptersFragment chaptersFragment = pagerAdapter.getChaptersFragment();
|
||||
if(chaptersFragment != null) {
|
||||
ChaptersListAdapter adapter = (ChaptersListAdapter) chaptersFragment.getListAdapter();
|
||||
if (adapter != null) {
|
||||
@ -411,13 +416,13 @@ public class AudioplayerActivity extends MediaplayerActivity implements NavDrawe
|
||||
public void onBackPressed() {
|
||||
if(isDrawerOpen()) {
|
||||
drawerLayout.closeDrawer(navDrawer);
|
||||
} else if (mPager.getCurrentItem() == 0) {
|
||||
} else if (pager == null || pager.getCurrentItem() == 0) {
|
||||
// If the user is currently looking at the first step, allow the system to handle the
|
||||
// Back button. This calls finish() on this activity and pops the back stack.
|
||||
super.onBackPressed();
|
||||
} else {
|
||||
// Otherwise, select the previous step.
|
||||
mPager.setCurrentItem(mPager.getCurrentItem() - 1);
|
||||
pager.setCurrentItem(pager.getCurrentItem() - 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -31,6 +31,8 @@ import com.bumptech.glide.Glide;
|
||||
import com.joanzapata.iconify.IconDrawable;
|
||||
import com.joanzapata.iconify.fonts.FontAwesomeIcons;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
import de.danoeh.antennapod.R;
|
||||
import de.danoeh.antennapod.core.feed.FeedItem;
|
||||
import de.danoeh.antennapod.core.feed.FeedMedia;
|
||||
@ -206,8 +208,10 @@ public abstract class MediaplayerActivity extends AppCompatActivity implements O
|
||||
@Override
|
||||
protected void onPause() {
|
||||
super.onPause();
|
||||
controller.reinitServiceIfPaused();
|
||||
controller.pause();
|
||||
if(controller != null) {
|
||||
controller.reinitServiceIfPaused();
|
||||
controller.pause();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -229,8 +233,7 @@ public abstract class MediaplayerActivity extends AppCompatActivity implements O
|
||||
|
||||
protected void onBufferUpdate(float progress) {
|
||||
if (sbPosition != null) {
|
||||
sbPosition.setSecondaryProgress((int) progress
|
||||
* sbPosition.getMax());
|
||||
sbPosition.setSecondaryProgress((int) progress * sbPosition.getMax());
|
||||
}
|
||||
}
|
||||
|
||||
@ -246,6 +249,9 @@ public abstract class MediaplayerActivity extends AppCompatActivity implements O
|
||||
controller.release();
|
||||
}
|
||||
controller = newPlaybackController();
|
||||
if(butPlay != null) {
|
||||
butPlay.setOnClickListener(controller.newOnPlayButtonClickListener());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -454,9 +460,10 @@ public abstract class MediaplayerActivity extends AppCompatActivity implements O
|
||||
if(controller != null && controller.canSetPlaybackSpeed()) {
|
||||
float playbackSpeed = (progress + 10) / 20.0f;
|
||||
controller.setPlaybackSpeed(playbackSpeed);
|
||||
String speed = String.format("%.2f", playbackSpeed);
|
||||
UserPreferences.setPlaybackSpeed(speed);
|
||||
txtvPlaybackSpeed.setText(speed + "x");
|
||||
String speedPref = String.format(Locale.US, "%.2f", playbackSpeed);
|
||||
UserPreferences.setPlaybackSpeed(speedPref);
|
||||
String speedStr = String.format("%.2fx", playbackSpeed);
|
||||
txtvPlaybackSpeed.setText(speedStr);
|
||||
} else if(fromUser) {
|
||||
float speed = Float.valueOf(UserPreferences.getPlaybackSpeed());
|
||||
barPlaybackSpeed.post(() -> {
|
||||
@ -583,7 +590,9 @@ public abstract class MediaplayerActivity extends AppCompatActivity implements O
|
||||
super.onResume();
|
||||
Log.d(TAG, "onResume()");
|
||||
StorageUtils.checkStorageAvailability(this);
|
||||
controller.init();
|
||||
if(controller != null) {
|
||||
controller.init();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -597,32 +606,31 @@ public abstract class MediaplayerActivity extends AppCompatActivity implements O
|
||||
protected abstract void clearStatusMsg();
|
||||
|
||||
protected void onPositionObserverUpdate() {
|
||||
if (controller != null) {
|
||||
int currentPosition = controller.getPosition();
|
||||
int duration = controller.getDuration();
|
||||
Log.d(TAG, "currentPosition " + Converter
|
||||
.getDurationStringLong(currentPosition));
|
||||
if (currentPosition != PlaybackService.INVALID_TIME
|
||||
&& duration != PlaybackService.INVALID_TIME
|
||||
&& controller.getMedia() != null) {
|
||||
txtvPosition.setText(Converter
|
||||
.getDurationStringLong(currentPosition));
|
||||
if (showTimeLeft) {
|
||||
txtvLength.setText("-" + Converter
|
||||
.getDurationStringLong(duration - currentPosition));
|
||||
} else {
|
||||
txtvLength.setText(Converter
|
||||
.getDurationStringLong(duration));
|
||||
}
|
||||
updateProgressbarPosition(currentPosition, duration);
|
||||
} else {
|
||||
Log.w(TAG, "Could not react to position observer update because of invalid time");
|
||||
}
|
||||
if (controller == null || txtvPosition == null || txtvLength == null) {
|
||||
return;
|
||||
}
|
||||
int currentPosition = controller.getPosition();
|
||||
int duration = controller.getDuration();
|
||||
Log.d(TAG, "currentPosition " + Converter.getDurationStringLong(currentPosition));
|
||||
if (currentPosition == PlaybackService.INVALID_TIME ||
|
||||
duration == PlaybackService.INVALID_TIME) {
|
||||
Log.w(TAG, "Could not react to position observer update because of invalid time");
|
||||
return;
|
||||
}
|
||||
txtvPosition.setText(Converter.getDurationStringLong(currentPosition));
|
||||
if (showTimeLeft) {
|
||||
txtvLength.setText("-" + Converter.getDurationStringLong(duration - currentPosition));
|
||||
} else {
|
||||
txtvLength.setText(Converter.getDurationStringLong(duration));
|
||||
}
|
||||
updateProgressbarPosition(currentPosition, duration);
|
||||
}
|
||||
|
||||
private void updateProgressbarPosition(int position, int duration) {
|
||||
Log.d(TAG, "updateProgressbarPosition(" + position + ", " + duration + ")");
|
||||
if(sbPosition == null) {
|
||||
return;
|
||||
}
|
||||
float progress = ((float) position) / duration;
|
||||
sbPosition.setProgress((int) (progress * sbPosition.getMax()));
|
||||
}
|
||||
@ -639,17 +647,7 @@ public abstract class MediaplayerActivity extends AppCompatActivity implements O
|
||||
SharedPreferences prefs = getSharedPreferences(PREFS, MODE_PRIVATE);
|
||||
showTimeLeft = prefs.getBoolean(PREF_SHOW_TIME_LEFT, false);
|
||||
if (media != null) {
|
||||
txtvPosition.setText(Converter.getDurationStringLong((media.getPosition())));
|
||||
|
||||
if (media.getDuration() != 0) {
|
||||
txtvLength.setText(Converter.getDurationStringLong(media.getDuration()));
|
||||
float progress = ((float) media.getPosition()) / media.getDuration();
|
||||
sbPosition.setProgress((int) (progress * sbPosition.getMax()));
|
||||
if (showTimeLeft) {
|
||||
int timeLeft = media.getDuration() - media.getPosition();
|
||||
txtvLength.setText("-" + Converter.getDurationStringLong(timeLeft));
|
||||
}
|
||||
}
|
||||
onPositionObserverUpdate();
|
||||
checkFavorite();
|
||||
if(butPlaybackSpeed != null) {
|
||||
if (controller == null) {
|
||||
@ -857,8 +855,7 @@ public abstract class MediaplayerActivity extends AppCompatActivity implements O
|
||||
void handleError(int errorCode) {
|
||||
final AlertDialog.Builder errorDialog = new AlertDialog.Builder(this);
|
||||
errorDialog.setTitle(R.string.error_label);
|
||||
errorDialog
|
||||
.setMessage(MediaPlayerError.getErrorString(this, errorCode));
|
||||
errorDialog.setMessage(MediaPlayerError.getErrorString(this, errorCode));
|
||||
errorDialog.setNeutralButton("OK",
|
||||
(dialog, which) -> {
|
||||
dialog.dismiss();
|
||||
@ -872,19 +869,22 @@ public abstract class MediaplayerActivity extends AppCompatActivity implements O
|
||||
|
||||
@Override
|
||||
public void onProgressChanged (SeekBar seekBar,int progress, boolean fromUser) {
|
||||
if (controller != null) {
|
||||
prog = controller.onSeekBarProgressChanged(seekBar, progress, fromUser, txtvPosition);
|
||||
if (showTimeLeft && prog != 0) {
|
||||
int duration = controller.getDuration();
|
||||
String length = "-" + Converter.getDurationStringLong(duration - (int) (prog * duration));
|
||||
txtvLength.setText(length);
|
||||
}
|
||||
if (controller == null || txtvLength == null) {
|
||||
return;
|
||||
}
|
||||
prog = controller.onSeekBarProgressChanged(seekBar, progress, fromUser, txtvPosition);
|
||||
if (showTimeLeft && prog != 0) {
|
||||
int duration = controller.getDuration();
|
||||
String length = "-" + Converter.getDurationStringLong(duration - (int) (prog * duration));
|
||||
txtvLength.setText(length);
|
||||
}
|
||||
}
|
||||
|
||||
private void updateButPlaybackSpeed() {
|
||||
if (controller != null && butPlaybackSpeed != null) {
|
||||
butPlaybackSpeed.setText(UserPreferences.getPlaybackSpeed() + "x");
|
||||
float speed = Float.valueOf(UserPreferences.getPlaybackSpeed());
|
||||
String speedStr = String.format("%.2fx", speed);
|
||||
butPlaybackSpeed.setText(speedStr);
|
||||
}
|
||||
}
|
||||
|
||||
@ -904,21 +904,25 @@ public abstract class MediaplayerActivity extends AppCompatActivity implements O
|
||||
|
||||
private void checkFavorite() {
|
||||
Playable playable = controller.getMedia();
|
||||
if (playable != null && playable instanceof FeedMedia) {
|
||||
FeedItem feedItem = ((FeedMedia) playable).getItem();
|
||||
if (feedItem != null) {
|
||||
Observable.fromCallable(() -> DBReader.getFeedItem(feedItem.getId()))
|
||||
.subscribeOn(Schedulers.newThread())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(item -> {
|
||||
boolean isFav = item.isTagged(FeedItem.TAG_FAVORITE);
|
||||
if(isFavorite != isFav) {
|
||||
isFavorite = isFav;
|
||||
invalidateOptionsMenu();
|
||||
}
|
||||
});
|
||||
}
|
||||
if (playable != null && playable instanceof FeedMedia) {
|
||||
FeedItem feedItem = ((FeedMedia) playable).getItem();
|
||||
if (feedItem != null) {
|
||||
Observable.fromCallable(() -> DBReader.getFeedItem(feedItem.getId()))
|
||||
.subscribeOn(Schedulers.newThread())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(
|
||||
item -> {
|
||||
boolean isFav = item.isTagged(FeedItem.TAG_FAVORITE);
|
||||
if (isFavorite != isFav) {
|
||||
isFavorite = isFav;
|
||||
invalidateOptionsMenu();
|
||||
}
|
||||
}, error -> {
|
||||
Log.e(TAG, Log.getStackTraceString(error));
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -202,7 +202,8 @@ public class AllEpisodesRecycleAdapter extends RecyclerView.Adapter<AllEpisodesR
|
||||
|
||||
@Override
|
||||
public long getItemId(int position) {
|
||||
return position;
|
||||
FeedItem item = itemAccess.getItem(position);
|
||||
return item != null ? item.getId() : RecyclerView.NO_POSITION;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -232,7 +232,7 @@ public class NavListAdapter extends BaseAdapter
|
||||
int spaceUsed = itemAccess.getNumberOfDownloadedItems() -
|
||||
itemAccess.getReclaimableItems();
|
||||
|
||||
if (spaceUsed >= epCacheSize) {
|
||||
if (epCacheSize > 0 && spaceUsed >= epCacheSize) {
|
||||
holder.count.setText("{md-disc-full 150%}");
|
||||
Iconify.addIcons(holder.count);
|
||||
holder.count.setVisibility(View.VISIBLE);
|
||||
|
@ -109,6 +109,12 @@ public class QueueRecyclerAdapter extends RecyclerView.Adapter<QueueRecyclerAdap
|
||||
return selectedItem;
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getItemId(int position) {
|
||||
FeedItem item = itemAccess.getItem(position);
|
||||
return item != null ? item.getId() : RecyclerView.NO_POSITION;
|
||||
}
|
||||
|
||||
public int getItemCount() {
|
||||
return itemAccess.getCount();
|
||||
}
|
||||
|
@ -337,6 +337,7 @@ public class AllEpisodesFragment extends Fragment {
|
||||
MainActivity mainActivity = activity.get();
|
||||
listAdapter = new AllEpisodesRecycleAdapter(mainActivity, itemAccess,
|
||||
new DefaultActionButtonCallback(mainActivity), showOnlyNewEpisodes());
|
||||
listAdapter.setHasStableIds(true);
|
||||
recyclerView.setAdapter(listAdapter);
|
||||
}
|
||||
listAdapter.notifyDataSetChanged();
|
||||
|
@ -63,12 +63,7 @@ public class CoverFragment extends Fragment implements AudioplayerContentFragmen
|
||||
}
|
||||
|
||||
private void loadMediaInfo() {
|
||||
if(imgvCover == null) {
|
||||
return;
|
||||
}
|
||||
if (media != null) {
|
||||
Log.d(TAG, "feed title: " + media.getFeedTitle());
|
||||
Log.d(TAG, "episode title: " + media.getEpisodeTitle());
|
||||
txtvPodcastTitle.setText(media.getFeedTitle());
|
||||
txtvEpisodeTitle.setText(media.getEpisodeTitle());
|
||||
Glide.with(this)
|
||||
@ -103,7 +98,7 @@ public class CoverFragment extends Fragment implements AudioplayerContentFragmen
|
||||
|
||||
@Override
|
||||
public void onMediaChanged(Playable media) {
|
||||
if(this.media == media) {
|
||||
if(!isAdded() || this.media == media) {
|
||||
return;
|
||||
}
|
||||
this.media = media;
|
||||
|
@ -62,7 +62,6 @@ public class ItemDescriptionFragment extends Fragment implements AudioplayerCont
|
||||
private static final String ARG_HIGHLIGHT_TIMECODES = "arg.highlightTimecodes";
|
||||
|
||||
private WebView webvDescription;
|
||||
private String webvData;
|
||||
|
||||
private ShownotesProvider shownotesProvider;
|
||||
private Playable media;
|
||||
@ -309,7 +308,6 @@ public class ItemDescriptionFragment extends Fragment implements AudioplayerCont
|
||||
.subscribeOn(Schedulers.newThread())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(data -> {
|
||||
webvData = data;
|
||||
webvDescription.loadDataWithBaseURL(null, data, "text/html",
|
||||
"utf-8", "about:blank");
|
||||
Log.d(TAG, "Webview loaded");
|
||||
@ -384,7 +382,7 @@ public class ItemDescriptionFragment extends Fragment implements AudioplayerCont
|
||||
|
||||
@Override
|
||||
public void onMediaChanged(Playable media) {
|
||||
if(this.media == media) {
|
||||
if(this.media == media || webvDescription == null) {
|
||||
return;
|
||||
}
|
||||
this.media = media;
|
||||
|
@ -124,7 +124,7 @@ public class ItunesSearchFragment extends Fragment {
|
||||
} else {
|
||||
gridView.setVisibility(View.GONE);
|
||||
progressBar.setVisibility(View.VISIBLE);
|
||||
rx.Observable.create((Observable.OnSubscribe<String>) subscriber -> {
|
||||
subscription = Observable.create((Observable.OnSubscribe<String>) subscriber -> {
|
||||
OkHttpClient client = AntennapodHttpClient.getHttpClient();
|
||||
Request.Builder httpReq = new Request.Builder()
|
||||
.url(podcast.feedUrl)
|
||||
@ -233,7 +233,7 @@ public class ItunesSearchFragment extends Fragment {
|
||||
butRetry.setVisibility(View.GONE);
|
||||
txtvEmpty.setVisibility(View.GONE);
|
||||
progressBar.setVisibility(View.VISIBLE);
|
||||
subscription = rx.Observable.create((Observable.OnSubscribe<List<Podcast>>) subscriber -> {
|
||||
subscription = Observable.create((Observable.OnSubscribe<List<Podcast>>) subscriber -> {
|
||||
String lang = Locale.getDefault().getLanguage();
|
||||
String url = "https://itunes.apple.com/" + lang + "/rss/toppodcasts/limit=25/explicit=true/json";
|
||||
OkHttpClient client = AntennapodHttpClient.getHttpClient();
|
||||
|
@ -474,6 +474,7 @@ public class QueueFragment extends Fragment {
|
||||
MainActivity activity = (MainActivity) getActivity();
|
||||
recyclerAdapter = new QueueRecyclerAdapter(activity, itemAccess,
|
||||
new DefaultActionButtonCallback(activity), itemTouchHelper);
|
||||
recyclerAdapter.setHasStableIds(true);
|
||||
recyclerView.setAdapter(recyclerAdapter);
|
||||
}
|
||||
if(queue == null || queue.size() == 0) {
|
||||
|
@ -23,7 +23,7 @@
|
||||
<android.support.v7.widget.RecyclerView
|
||||
android:id="@+id/recyclerView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_below="@id/divider"
|
||||
android:scrollbars="vertical"/>
|
||||
|
||||
|
@ -41,7 +41,7 @@ project.ext {
|
||||
minSdkVersion = 10
|
||||
targetSdkVersion = 23
|
||||
|
||||
supportVersion = "23.1.1"
|
||||
supportVersion = "23.2.0"
|
||||
commonsioVersion = "2.4"
|
||||
commonslangVersion = "3.4"
|
||||
eventbusVersion = "2.4.0"
|
||||
@ -49,7 +49,7 @@ project.ext {
|
||||
glideVersion = "3.6.1"
|
||||
iconifyVersion = "2.1.1"
|
||||
jsoupVersion = "1.7.3"
|
||||
materialDialogsVersion = "0.8.5.3@aar"
|
||||
materialDialogsVersion = "0.8.5.6@aar"
|
||||
okhttpVersion = "2.7.4"
|
||||
okioVersion = "1.6.0"
|
||||
recyclerviewFlexibledividerVersion = "1.2.6"
|
||||
@ -57,7 +57,7 @@ project.ext {
|
||||
rxJavaVersion = "1.1.0"
|
||||
rxJavaRulesVersion = "1.1.0.0"
|
||||
|
||||
audioPlayerVersion = "v1.0.12"
|
||||
audioPlayerVersion = "v1.0.14"
|
||||
}
|
||||
|
||||
task wrapper(type: Wrapper) {
|
||||
|
@ -19,14 +19,8 @@ public class DateUtils {
|
||||
|
||||
private static final String TAG = "DateUtils";
|
||||
|
||||
private static final SimpleDateFormat parser = new SimpleDateFormat("", Locale.US);
|
||||
private static final TimeZone defaultTimezone = TimeZone.getTimeZone("GMT");
|
||||
|
||||
static {
|
||||
parser.setLenient(false);
|
||||
parser.setTimeZone(defaultTimezone);
|
||||
}
|
||||
|
||||
public static Date parse(final String input) {
|
||||
if(input == null) {
|
||||
throw new IllegalArgumentException("Date must not be null");
|
||||
@ -86,6 +80,10 @@ public class DateUtils {
|
||||
"yyyy-MM-dd"
|
||||
};
|
||||
|
||||
SimpleDateFormat parser = new SimpleDateFormat("", Locale.US);
|
||||
parser.setLenient(false);
|
||||
parser.setTimeZone(defaultTimezone);
|
||||
|
||||
ParsePosition pos = new ParsePosition(0);
|
||||
for(String pattern : patterns) {
|
||||
parser.applyPattern(pattern);
|
||||
|
@ -63,6 +63,7 @@
|
||||
|
||||
<style name="Theme.AntennaPod.Dark" parent="Theme.AppCompat">
|
||||
<item name="colorAccent">@color/holo_blue_dark</item>
|
||||
<item name="colorControlNormal">@color/white</item>
|
||||
<item name="buttonStyle">@style/Widget.AntennaPod.Button</item>
|
||||
<item name="progressBarTheme">@style/ProgressBarDark</item>
|
||||
<item name="alertDialogTheme">@style/AntennaPod.Dialog.Dark</item>
|
||||
@ -186,6 +187,7 @@
|
||||
<item name="windowActionModeOverlay">true</item>
|
||||
<item name="progressBarTheme">@style/ProgressBarDark</item>
|
||||
<item name="colorAccent">@color/holo_blue_dark</item>
|
||||
<item name="colorControlNormal">@color/white</item>
|
||||
<item name="buttonStyle">@style/Widget.AntennaPod.Button</item>
|
||||
<item name="alertDialogTheme">@style/AntennaPod.Dialog.Dark</item>
|
||||
<item name="attr/action_about">@drawable/ic_info_white_24dp</item>
|
||||
|
Loading…
x
Reference in New Issue
Block a user