summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/src/main/java/de/danoeh/antennapod/activity/MediaplayerActivity.java2
-rw-r--r--app/src/main/java/de/danoeh/antennapod/adapter/AllEpisodesRecycleAdapter.java7
-rw-r--r--app/src/main/java/de/danoeh/antennapod/adapter/ChaptersListAdapter.java7
-rw-r--r--app/src/main/java/de/danoeh/antennapod/adapter/DownloadLogAdapter.java5
-rw-r--r--app/src/main/java/de/danoeh/antennapod/adapter/DownloadlistAdapter.java3
-rw-r--r--app/src/main/java/de/danoeh/antennapod/adapter/FeedItemlistAdapter.java11
-rw-r--r--app/src/main/java/de/danoeh/antennapod/adapter/QueueRecyclerAdapter.java7
-rw-r--r--app/src/main/java/de/danoeh/antennapod/fragment/ItemFragment.java4
-rw-r--r--app/src/main/res/layout/audio_controls.xml18
-rw-r--r--build.gradle4
10 files changed, 32 insertions, 36 deletions
diff --git a/app/src/main/java/de/danoeh/antennapod/activity/MediaplayerActivity.java b/app/src/main/java/de/danoeh/antennapod/activity/MediaplayerActivity.java
index bdc210651..d22fad320 100644
--- a/app/src/main/java/de/danoeh/antennapod/activity/MediaplayerActivity.java
+++ b/app/src/main/java/de/danoeh/antennapod/activity/MediaplayerActivity.java
@@ -412,7 +412,7 @@ public abstract class MediaplayerActivity extends AppCompatActivity implements O
case R.id.audio_controls:
MaterialDialog dialog = new MaterialDialog.Builder(this)
.title(R.string.audio_controls)
- .customView(R.layout.audio_controls, false)
+ .customView(R.layout.audio_controls, true)
.neutralText(R.string.close_label)
.onNeutral((dialog1, which) -> {
final SeekBar left = (SeekBar) dialog1.findViewById(R.id.volume_left);
diff --git a/app/src/main/java/de/danoeh/antennapod/adapter/AllEpisodesRecycleAdapter.java b/app/src/main/java/de/danoeh/antennapod/adapter/AllEpisodesRecycleAdapter.java
index d749b0313..c4bcc85f5 100644
--- a/app/src/main/java/de/danoeh/antennapod/adapter/AllEpisodesRecycleAdapter.java
+++ b/app/src/main/java/de/danoeh/antennapod/adapter/AllEpisodesRecycleAdapter.java
@@ -2,6 +2,7 @@ package de.danoeh.antennapod.adapter;
import android.graphics.drawable.Drawable;
import android.net.Uri;
+import android.support.v4.content.ContextCompat;
import android.support.v7.widget.RecyclerView;
import android.support.v7.widget.helper.ItemTouchHelper;
import android.util.Log;
@@ -70,11 +71,11 @@ public class AllEpisodesRecycleAdapter extends RecyclerView.Adapter<AllEpisodesR
this.showOnlyNewEpisodes = showOnlyNewEpisodes;
if(UserPreferences.getTheme() == R.style.Theme_AntennaPod_Dark) {
- playingBackGroundColor = mainActivity.getResources().getColor(R.color.highlight_dark);
+ playingBackGroundColor = ContextCompat.getColor(mainActivity, R.color.highlight_dark);
} else {
- playingBackGroundColor = mainActivity.getResources().getColor(R.color.highlight_light);
+ playingBackGroundColor = ContextCompat.getColor(mainActivity, R.color.highlight_light);
}
- normalBackGroundColor = mainActivity.getResources().getColor(android.R.color.transparent);
+ normalBackGroundColor = ContextCompat.getColor(mainActivity, android.R.color.transparent);
}
@Override
diff --git a/app/src/main/java/de/danoeh/antennapod/adapter/ChaptersListAdapter.java b/app/src/main/java/de/danoeh/antennapod/adapter/ChaptersListAdapter.java
index 1c9439ee6..8bde1097b 100644
--- a/app/src/main/java/de/danoeh/antennapod/adapter/ChaptersListAdapter.java
+++ b/app/src/main/java/de/danoeh/antennapod/adapter/ChaptersListAdapter.java
@@ -1,6 +1,7 @@
package de.danoeh.antennapod.adapter;
import android.content.Context;
+import android.support.v4.content.ContextCompat;
import android.text.Layout;
import android.text.Selection;
import android.text.Spannable;
@@ -132,13 +133,13 @@ public class ChaptersListAdapter extends ArrayAdapter<Chapter> {
if (current == sc) {
int playingBackGroundColor;
if(UserPreferences.getTheme() == R.style.Theme_AntennaPod_Dark) {
- playingBackGroundColor = getContext().getResources().getColor(R.color.highlight_dark);
+ playingBackGroundColor = ContextCompat.getColor(getContext(), R.color.highlight_dark);
} else {
- playingBackGroundColor = getContext().getResources().getColor(R.color.highlight_light);
+ playingBackGroundColor = ContextCompat.getColor(getContext(), R.color.highlight_light);
}
holder.view.setBackgroundColor(playingBackGroundColor);
} else {
- holder.view.setBackgroundColor(getContext().getResources().getColor(android.R.color.transparent));
+ holder.view.setBackgroundColor(ContextCompat.getColor(getContext(), android.R.color.transparent));
holder.title.setTextColor(defaultTextColor);
holder.start.setTextColor(defaultTextColor);
}
diff --git a/app/src/main/java/de/danoeh/antennapod/adapter/DownloadLogAdapter.java b/app/src/main/java/de/danoeh/antennapod/adapter/DownloadLogAdapter.java
index 893c92907..9ff80424c 100644
--- a/app/src/main/java/de/danoeh/antennapod/adapter/DownloadLogAdapter.java
+++ b/app/src/main/java/de/danoeh/antennapod/adapter/DownloadLogAdapter.java
@@ -1,6 +1,7 @@
package de.danoeh.antennapod.adapter;
import android.content.Context;
+import android.support.v4.content.ContextCompat;
import android.text.format.DateUtils;
import android.util.Log;
import android.view.LayoutInflater;
@@ -74,14 +75,14 @@ public class DownloadLogAdapter extends BaseAdapter {
status.getCompletionDate().getTime(),
System.currentTimeMillis(), 0, 0));
if (status.isSuccessful()) {
- holder.icon.setTextColor(convertView.getResources().getColor(
+ holder.icon.setTextColor(ContextCompat.getColor(convertView.getContext(),
R.color.download_success_green));
holder.icon.setText("{fa-check-circle}");
Iconify.addIcons(holder.icon);
holder.retry.setVisibility(View.GONE);
holder.reason.setVisibility(View.GONE);
} else {
- holder.icon.setTextColor(convertView.getResources().getColor(
+ holder.icon.setTextColor(ContextCompat.getColor(convertView.getContext(),
R.color.download_failed_red));
holder.icon.setText("{fa-times-circle}");
Iconify.addIcons(holder.icon);
diff --git a/app/src/main/java/de/danoeh/antennapod/adapter/DownloadlistAdapter.java b/app/src/main/java/de/danoeh/antennapod/adapter/DownloadlistAdapter.java
index 206d07f0f..4a0ff1f12 100644
--- a/app/src/main/java/de/danoeh/antennapod/adapter/DownloadlistAdapter.java
+++ b/app/src/main/java/de/danoeh/antennapod/adapter/DownloadlistAdapter.java
@@ -1,6 +1,7 @@
package de.danoeh.antennapod.adapter;
import android.content.Context;
+import android.support.v4.content.ContextCompat;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
@@ -74,7 +75,7 @@ public class DownloadlistAdapter extends BaseAdapter {
}
if (position == selectedItemIndex) {
- convertView.setBackgroundColor(convertView.getResources().getColor(
+ convertView.setBackgroundColor(ContextCompat.getColor(convertView.getContext(),
ThemeUtils.getSelectionBackgroundColor()));
} else {
convertView.setBackgroundResource(0);
diff --git a/app/src/main/java/de/danoeh/antennapod/adapter/FeedItemlistAdapter.java b/app/src/main/java/de/danoeh/antennapod/adapter/FeedItemlistAdapter.java
index e483738b4..7ca8d6a31 100644
--- a/app/src/main/java/de/danoeh/antennapod/adapter/FeedItemlistAdapter.java
+++ b/app/src/main/java/de/danoeh/antennapod/adapter/FeedItemlistAdapter.java
@@ -2,6 +2,7 @@ package de.danoeh.antennapod.adapter;
import android.content.Context;
import android.content.res.TypedArray;
+import android.support.v4.content.ContextCompat;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
@@ -59,11 +60,11 @@ public class FeedItemlistAdapter extends BaseAdapter {
this.makePlayedItemsTransparent = makePlayedItemsTransparent;
if(UserPreferences.getTheme() == R.style.Theme_AntennaPod_Dark) {
- playingBackGroundColor = context.getResources().getColor(R.color.highlight_dark);
+ playingBackGroundColor = ContextCompat.getColor(context, R.color.highlight_dark);
} else {
- playingBackGroundColor = context.getResources().getColor(R.color.highlight_light);
+ playingBackGroundColor = ContextCompat.getColor(context, R.color.highlight_light);
}
- normalBackGroundColor = context.getResources().getColor(android.R.color.transparent);
+ normalBackGroundColor = ContextCompat.getColor(context, android.R.color.transparent);
}
@Override
@@ -118,8 +119,8 @@ public class FeedItemlistAdapter extends BaseAdapter {
if (!(getItemViewType(position) == Adapter.IGNORE_ITEM_VIEW_TYPE)) {
convertView.setVisibility(View.VISIBLE);
if (position == selectedItemIndex) {
- convertView.setBackgroundColor(convertView.getResources()
- .getColor(ThemeUtils.getSelectionBackgroundColor()));
+ convertView.setBackgroundColor(ContextCompat.getColor(convertView.getContext(),
+ ThemeUtils.getSelectionBackgroundColor()));
} else {
convertView.setBackgroundResource(0);
}
diff --git a/app/src/main/java/de/danoeh/antennapod/adapter/QueueRecyclerAdapter.java b/app/src/main/java/de/danoeh/antennapod/adapter/QueueRecyclerAdapter.java
index d0266be6d..05562d2da 100644
--- a/app/src/main/java/de/danoeh/antennapod/adapter/QueueRecyclerAdapter.java
+++ b/app/src/main/java/de/danoeh/antennapod/adapter/QueueRecyclerAdapter.java
@@ -3,6 +3,7 @@ package de.danoeh.antennapod.adapter;
import android.graphics.drawable.Drawable;
import android.net.Uri;
import android.support.annotation.Nullable;
+import android.support.v4.content.ContextCompat;
import android.support.v4.view.MotionEventCompat;
import android.support.v7.widget.RecyclerView;
import android.support.v7.widget.helper.ItemTouchHelper;
@@ -78,11 +79,11 @@ public class QueueRecyclerAdapter extends RecyclerView.Adapter<QueueRecyclerAdap
locked = UserPreferences.isQueueLocked();
if(UserPreferences.getTheme() == R.style.Theme_AntennaPod_Dark) {
- playingBackGroundColor = mainActivity.getResources().getColor(R.color.highlight_dark);
+ playingBackGroundColor = ContextCompat.getColor(mainActivity, R.color.highlight_dark);
} else {
- playingBackGroundColor = mainActivity.getResources().getColor(R.color.highlight_light);
+ playingBackGroundColor = ContextCompat.getColor(mainActivity, R.color.highlight_light);
}
- normalBackGroundColor = mainActivity.getResources().getColor(android.R.color.transparent);
+ normalBackGroundColor = ContextCompat.getColor(mainActivity, android.R.color.transparent);
}
public void setLocked(boolean locked) {
diff --git a/app/src/main/java/de/danoeh/antennapod/fragment/ItemFragment.java b/app/src/main/java/de/danoeh/antennapod/fragment/ItemFragment.java
index ce80dc827..1382929af 100644
--- a/app/src/main/java/de/danoeh/antennapod/fragment/ItemFragment.java
+++ b/app/src/main/java/de/danoeh/antennapod/fragment/ItemFragment.java
@@ -9,6 +9,7 @@ import android.os.Build;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
+import android.support.v4.content.ContextCompat;
import android.text.TextUtils;
import android.util.Log;
import android.view.ContextMenu;
@@ -146,8 +147,7 @@ public class ItemFragment extends Fragment {
&& Build.VERSION.SDK_INT <= Build.VERSION_CODES.ICE_CREAM_SANDWICH_MR1) {
webvDescription.setLayerType(View.LAYER_TYPE_SOFTWARE, null);
}
- webvDescription.setBackgroundColor(getResources().getColor(
- R.color.black));
+ webvDescription.setBackgroundColor(ContextCompat.getColor(getContext(), R.color.black));
}
webvDescription.getSettings().setUseWideViewPort(false);
webvDescription.getSettings().setLayoutAlgorithm(
diff --git a/app/src/main/res/layout/audio_controls.xml b/app/src/main/res/layout/audio_controls.xml
index 7532722dd..852b6e922 100644
--- a/app/src/main/res/layout/audio_controls.xml
+++ b/app/src/main/res/layout/audio_controls.xml
@@ -7,9 +7,7 @@
<LinearLayout
android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_marginTop="12dp"
- android:layout_marginLeft="24dp">
+ android:layout_height="wrap_content">
<TextView
android:layout_width="wrap_content"
@@ -30,9 +28,7 @@
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_marginTop="-12dp"
- android:layout_marginLeft="24dp"
- android:layout_marginRight="24dp">
+ android:layout_marginTop="-12dp">
<Button
android:id="@+id/butDecSpeed"
@@ -74,7 +70,6 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="4dp"
- android:layout_marginLeft="24dp"
style="@style/AntennaPod.TextView.ListItemPrimaryTitle"
android:text="@string/volume"
android:textStyle="bold"/>
@@ -83,8 +78,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="-12dp"
- android:layout_marginLeft="24dp"
- android:layout_marginRight="24dp"
+ android:layout_marginLeft="8dp"
android:orientation="horizontal"
android:gravity="center">
@@ -106,8 +100,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
- android:layout_marginLeft="24dp"
- android:layout_marginRight="24dp"
+ android:layout_marginLeft="8dp"
android:orientation="horizontal"
android:gravity="center">
@@ -129,7 +122,6 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
- android:layout_marginLeft="24dp"
style="@style/AntennaPod.TextView.ListItemPrimaryTitle"
android:text="@string/audio_effects"
android:textStyle="bold"/>
@@ -139,8 +131,6 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="-12dp"
- android:layout_marginLeft="24dp"
- android:layout_marginRight="24dp"
android:text="@string/stereo_to_mono" />
</LinearLayout>
diff --git a/build.gradle b/build.gradle
index 521a691ac..4ae51d35b 100644
--- a/build.gradle
+++ b/build.gradle
@@ -50,14 +50,14 @@ project.ext {
iconifyVersion = "2.1.1"
jsoupVersion = "1.7.3"
materialDialogsVersion = "0.8.5.3@aar"
- okhttpVersion = "2.7.2"
+ okhttpVersion = "2.7.4"
okioVersion = "1.6.0"
recyclerviewFlexibledividerVersion = "1.2.6"
rxAndroidVersion = "1.1.0"
rxJavaVersion = "1.1.0"
rxJavaRulesVersion = "1.1.0.0"
- audioPlayerVersion = "v1.0.11"
+ audioPlayerVersion = "v1.0.12"
}
task wrapper(type: Wrapper) {