summaryrefslogtreecommitdiff
path: root/app/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/main')
-rw-r--r--app/src/main/AndroidManifest.xml4
-rw-r--r--app/src/main/assets/about.html11
-rw-r--r--app/src/main/java/de/danoeh/antennapod/activity/AboutActivity.java54
-rw-r--r--app/src/main/java/de/danoeh/antennapod/activity/DefaultOnlineFeedViewActivity.java2
-rw-r--r--app/src/main/java/de/danoeh/antennapod/activity/VideoplayerActivity.java16
-rw-r--r--app/src/main/java/de/danoeh/antennapod/config/ClientConfigurator.java2
-rw-r--r--app/src/main/java/de/danoeh/antennapod/dialog/FeedItemDialog.java11
-rw-r--r--app/src/main/java/de/danoeh/antennapod/fragment/ItemDescriptionFragment.java9
-rw-r--r--app/src/main/res/layout/about.xml1
-rw-r--r--app/src/main/res/layout/feeditem_dialog.xml45
-rw-r--r--app/src/main/res/layout/videoplayer_activity.xml37
11 files changed, 110 insertions, 82 deletions
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 44eee8539..50d1d2874 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -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="42"
- android:versionName="0.9.9.5">
+ android:versionCode="43"
+ android:versionName="0.9.9.6">
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
diff --git a/app/src/main/assets/about.html b/app/src/main/assets/about.html
index e0f36ba79..172b49aab 100644
--- a/app/src/main/assets/about.html
+++ b/app/src/main/assets/about.html
@@ -41,7 +41,7 @@
<div id="header" align="center">
<img src="logo.png" alt="Logo" width="100px" height="100px"/>
- <p>AntennaPod, Version 0.9.9.5</p>
+ <p>AntennaPod, Version 0.9.9.6</p>
<p>Copyright © 2014 Daniel Oeh</p>
@@ -49,9 +49,6 @@
</div>
<h1>Used libraries</h1>
-<h2>NineOldAndroids <a href="http://nineoldandroids.com">(Link)</a></h2>
-by Jake Wharton, licensed under the Apache 2.0 license <a href="LICENSE_NINE_OLD_ANDROIDS.txt">(View)</a>
-
<h2>Apache Commons <a href="http://commons.apache.org/">(Link)</a></h2>
by The Apache Software Foundation, licensed under the Apache 2.0 license <a
href="LICENSE_APACHE_COMMONS.txt">(View)</a>
@@ -65,12 +62,9 @@ licensed under the Apache 2.0 license <a href="LICENSE_DSLV.txt">(View)</a>
<h2>Presto Client <a href="http://www.aocate.com/presto/">(Link)</a></h2>
licensed under the Apache 2.0 license <a href="LICENSE_PRESTO.txt">(View)</a>
-<h2>Better Pickers <a href="https://github.com/derekbrameyer/android-betterpickers">(Link)</a></h2>
-licensed under the Apache 2.0 license <a href="LICENSE_BETTERPICKERS.txt">(View)</a>
-
<h2>jsoup <a href="http://jsoup.org/">(Link)</a></h2>
licensed under the MIT license <a href="LICENSE_JSOUP.txt">(View)</a>
-</body>
+
<h2>Picasso <a href="https://github.com/square/picasso">(Link)</a></h2>
licensed under the Apache 2.0 license <a href="LICENSE_PICASSO.txt">(View)</a>
@@ -83,4 +77,5 @@ licensed under the Apache 2.0 license <a href="LICENSE_OKIO.txt">(View)</a>
<h2>Material Design Icons <a href="https://github.com/google/material-design-icons">(Link)</a></h2>
by Google, licensed under an Attribution-ShareAlike 4.0 International license <a href="LICENSE_MATERIAL_DESIGN_ICONS.txt">(View)</a>
+</body>
</html>
diff --git a/app/src/main/java/de/danoeh/antennapod/activity/AboutActivity.java b/app/src/main/java/de/danoeh/antennapod/activity/AboutActivity.java
index cf7de1709..811628ebf 100644
--- a/app/src/main/java/de/danoeh/antennapod/activity/AboutActivity.java
+++ b/app/src/main/java/de/danoeh/antennapod/activity/AboutActivity.java
@@ -4,29 +4,43 @@ import android.os.Bundle;
import android.support.v7.app.ActionBarActivity;
import android.webkit.WebView;
import android.webkit.WebViewClient;
+import android.widget.LinearLayout;
+
import de.danoeh.antennapod.R;
-/** Displays the 'about' screen */
+/**
+ * Displays the 'about' screen
+ */
public class AboutActivity extends ActionBarActivity {
- private WebView webview;
-
- @Override
- protected void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- getSupportActionBar().hide();
- setContentView(R.layout.about);
- webview = (WebView) findViewById(R.id.webvAbout);
- webview.setWebViewClient(new WebViewClient() {
-
- @Override
- public boolean shouldOverrideUrlLoading(WebView view, String url) {
- view.loadUrl(url);
- return false;
- }
-
- });
- webview.loadUrl("file:///android_asset/about.html");
- }
+ private WebView webview;
+ private LinearLayout webviewContainer;
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ getSupportActionBar().hide();
+ setContentView(R.layout.about);
+ webviewContainer = (LinearLayout) findViewById(R.id.webvContainer);
+ webview = (WebView) findViewById(R.id.webvAbout);
+ webview.setWebViewClient(new WebViewClient() {
+
+ @Override
+ public boolean shouldOverrideUrlLoading(WebView view, String url) {
+ view.loadUrl(url);
+ return false;
+ }
+
+ });
+ webview.loadUrl("file:///android_asset/about.html");
+ }
+ @Override
+ protected void onDestroy() {
+ super.onDestroy();
+ if (webviewContainer != null && webview != null) {
+ webviewContainer.removeAllViews();
+ webview.destroy();
+ }
+ }
}
diff --git a/app/src/main/java/de/danoeh/antennapod/activity/DefaultOnlineFeedViewActivity.java b/app/src/main/java/de/danoeh/antennapod/activity/DefaultOnlineFeedViewActivity.java
index d265c05b1..8401b41a7 100644
--- a/app/src/main/java/de/danoeh/antennapod/activity/DefaultOnlineFeedViewActivity.java
+++ b/app/src/main/java/de/danoeh/antennapod/activity/DefaultOnlineFeedViewActivity.java
@@ -123,7 +123,7 @@ public class DefaultOnlineFeedViewActivity extends OnlineFeedViewActivity {
subscribeButton = (Button) header.findViewById(R.id.butSubscribe);
- if (feed.getImage() != null && StringUtils.isNoneBlank(feed.getImage().getDownload_url())) {
+ if (feed.getImage() != null && StringUtils.isNotBlank(feed.getImage().getDownload_url())) {
Picasso.with(this)
.load(feed.getImage().getDownload_url())
.fit()
diff --git a/app/src/main/java/de/danoeh/antennapod/activity/VideoplayerActivity.java b/app/src/main/java/de/danoeh/antennapod/activity/VideoplayerActivity.java
index d625f21da..727b25296 100644
--- a/app/src/main/java/de/danoeh/antennapod/activity/VideoplayerActivity.java
+++ b/app/src/main/java/de/danoeh/antennapod/activity/VideoplayerActivity.java
@@ -54,6 +54,7 @@ public class VideoplayerActivity extends MediaplayerActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
+ getWindow().addFlags(WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN);
supportRequestWindowFeature(WindowCompat.FEATURE_ACTION_BAR_OVERLAY); // has to be called before setting layout content
super.onCreate(savedInstanceState);
getSupportActionBar().setBackgroundDrawable(new ColorDrawable(0x80000000));
@@ -116,6 +117,13 @@ public class VideoplayerActivity extends MediaplayerActivity {
videoview.getHolder().addCallback(surfaceHolderCallback);
videoview.setOnTouchListener(onVideoviewTouched);
+ if (Build.VERSION.SDK_INT >= 16) {
+ videoview.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION);
+ }
+ if (Build.VERSION.SDK_INT >= 14) {
+ videoOverlay.setFitsSystemWindows(true);
+ }
+
setupVideoControlsToggler();
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);
@@ -333,10 +341,10 @@ public class VideoplayerActivity extends MediaplayerActivity {
butPlay.startAnimation(animation);
}
if (Build.VERSION.SDK_INT >= 14) {
- videoview.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LOW_PROFILE);
- getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_FULLSCREEN
- | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION);
-
+ int videoviewFlag = (Build.VERSION.SDK_INT >= 16) ? View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION : 0;
+ getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LOW_PROFILE | View.SYSTEM_UI_FLAG_FULLSCREEN
+ | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION | videoviewFlag);
+ videoOverlay.setFitsSystemWindows(true);
}
videoOverlay.setVisibility(View.GONE);
butPlay.setVisibility(View.GONE);
diff --git a/app/src/main/java/de/danoeh/antennapod/config/ClientConfigurator.java b/app/src/main/java/de/danoeh/antennapod/config/ClientConfigurator.java
index de2cb5ffb..8941a5d71 100644
--- a/app/src/main/java/de/danoeh/antennapod/config/ClientConfigurator.java
+++ b/app/src/main/java/de/danoeh/antennapod/config/ClientConfigurator.java
@@ -8,7 +8,7 @@ import de.danoeh.antennapod.core.ClientConfig;
public class ClientConfigurator {
static {
- ClientConfig.USER_AGENT = "AntennaPod/0.9.9.5";
+ ClientConfig.USER_AGENT = "AntennaPod/0.9.9.6";
ClientConfig.applicationCallbacks = new ApplicationCallbacksImpl();
ClientConfig.downloadServiceCallbacks = new DownloadServiceCallbacksImpl();
ClientConfig.gpodnetCallbacks = new GpodnetCallbacksImpl();
diff --git a/app/src/main/java/de/danoeh/antennapod/dialog/FeedItemDialog.java b/app/src/main/java/de/danoeh/antennapod/dialog/FeedItemDialog.java
index 613cd1fec..eeed10b98 100644
--- a/app/src/main/java/de/danoeh/antennapod/dialog/FeedItemDialog.java
+++ b/app/src/main/java/de/danoeh/antennapod/dialog/FeedItemDialog.java
@@ -16,6 +16,7 @@ import android.util.Log;
import android.util.TypedValue;
import android.view.MenuItem;
import android.view.View;
+import android.view.ViewGroup;
import android.view.Window;
import android.webkit.WebSettings;
import android.webkit.WebView;
@@ -54,6 +55,7 @@ public class FeedItemDialog extends Dialog {
private FeedItem item;
private QueueAccess queue;
+ private ViewGroup contentContainer;
private View header;
private TextView txtvTitle;
private WebView webvDescription;
@@ -107,6 +109,7 @@ public class FeedItemDialog extends Dialog {
requestWindowFeature(Window.FEATURE_NO_TITLE);
setContentView(R.layout.feeditem_dialog);
+ contentContainer = (ViewGroup) findViewById(R.id.contentContainer);
txtvTitle = (TextView) findViewById(R.id.txtvTitle);
header = findViewById(R.id.header);
webvDescription = (WebView) findViewById(R.id.webview);
@@ -225,6 +228,14 @@ public class FeedItemDialog extends Dialog {
updateMenuAppearance();
}
+ @Override
+ public void dismiss() {
+ super.dismiss();
+ if (contentContainer != null && webvDescription != null) {
+ contentContainer.removeAllViews();
+ webvDescription.destroy();
+ }
+ }
private final FeedItemMenuHandler.MenuInterface popupMenuInterface = new FeedItemMenuHandler.MenuInterface() {
@Override
diff --git a/app/src/main/java/de/danoeh/antennapod/fragment/ItemDescriptionFragment.java b/app/src/main/java/de/danoeh/antennapod/fragment/ItemDescriptionFragment.java
index 4a5c3f718..c0222de8e 100644
--- a/app/src/main/java/de/danoeh/antennapod/fragment/ItemDescriptionFragment.java
+++ b/app/src/main/java/de/danoeh/antennapod/fragment/ItemDescriptionFragment.java
@@ -162,11 +162,6 @@ public class ItemDescriptionFragment extends Fragment {
}
@Override
- public void onDestroyView() {
- super.onDestroyView();
- }
-
- @Override
public void onAttach(Activity activity) {
super.onAttach(activity);
if (BuildConfig.DEBUG)
@@ -191,6 +186,10 @@ public class ItemDescriptionFragment extends Fragment {
if (webViewLoader != null) {
webViewLoader.cancel(true);
}
+ if (webvDescription != null) {
+ webvDescription.removeAllViews();
+ webvDescription.destroy();
+ }
}
@SuppressLint("NewApi")
diff --git a/app/src/main/res/layout/about.xml b/app/src/main/res/layout/about.xml
index acde9d786..02e232d9a 100644
--- a/app/src/main/res/layout/about.xml
+++ b/app/src/main/res/layout/about.xml
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/webvContainer"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
diff --git a/app/src/main/res/layout/feeditem_dialog.xml b/app/src/main/res/layout/feeditem_dialog.xml
index 24abae762..5937480df 100644
--- a/app/src/main/res/layout/feeditem_dialog.xml
+++ b/app/src/main/res/layout/feeditem_dialog.xml
@@ -1,58 +1,59 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent">
+ xmlns:tools="http://schemas.android.com/tools"
+ android:id="@+id/contentContainer"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
<TextView
+ android:id="@+id/txtvTitle"
+ style="@style/AntennaPod.Dialog.Title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_margin="16dp"
- android:id="@+id/txtvTitle"
android:layout_alignParentTop="true"
- style="@style/AntennaPod.Dialog.Title"
- android:maxLines="5"
- android:ellipsize="none"/>
+ android:layout_margin="16dp"
+ android:ellipsize="none"
+ android:maxLines="5" />
<View
android:id="@+id/title_divider"
android:layout_width="match_parent"
android:layout_height="2dp"
android:layout_below="@id/txtvTitle"
- android:background="@color/bright_blue"/>
+ android:background="@color/bright_blue" />
<LinearLayout
android:id="@+id/header"
- android:orientation="horizontal"
- android:layout_below="@id/title_divider"
android:layout_width="match_parent"
- android:layout_height="wrap_content">
+ android:layout_height="wrap_content"
+ android:layout_below="@id/title_divider"
+ android:orientation="horizontal">
<ImageButton
+ android:id="@+id/butAction1"
android:layout_width="0dp"
android:layout_height="48dp"
android:layout_weight="1"
- android:id="@+id/butAction1"
android:background="?attr/selectableItemBackground"
- tools:ignore="ContentDescription"/>
+ tools:ignore="ContentDescription" />
<ImageButton
+ android:id="@+id/butAction2"
android:layout_width="0dp"
android:layout_height="48dp"
android:layout_weight="1"
- android:id="@+id/butAction2"
android:background="?attr/selectableItemBackground"
- tools:ignore="ContentDescription"/>
+ tools:ignore="ContentDescription" />
<ImageButton
+ android:id="@+id/butMoreActions"
android:layout_width="0dp"
android:layout_height="48dp"
android:layout_weight="1"
- android:id="@+id/butMoreActions"
android:background="?attr/selectableItemBackground"
- android:src="?attr/ic_action_overflow"
- android:contentDescription="@string/butAction_label"/>
+ android:contentDescription="@string/butAction_label"
+ android:src="?attr/ic_action_overflow" />
</LinearLayout>
<View
@@ -60,13 +61,13 @@
android:layout_width="match_parent"
android:layout_height="2dp"
android:layout_below="@id/header"
- android:background="@color/bright_blue"/>
+ android:background="@color/bright_blue" />
<WebView
+ android:id="@+id/webview"
android:layout_width="match_parent"
android:layout_height="0dp"
- android:layout_below="@id/divider"
android:layout_alignParentBottom="true"
- android:id="@+id/webview"/>
+ android:layout_below="@id/divider" />
</RelativeLayout> \ No newline at end of file
diff --git a/app/src/main/res/layout/videoplayer_activity.xml b/app/src/main/res/layout/videoplayer_activity.xml
index f1e54f7c3..766cd6e04 100644
--- a/app/src/main/res/layout/videoplayer_activity.xml
+++ b/app/src/main/res/layout/videoplayer_activity.xml
@@ -1,47 +1,46 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:orientation="vertical">
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:background="@color/black"
+ android:orientation="vertical">
<de.danoeh.antennapod.view.AspectRatioVideoView
android:id="@+id/videoview"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_gravity="center"/>
+ android:layout_gravity="center" />
<ProgressBar
android:id="@+id/progressIndicator"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
- android:visibility="invisible"
- android:indeterminateOnly="true"/>
+ android:indeterminateOnly="true"
+ android:visibility="invisible" />
<ImageButton
android:id="@+id/butPlay"
- android:contentDescription="@string/pause_label"
- android:layout_width="80dp"
- android:layout_height="80dp"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
android:layout_gravity="center"
- android:scaleType="fitXY"
android:background="@drawable/overlay_button_circle_background"
- android:src="@drawable/ic_action_pause_over_video"/>
+ android:contentDescription="@string/pause_label"
+ android:src="@drawable/ic_av_pause_circle_outline_80dp" />
<LinearLayout
android:id="@+id/overlay"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom|center"
- android:background="#80000000"
android:orientation="vertical">
<RelativeLayout
android:id="@+id/timecontrol"
android:layout_width="match_parent"
android:layout_height="50dp"
- android:paddingTop="8dp"
- android:layout_marginBottom="4dp">
+ android:background="#80000000"
+ android:paddingTop="8dp">
<TextView
android:id="@+id/txtvPosition"
@@ -53,9 +52,9 @@
android:layout_marginLeft="8dp"
android:layout_marginRight="8dp"
android:layout_marginTop="4dp"
+ android:text="@string/position_default_label"
android:textColor="@color/white"
- android:textStyle="bold"
- android:text="@string/position_default_label"/>
+ android:textStyle="bold" />
<TextView
android:id="@+id/txtvLength"
@@ -67,9 +66,9 @@
android:layout_marginLeft="8dp"
android:layout_marginRight="8dp"
android:layout_marginTop="4dp"
+ android:text="@string/position_default_label"
android:textColor="@color/white"
- android:textStyle="bold"
- android:text="@string/position_default_label"/>
+ android:textStyle="bold" />
<SeekBar
android:id="@+id/sbPosition"
@@ -77,7 +76,7 @@
android:layout_height="wrap_content"
android:layout_toLeftOf="@+id/txtvLength"
android:layout_toRightOf="@+id/txtvPosition"
- android:max="500"/>
+ android:max="500" />
</RelativeLayout>
</LinearLayout>