diff --git a/AndroidManifest.xml b/AndroidManifest.xml index 2ed5857c2..e20ede334 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -29,7 +29,7 @@ android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:logo="@drawable/ic_launcher" - android:theme="@style/Theme.AntennaPod.Light" > + android:theme="@style/Theme.AntennaPod.Dark" > - + - + diff --git a/res/drawable-v11/borderless_button.xml b/res/drawable/borderless_button_dark.xml similarity index 71% rename from res/drawable-v11/borderless_button.xml rename to res/drawable/borderless_button_dark.xml index 28945a631..6d263938d 100644 --- a/res/drawable-v11/borderless_button.xml +++ b/res/drawable/borderless_button_dark.xml @@ -1,11 +1,10 @@ - - + - - + + diff --git a/res/layout-land/mediaplayer_activity.xml b/res/layout-land/mediaplayer_activity.xml index f44ee05f9..f505ec4c4 100644 --- a/res/layout-land/mediaplayer_activity.xml +++ b/res/layout-land/mediaplayer_activity.xml @@ -38,7 +38,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerHorizontal="true" - android:background="@drawable/borderless_button" + android:background="?attr/borderless_button" android:src="@drawable/av_pause" /> diff --git a/res/layout/external_player_fragment.xml b/res/layout/external_player_fragment.xml index cb4351324..ad607374a 100644 --- a/res/layout/external_player_fragment.xml +++ b/res/layout/external_player_fragment.xml @@ -20,7 +20,7 @@ android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" - android:background="@drawable/borderless_button" > + android:background="?attr/borderless_button" > + android:background="?attr/borderless_button" /> \ No newline at end of file diff --git a/res/layout/feeditemlist_item.xml b/res/layout/feeditemlist_item.xml index 70d258f48..3f24fd422 100644 --- a/res/layout/feeditemlist_item.xml +++ b/res/layout/feeditemlist_item.xml @@ -91,7 +91,7 @@ android:layout_height="match_parent" android:layout_alignParentRight="true" android:layout_centerVertical="true" - android:background="@drawable/borderless_button" + android:background="?attr/borderless_button" android:clickable="false" android:focusable="false" android:focusableInTouchMode="false" diff --git a/res/layout/mediaplayer_activity.xml b/res/layout/mediaplayer_activity.xml index 679aeb37d..e9e62bd3e 100644 --- a/res/layout/mediaplayer_activity.xml +++ b/res/layout/mediaplayer_activity.xml @@ -23,7 +23,7 @@ android:layout_width="wrap_content" android:layout_height="match_parent" android:layout_weight="0.02" - android:background="@drawable/borderless_button" + android:background="?attr/borderless_button" android:src="?attr/av_rewind" /> diff --git a/res/layout/player_widget.xml b/res/layout/player_widget.xml index 6d53a55fe..23a1ffff3 100644 --- a/res/layout/player_widget.xml +++ b/res/layout/player_widget.xml @@ -15,7 +15,7 @@ android:layout_height="match_parent" android:layout_alignParentRight="true" android:layout_margin="12dp" - android:background="@drawable/borderless_button" + android:background="?attr/borderless_button" android:src="@drawable/av_play" /> diff --git a/res/values-v11/colors.xml b/res/values-v11/colors.xml index a21634ea8..520efaa06 100644 --- a/res/values-v11/colors.xml +++ b/res/values-v11/colors.xml @@ -1,5 +1,5 @@ - #81CFEA - + #286E8A + #81CFEA \ No newline at end of file diff --git a/res/values/attrs.xml b/res/values/attrs.xml index dbafca0b8..505dc54a3 100644 --- a/res/values/attrs.xml +++ b/res/values/attrs.xml @@ -1,5 +1,6 @@ + @@ -22,6 +23,8 @@ - - + + + + \ No newline at end of file diff --git a/res/values/colors.xml b/res/values/colors.xml index f1e4fbd9d..019213277 100644 --- a/res/values/colors.xml +++ b/res/values/colors.xml @@ -22,9 +22,13 @@ #FEBB20 #DDDDDD #669900 - #CC0000 - #99CC00 - #FFBB33 - #EE5F52 + #CC0000 + #99CC00 + #FFBB33 + #EE5F52 + + #FEBB20 + #FEBB20 + \ No newline at end of file diff --git a/res/values/styles.xml b/res/values/styles.xml index 4997d92ad..964ee2824 100644 --- a/res/values/styles.xml +++ b/res/values/styles.xml @@ -26,6 +26,8 @@ @drawable/type_audio @drawable/type_video @color/white + @drawable/borderless_button + "; - private WebView webvDescription; private FeedItem item; @@ -52,6 +53,7 @@ public class ItemDescriptionFragment extends SherlockFragment { if (AppConfig.DEBUG) Log.d(TAG, "Creating view"); webvDescription = new WebView(getActivity()); + webvDescription.setBackgroundColor(0); webvDescription.getSettings().setUseWideViewPort(false); return webvDescription; } @@ -151,6 +153,14 @@ public class ItemDescriptionFragment extends SherlockFragment { webViewLoader.execute(); } } + + /** Return the CSS style of the Webview. + * @param textColor the default color to use for the text in the webview. This value is inserted directly into the CSS String. + * */ + private String getWebViewStyle(String textColor) { + final String WEBVIEW_STYLE = ""; + return String.format(WEBVIEW_STYLE, textColor); + } private AsyncTask createLoader() { return new AsyncTask() { @@ -201,8 +211,13 @@ public class ItemDescriptionFragment extends SherlockFragment { } else { data = StringEscapeUtils.unescapeHtml4(contentEncodedRef); } - - data = WEBVIEW_STYLE + data; + + TypedArray res = getActivity().getTheme().obtainStyledAttributes(new int[] {android.R.attr.textColorPrimary}); + int colorResource = res.getColor(0, 0); + String colorString = String.format("#%06X", 0xFFFFFF & colorResource); + Log.i(TAG, "text color: " + colorString); + res.recycle(); + data = getWebViewStyle(colorString) + data; return null; }