Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/news-android.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid-Development <david-dev@live.de>2013-12-29 02:26:25 +0400
committerDavid-Development <david-dev@live.de>2013-12-29 02:26:25 +0400
commit63556039769a2c66e1f732cdb6dc9f0a25f27097 (patch)
tree8a4b8430c9ec13cc54f667e23f2d10b781275111
parent8cf6c4492f08681ef1bfdf35804d30037f292c45 (diff)
Update to 0.5.5 - see Changelog for more Infosv0.5.5
-rw-r--r--AndroidManifest.xml4
-rw-r--r--News-Android-App.apkbin3174650 -> 3194021 bytes
-rw-r--r--README.md11
-rw-r--r--assets/version_changelog_web_template.html4
-rw-r--r--assets/web_template.html43
-rwxr-xr-xremove_invalid_languages.sh6
-rw-r--r--res/layout/dialog_version_info.xml10
-rw-r--r--res/values-ach/strings.xml47
-rw-r--r--res/values-ady/strings.xml47
-rw-r--r--res/values-en@pirate/strings.xml48
-rw-r--r--res/values-nds/strings.xml47
-rw-r--r--res/values-nqo/strings.xml47
-rw-r--r--res/values-tzm/strings.xml47
-rw-r--r--res/values/strings.xml5
-rw-r--r--res/xml/pref_headers.xml11
-rw-r--r--src/de/luhmer/owncloudnewsreader/NewsDetailFragment.java1
-rw-r--r--src/de/luhmer/owncloudnewsreader/NewsReaderDetailFragment.java7
-rw-r--r--src/de/luhmer/owncloudnewsreader/NewsReaderListActivity.java6
-rw-r--r--src/de/luhmer/owncloudnewsreader/SettingsActivity.java131
-rw-r--r--src/de/luhmer/owncloudnewsreader/VersionInfoDialogFragment.java15
-rw-r--r--src/de/luhmer/owncloudnewsreader/cursor/NewsListCursorAdapter.java48
-rw-r--r--src/de/luhmer/owncloudnewsreader/helper/ImageHandler.java30
-rw-r--r--src/de/luhmer/owncloudnewsreader/helper/MenuUtilsSherlockFragmentActivity.java2
23 files changed, 189 insertions, 428 deletions
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index d62d3c80..6784759a 100644
--- a/AndroidManifest.xml
+++ b/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.luhmer.owncloudnewsreader"
- android:versionCode="39"
- android:versionName="0.5.4" >
+ android:versionCode="40"
+ android:versionName="0.5.5" >
<uses-sdk
android:minSdkVersion="7"
diff --git a/News-Android-App.apk b/News-Android-App.apk
index af22d0ee..00b194f6 100644
--- a/News-Android-App.apk
+++ b/News-Android-App.apk
Binary files differ
diff --git a/README.md b/README.md
index 0077e8ac..116f1c39 100644
--- a/README.md
+++ b/README.md
@@ -81,9 +81,18 @@ git clone https://github.com/MichaelFlisar/MessageBar.git
Updates
==================================
-0.5.5 (in development)
+0.5.6 (in development)
---------------------
+0.5.5 (Google Play - Beta)
+---------------------
+- Improve Changelog View
+- Bug fix - <a href="https://github.com/owncloud/News-Android-App/issues/186">#186 Missing "clear cache" in the settings (on Tablets)</a>
+- Improvement - <a href="https://github.com/owncloud/News-Android-App/issues/189">#189 Read mouse-over</a>
+- Improvement - Fix Layout problems in DetailView
+- Improvement - <a href="https://github.com/owncloud/News-Android-App/issues/195">#195 Mark as read when opened in browser</a>
+- Bug fix - <a href="https://github.com/owncloud/News-Android-App/issues/194">#194 favIcons and imgCache show up in Gallery</a>
+
0.5.4 (Google Play)
---------------------
- Improvement - <a href="https://github.com/owncloud/News-Android-App/issues/184">#184 Option to disable notification</a>
diff --git a/assets/version_changelog_web_template.html b/assets/version_changelog_web_template.html
index 704bab17..4692549c 100644
--- a/assets/version_changelog_web_template.html
+++ b/assets/version_changelog_web_template.html
@@ -35,11 +35,11 @@
function handleResult(content)
{
- //var Ausdruck = /(?<=Updates\n==================================)((.|\s)*)/;
+ //var Ausdruck = /(?<=Updates\n==================================)((.|\s)*)/;
content = content.replace(regex, '');
content = content.replace("Updates\n==================================", "");
content = $.trim(content);
- content = content.replace(/\n/g, "<br>");
+ content = content.replace(/\n/g, "<br>");
$('#changelog_text').replaceWith(content);
}
diff --git a/assets/web_template.html b/assets/web_template.html
index e9fb1dd0..e6c7bd1c 100644
--- a/assets/web_template.html
+++ b/assets/web_template.html
@@ -8,25 +8,30 @@
var images = document.getElementsByTagName('img');
for (var i = 1; i < images.length; i++) {// i = 1 because of the feed image which has no caption
- if(images[i].getAttribute('title') != "" && images[i].getAttribute('title') != null) {
+ if(images[i].getAttribute('title') != "" &&
+ images[i].getAttribute('title') != null &&
+ images[i].getAttribute('title') != "null") {
(function (image) {
var timer;
image.addEventListener('mouseup', function() {
clearTimeout(timer);
});
-
+
+
image.addEventListener('mousedown', function (e) {
timer = window.setTimeout(function() {
e.preventDefault();
alert(image.getAttribute('title'));
- }, 500);
+ //alert("fired - mousedown");
+ }, 1000);
});
image.addEventListener("touchstart", function(e){
timer = window.setTimeout(function() {
e.preventDefault();
alert(image.getAttribute('title'));
- }, 500);
+ //alert("fired - touchstart");
+ }, 1000);
});
image.addEventListener('touchend', function() {
@@ -137,6 +142,11 @@
white-space: pre-wrap !important;
word-wrap: break-word !important;
}
+
+ a {
+ margin-left: auto !important;
+ margin-right: auto !important;
+ }
body {
word-wrap: break-word !important;
@@ -146,16 +156,7 @@
width:100% !important;
table-layout:fixed;
}
-
-
- img {
- /*
- display: block;
- margin-left:auto;
- margin-right:auto;
- */
- }
-
+
#header {
font-size: 21px;
margin-bottom: 5px;
@@ -166,19 +167,15 @@
#header a:link, a:active, a:hover, a:visited {
color: #DADADA !important;
text-decoration: none !important;
- }
+ }
#subscription, #datetime {
margin-bottom:3px;
font-size:12px;
-
- /* font-style: oblique;
- margin-right: 2px;*/
}
#subscription {
float:left;
- /* margin-left: -2px !important; */
}
#datetime {
@@ -211,7 +208,6 @@
body#lightTheme a:link, a:active, a:hover {
color: #555 !important;
- /*color: #2C2E2F;*/
}
body#lightTheme a:visited {
color: #000 !important;
@@ -223,13 +219,6 @@
body#darkTheme a:visited {
color: #AEAEAE !important;
}
- /*
- a:active {
- color: #DADADA;
- }
- a:hover {
- color: #DADADA;
- }*/
</style>
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
</head>
diff --git a/remove_invalid_languages.sh b/remove_invalid_languages.sh
new file mode 100755
index 00000000..5524bf9f
--- /dev/null
+++ b/remove_invalid_languages.sh
@@ -0,0 +1,6 @@
+git rm -r res/values-ach/
+git rm -r res/values-ady/
+git rm -r res/values-en@pirate/
+git rm -r res/values-nds/
+git rm -r res/values-nqo/
+git rm -r res/values-tzm/
diff --git a/res/layout/dialog_version_info.xml b/res/layout/dialog_version_info.xml
index 80a81a0c..fdf4b066 100644
--- a/res/layout/dialog_version_info.xml
+++ b/res/layout/dialog_version_info.xml
@@ -23,11 +23,19 @@
android:minHeight="30dp"
android:gravity="center_horizontal|center_vertical" />
+ <ProgressBar
+ android:id="@+id/changeLogLoadingProgressBar"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center_vertical|center_horizontal"
+ android:indeterminate="true" />
+
<view xmlns:android="http://schemas.android.com/apk/res/android"
class="it.gmariotti.changelibs.library.view.ChangeLogListView"
- android:id="@+id/view"
+ android:id="@+id/changelog_listview"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:autoLink="web"
android:textIsSelectable="false" />
+
</LinearLayout> \ No newline at end of file
diff --git a/res/values-ach/strings.xml b/res/values-ach/strings.xml
deleted file mode 100644
index 10e27873..00000000
--- a/res/values-ach/strings.xml
+++ /dev/null
@@ -1,47 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<resources>
- <!--<string name="non_sorted_articles">Nicht zugeordnete Artikel</string>-->
- <!--EMAIL-->
- <!--Action Bar Items-->
- <!--Strings related to login-->
- <!--<string name="pref_title_owncloudRootPath">ownCloud root address</string>-->
- <!--<string name="pref_default_username">admin</string>-->
- <!--Toast Messages-->
- <!--Strings related to Settings-->
- <!--General settings-->
- <!--<string-array name="pref_general_sort_order_values">
- <item>desc</item>
- <item>asc</item>
- </string-array>-->
- <!--<string name="pref_title_social_recommendations">Enable social recommendations</string>
- <string name="pref_description_social_recommendations">Recommendations for people to contact based on your message history</string>-->
- <!--<string name="pref_title_AllowAllSSLCertificates">Allow all SSL Certificates</string>-->
- <!--MemorizingTrustManager-->
- <!--Settings for Display-->
- <!--Login Dialog-->
- <!--Data & Sync-->
- <!--<string name="pref_title_data_sync_max_items">Max number of items to sync</string>-->
- <!--<string name="pref_title_sync_frequency">Sync frequency</string>
-
- <string-array name="pref_sync_frequency_titles">
- <item>15 minutes</item>
- <item>30 minutes</item>
- <item>1 hour</item>
- <item>3 hours</item>
- <item>6 hours</item>
- <item>Never</item>
- </string-array>
- <string-array name="pref_sync_frequency_values">
- <item>15</item>
- <item>30</item>
- <item>60</item>
- <item>180</item>
- <item>360</item>
- <item>-1</item>
- </string-array>-->
- <!--<string name="pref_title_system_sync_settings">System sync settings</string>-->
- <!--<string name="pref_title_new_message_notifications">New message notifications</string>
- <string name="pref_title_ringtone">Ringtone</string>
- <string name="pref_ringtone_silent">Silent</string>
- <string name="pref_title_vibrate">Vibrate</string>-->
-</resources>
diff --git a/res/values-ady/strings.xml b/res/values-ady/strings.xml
deleted file mode 100644
index 10e27873..00000000
--- a/res/values-ady/strings.xml
+++ /dev/null
@@ -1,47 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<resources>
- <!--<string name="non_sorted_articles">Nicht zugeordnete Artikel</string>-->
- <!--EMAIL-->
- <!--Action Bar Items-->
- <!--Strings related to login-->
- <!--<string name="pref_title_owncloudRootPath">ownCloud root address</string>-->
- <!--<string name="pref_default_username">admin</string>-->
- <!--Toast Messages-->
- <!--Strings related to Settings-->
- <!--General settings-->
- <!--<string-array name="pref_general_sort_order_values">
- <item>desc</item>
- <item>asc</item>
- </string-array>-->
- <!--<string name="pref_title_social_recommendations">Enable social recommendations</string>
- <string name="pref_description_social_recommendations">Recommendations for people to contact based on your message history</string>-->
- <!--<string name="pref_title_AllowAllSSLCertificates">Allow all SSL Certificates</string>-->
- <!--MemorizingTrustManager-->
- <!--Settings for Display-->
- <!--Login Dialog-->
- <!--Data & Sync-->
- <!--<string name="pref_title_data_sync_max_items">Max number of items to sync</string>-->
- <!--<string name="pref_title_sync_frequency">Sync frequency</string>
-
- <string-array name="pref_sync_frequency_titles">
- <item>15 minutes</item>
- <item>30 minutes</item>
- <item>1 hour</item>
- <item>3 hours</item>
- <item>6 hours</item>
- <item>Never</item>
- </string-array>
- <string-array name="pref_sync_frequency_values">
- <item>15</item>
- <item>30</item>
- <item>60</item>
- <item>180</item>
- <item>360</item>
- <item>-1</item>
- </string-array>-->
- <!--<string name="pref_title_system_sync_settings">System sync settings</string>-->
- <!--<string name="pref_title_new_message_notifications">New message notifications</string>
- <string name="pref_title_ringtone">Ringtone</string>
- <string name="pref_ringtone_silent">Silent</string>
- <string name="pref_title_vibrate">Vibrate</string>-->
-</resources>
diff --git a/res/values-en@pirate/strings.xml b/res/values-en@pirate/strings.xml
deleted file mode 100644
index 52c69538..00000000
--- a/res/values-en@pirate/strings.xml
+++ /dev/null
@@ -1,48 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<resources>
- <!--<string name="non_sorted_articles">Nicht zugeordnete Artikel</string>-->
- <!--EMAIL-->
- <!--Action Bar Items-->
- <!--Strings related to login-->
- <string name="pref_title_password">Secret Code</string>
- <!--<string name="pref_title_owncloudRootPath">ownCloud root address</string>-->
- <!--<string name="pref_default_username">admin</string>-->
- <!--Toast Messages-->
- <!--Strings related to Settings-->
- <!--General settings-->
- <!--<string-array name="pref_general_sort_order_values">
- <item>desc</item>
- <item>asc</item>
- </string-array>-->
- <!--<string name="pref_title_social_recommendations">Enable social recommendations</string>
- <string name="pref_description_social_recommendations">Recommendations for people to contact based on your message history</string>-->
- <!--<string name="pref_title_AllowAllSSLCertificates">Allow all SSL Certificates</string>-->
- <!--MemorizingTrustManager-->
- <!--Settings for Display-->
- <!--Login Dialog-->
- <!--Data & Sync-->
- <!--<string name="pref_title_data_sync_max_items">Max number of items to sync</string>-->
- <!--<string name="pref_title_sync_frequency">Sync frequency</string>
-
- <string-array name="pref_sync_frequency_titles">
- <item>15 minutes</item>
- <item>30 minutes</item>
- <item>1 hour</item>
- <item>3 hours</item>
- <item>6 hours</item>
- <item>Never</item>
- </string-array>
- <string-array name="pref_sync_frequency_values">
- <item>15</item>
- <item>30</item>
- <item>60</item>
- <item>180</item>
- <item>360</item>
- <item>-1</item>
- </string-array>-->
- <!--<string name="pref_title_system_sync_settings">System sync settings</string>-->
- <!--<string name="pref_title_new_message_notifications">New message notifications</string>
- <string name="pref_title_ringtone">Ringtone</string>
- <string name="pref_ringtone_silent">Silent</string>
- <string name="pref_title_vibrate">Vibrate</string>-->
-</resources>
diff --git a/res/values-nds/strings.xml b/res/values-nds/strings.xml
deleted file mode 100644
index 10e27873..00000000
--- a/res/values-nds/strings.xml
+++ /dev/null
@@ -1,47 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<resources>
- <!--<string name="non_sorted_articles">Nicht zugeordnete Artikel</string>-->
- <!--EMAIL-->
- <!--Action Bar Items-->
- <!--Strings related to login-->
- <!--<string name="pref_title_owncloudRootPath">ownCloud root address</string>-->
- <!--<string name="pref_default_username">admin</string>-->
- <!--Toast Messages-->
- <!--Strings related to Settings-->
- <!--General settings-->
- <!--<string-array name="pref_general_sort_order_values">
- <item>desc</item>
- <item>asc</item>
- </string-array>-->
- <!--<string name="pref_title_social_recommendations">Enable social recommendations</string>
- <string name="pref_description_social_recommendations">Recommendations for people to contact based on your message history</string>-->
- <!--<string name="pref_title_AllowAllSSLCertificates">Allow all SSL Certificates</string>-->
- <!--MemorizingTrustManager-->
- <!--Settings for Display-->
- <!--Login Dialog-->
- <!--Data & Sync-->
- <!--<string name="pref_title_data_sync_max_items">Max number of items to sync</string>-->
- <!--<string name="pref_title_sync_frequency">Sync frequency</string>
-
- <string-array name="pref_sync_frequency_titles">
- <item>15 minutes</item>
- <item>30 minutes</item>
- <item>1 hour</item>
- <item>3 hours</item>
- <item>6 hours</item>
- <item>Never</item>
- </string-array>
- <string-array name="pref_sync_frequency_values">
- <item>15</item>
- <item>30</item>
- <item>60</item>
- <item>180</item>
- <item>360</item>
- <item>-1</item>
- </string-array>-->
- <!--<string name="pref_title_system_sync_settings">System sync settings</string>-->
- <!--<string name="pref_title_new_message_notifications">New message notifications</string>
- <string name="pref_title_ringtone">Ringtone</string>
- <string name="pref_ringtone_silent">Silent</string>
- <string name="pref_title_vibrate">Vibrate</string>-->
-</resources>
diff --git a/res/values-nqo/strings.xml b/res/values-nqo/strings.xml
deleted file mode 100644
index 10e27873..00000000
--- a/res/values-nqo/strings.xml
+++ /dev/null
@@ -1,47 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<resources>
- <!--<string name="non_sorted_articles">Nicht zugeordnete Artikel</string>-->
- <!--EMAIL-->
- <!--Action Bar Items-->
- <!--Strings related to login-->
- <!--<string name="pref_title_owncloudRootPath">ownCloud root address</string>-->
- <!--<string name="pref_default_username">admin</string>-->
- <!--Toast Messages-->
- <!--Strings related to Settings-->
- <!--General settings-->
- <!--<string-array name="pref_general_sort_order_values">
- <item>desc</item>
- <item>asc</item>
- </string-array>-->
- <!--<string name="pref_title_social_recommendations">Enable social recommendations</string>
- <string name="pref_description_social_recommendations">Recommendations for people to contact based on your message history</string>-->
- <!--<string name="pref_title_AllowAllSSLCertificates">Allow all SSL Certificates</string>-->
- <!--MemorizingTrustManager-->
- <!--Settings for Display-->
- <!--Login Dialog-->
- <!--Data & Sync-->
- <!--<string name="pref_title_data_sync_max_items">Max number of items to sync</string>-->
- <!--<string name="pref_title_sync_frequency">Sync frequency</string>
-
- <string-array name="pref_sync_frequency_titles">
- <item>15 minutes</item>
- <item>30 minutes</item>
- <item>1 hour</item>
- <item>3 hours</item>
- <item>6 hours</item>
- <item>Never</item>
- </string-array>
- <string-array name="pref_sync_frequency_values">
- <item>15</item>
- <item>30</item>
- <item>60</item>
- <item>180</item>
- <item>360</item>
- <item>-1</item>
- </string-array>-->
- <!--<string name="pref_title_system_sync_settings">System sync settings</string>-->
- <!--<string name="pref_title_new_message_notifications">New message notifications</string>
- <string name="pref_title_ringtone">Ringtone</string>
- <string name="pref_ringtone_silent">Silent</string>
- <string name="pref_title_vibrate">Vibrate</string>-->
-</resources>
diff --git a/res/values-tzm/strings.xml b/res/values-tzm/strings.xml
deleted file mode 100644
index 10e27873..00000000
--- a/res/values-tzm/strings.xml
+++ /dev/null
@@ -1,47 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<resources>
- <!--<string name="non_sorted_articles">Nicht zugeordnete Artikel</string>-->
- <!--EMAIL-->
- <!--Action Bar Items-->
- <!--Strings related to login-->
- <!--<string name="pref_title_owncloudRootPath">ownCloud root address</string>-->
- <!--<string name="pref_default_username">admin</string>-->
- <!--Toast Messages-->
- <!--Strings related to Settings-->
- <!--General settings-->
- <!--<string-array name="pref_general_sort_order_values">
- <item>desc</item>
- <item>asc</item>
- </string-array>-->
- <!--<string name="pref_title_social_recommendations">Enable social recommendations</string>
- <string name="pref_description_social_recommendations">Recommendations for people to contact based on your message history</string>-->
- <!--<string name="pref_title_AllowAllSSLCertificates">Allow all SSL Certificates</string>-->
- <!--MemorizingTrustManager-->
- <!--Settings for Display-->
- <!--Login Dialog-->
- <!--Data & Sync-->
- <!--<string name="pref_title_data_sync_max_items">Max number of items to sync</string>-->
- <!--<string name="pref_title_sync_frequency">Sync frequency</string>
-
- <string-array name="pref_sync_frequency_titles">
- <item>15 minutes</item>
- <item>30 minutes</item>
- <item>1 hour</item>
- <item>3 hours</item>
- <item>6 hours</item>
- <item>Never</item>
- </string-array>
- <string-array name="pref_sync_frequency_values">
- <item>15</item>
- <item>30</item>
- <item>60</item>
- <item>180</item>
- <item>360</item>
- <item>-1</item>
- </string-array>-->
- <!--<string name="pref_title_system_sync_settings">System sync settings</string>-->
- <!--<string name="pref_title_new_message_notifications">New message notifications</string>
- <string name="pref_title_ringtone">Ringtone</string>
- <string name="pref_ringtone_silent">Silent</string>
- <string name="pref_title_vibrate">Vibrate</string>-->
-</resources>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 469f36fb..1ee5cfb2 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -112,8 +112,9 @@
<string name="pref_title_social_recommendations">Enable social recommendations</string>
<string name="pref_description_social_recommendations">Recommendations for people to contact based on your message history</string>
-->
-
-
+
+ <string name="dialog_clearing_cache">Clearing cache</string>
+ <string name="dialog_clearing_cache_please_wait">Clearing cache.. Please wait.</string>
<string name="calculating_cache_size">Calculating cache size.. Please wait.</string>
<string name="reset_cache_unsaved_changes">There are unsynchronized changes. Would you like to reset the cache anyway?</string>
<string name="warning">Warning</string>
diff --git a/res/xml/pref_headers.xml b/res/xml/pref_headers.xml
index 851de063..30976b20 100644
--- a/res/xml/pref_headers.xml
+++ b/res/xml/pref_headers.xml
@@ -5,11 +5,18 @@
<header
android:fragment="de.luhmer.owncloudnewsreader.SettingsActivity$GeneralPreferenceFragment"
android:title="@string/pref_header_general" />
-
-
+
<header
android:fragment="de.luhmer.owncloudnewsreader.SettingsActivity$DisplayPreferenceFragment"
android:title="@string/pref_header_display" />
+
+ <header
+ android:fragment="de.luhmer.owncloudnewsreader.SettingsActivity$NotificationPreferenceFragment"
+ android:title="@string/pref_header_notifications" />
+
+ <header
+ android:fragment="de.luhmer.owncloudnewsreader.SettingsActivity$DataSyncPreferenceFragment"
+ android:title="@string/pref_header_data_sync" />
<!--
diff --git a/src/de/luhmer/owncloudnewsreader/NewsDetailFragment.java b/src/de/luhmer/owncloudnewsreader/NewsDetailFragment.java
index 1606f3ce..6170bf04 100644
--- a/src/de/luhmer/owncloudnewsreader/NewsDetailFragment.java
+++ b/src/de/luhmer/owncloudnewsreader/NewsDetailFragment.java
@@ -136,7 +136,6 @@ public class NewsDetailFragment extends SherlockFragment {
progressbar_webview = (ProgressBar) rootView.findViewById(R.id.progressbar_webview);
-
LoadRssItemInWebView();
return rootView;
diff --git a/src/de/luhmer/owncloudnewsreader/NewsReaderDetailFragment.java b/src/de/luhmer/owncloudnewsreader/NewsReaderDetailFragment.java
index 98ea82c8..b65c67a5 100644
--- a/src/de/luhmer/owncloudnewsreader/NewsReaderDetailFragment.java
+++ b/src/de/luhmer/owncloudnewsreader/NewsReaderDetailFragment.java
@@ -44,6 +44,7 @@ import android.widget.ListView;
import com.actionbarsherlock.app.SherlockFragmentActivity;
import com.actionbarsherlock.app.SherlockListFragment;
import com.devspark.robototextview.widget.RobotoCheckBox;
+import com.devspark.robototextview.widget.RobotoTextView;
import de.luhmer.owncloudnewsreader.ListView.SubscriptionExpandableListAdapter;
import de.luhmer.owncloudnewsreader.cursor.IOnStayUnread;
@@ -56,7 +57,7 @@ import de.luhmer.owncloudnewsreader.helper.MenuUtilsSherlockFragmentActivity;
/**
* A fragment representing a single NewsReader detail screen. This fragment is
* either contained in a {@link NewsReaderListActivity} in two-pane mode (on
- * tablets) or a {@link NewsReaderDetailActivity} on handsets.
+ * tablets) or a {@link NewsReaderListActivity} on handsets.
*/
public class NewsReaderDetailFragment extends SherlockListFragment implements IOnStayUnread {
/**
@@ -378,11 +379,13 @@ public class NewsReaderDetailFragment extends SherlockListFragment implements IO
SharedPreferences mPrefs = PreferenceManager.getDefaultSharedPreferences(getActivity());
if(mPrefs.getBoolean(SettingsActivity.CB_SKIP_DETAILVIEW_AND_OPEN_BROWSER_DIRECTLY_STRING, false)) {
- Cursor c = ((SQLiteCursor) ((NewsListCursorAdapter) l.getAdapter()).getItem(position));
+ Cursor c = ((SQLiteCursor) l.getAdapter().getItem(position));
String currentUrl = c.getString(c.getColumnIndex(DatabaseConnection.RSS_ITEM_LINK));
Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(currentUrl));
startActivity(browserIntent);
+
+ ((RobotoCheckBox) v.findViewById(R.id.cb_lv_item_read)).setChecked(true);
} else {
Intent intentNewsDetailAct = new Intent(getActivity(), NewsDetailActivity.class);
diff --git a/src/de/luhmer/owncloudnewsreader/NewsReaderListActivity.java b/src/de/luhmer/owncloudnewsreader/NewsReaderListActivity.java
index d4c03e77..754ffada 100644
--- a/src/de/luhmer/owncloudnewsreader/NewsReaderListActivity.java
+++ b/src/de/luhmer/owncloudnewsreader/NewsReaderListActivity.java
@@ -143,13 +143,17 @@ public class NewsReaderListActivity extends MenuUtilsSherlockFragmentActivity im
getSupportActionBar().setDisplayHomeAsUpEnabled(false);
getSupportActionBar().setHomeButtonEnabled(false);
+
+ getMenuItemUpdater().setVisible(false);
}
@Override
public void onPanelClosed(View arg0) {
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
getSupportActionBar().setHomeButtonEnabled(true);
-
+
+ getMenuItemUpdater().setVisible(true);
+
StartDetailFragmentNow();
}
});
diff --git a/src/de/luhmer/owncloudnewsreader/SettingsActivity.java b/src/de/luhmer/owncloudnewsreader/SettingsActivity.java
index 1efbb12c..4e3c1bb7 100644
--- a/src/de/luhmer/owncloudnewsreader/SettingsActivity.java
+++ b/src/de/luhmer/owncloudnewsreader/SettingsActivity.java
@@ -29,6 +29,7 @@ import android.annotation.SuppressLint;
import android.annotation.TargetApi;
import android.app.Activity;
import android.app.AlertDialog;
+import android.app.ProgressDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.content.DialogInterface.OnClickListener;
@@ -233,30 +234,7 @@ public class SettingsActivity extends SherlockPreferenceActivity {
preference
.setSummary(index >= 0 ? listPreference.getEntries()[index]
: null);
- } /*else if (preference instanceof RingtonePreference) {
- // For ringtone preferences, look up the correct display value
- // using RingtoneManager.
- if (TextUtils.isEmpty(stringValue)) {
- // Empty values correspond to 'silent' (no ringtone).
- preference.setSummary(R.string.pref_ringtone_silent);
-
- } else {
- Ringtone ringtone = RingtoneManager.getRingtone(
- preference.getContext(), Uri.parse(stringValue));
-
- if (ringtone == null) {
- // Clear the summary if there was a lookup error.
- preference.setSummary(null);
- } else {
- // Set the summary to reflect the new ringtone display
- // name.
- String name = ringtone
- .getTitle(preference.getContext());
- preference.setSummary(name);
- }
- }
-
- } */ else {
+ } else {
String key = preference.getKey();
// For all other preferences, set the summary to the value's
// simple string representation.
@@ -268,20 +246,6 @@ public class SettingsActivity extends SherlockPreferenceActivity {
return true;
}
};
-
- /*
- private static void ShowInfoDialog(String text)
- {
- // Use the Builder class for convenient dialog construction
- AlertDialog.Builder builder = new AlertDialog.Builder(mActivity);
- builder.setMessage(text)
- .setTitle("Security warning")
- .setPositiveButton("Ok", null);
-
- // Create the AlertDialog object and return it
- builder.create().show();
- }*/
-
private static Preference.OnPreferenceChangeListener sBindPreferenceBooleanToValueListener = new Preference.OnPreferenceChangeListener() {
@Override
@@ -337,12 +301,6 @@ public class SettingsActivity extends SherlockPreferenceActivity {
super.onCreate(savedInstanceState);
addPreferencesFromResource(R.xml.pref_general);
- // Bind the summaries of EditText/List/Dialog/Ringtone preferences
- // to their values. When their values change, their summaries are
- // updated to reflect the new value, per the Android Design
- // guidelines.
-
-
bindGeneralPreferences(this, null);
}
}
@@ -360,11 +318,7 @@ public class SettingsActivity extends SherlockPreferenceActivity {
super.onCreate(savedInstanceState);
addPreferencesFromResource(R.xml.pref_notification);
- // Bind the summaries of EditText/List/Dialog/Ringtone preferences
- // to their values. When their values change, their summaries are
- // updated to reflect the new value, per the Android Design
- // guidelines.
- //bindPreferenceSummaryToValue(findPreference("notifications_new_message_ringtone"));
+ bindNotificationPreferences(this, null);
}
}
@@ -379,10 +333,6 @@ public class SettingsActivity extends SherlockPreferenceActivity {
super.onCreate(savedInstanceState);
addPreferencesFromResource(R.xml.pref_data_sync);
- // Bind the summaries of EditText/List/Dialog/Ringtone preferences
- // to their values. When their values change, their summaries are
- // updated to reflect the new value, per the Android Design
- // guidelines.
bindDataSyncPreferences(this, null);
}
}
@@ -399,10 +349,6 @@ public class SettingsActivity extends SherlockPreferenceActivity {
super.onCreate(savedInstanceState);
addPreferencesFromResource(R.xml.pref_display);
- // Bind the summaries of EditText/List/Dialog/Ringtone preferences
- // to their values. When their values change, their summaries are
- // updated to reflect the new value, per the Android Design
- // guidelines.
bindDisplayPreferences(this, null);
}
}
@@ -493,8 +439,8 @@ public class SettingsActivity extends SherlockPreferenceActivity {
public boolean onPreferenceClick(Preference preference) {
((EditTextPreference) preference).getDialog().dismiss();
-
- CheckForUnsycedChangesInDatabase(_mActivity);
+
+ CheckForUnsycedChangesInDatabaseAndResetDatabase(_mActivity);
return false;
}
});
@@ -515,7 +461,7 @@ public class SettingsActivity extends SherlockPreferenceActivity {
}
- public static void CheckForUnsycedChangesInDatabase(final Context context) {
+ public static void CheckForUnsycedChangesInDatabaseAndResetDatabase(final Context context) {
DatabaseConnection dbConn = new DatabaseConnection(context);
boolean resetDatabase = true;
if(dbConn.getAllNewReadItems().size() > 0)
@@ -527,8 +473,8 @@ public class SettingsActivity extends SherlockPreferenceActivity {
else if(dbConn.getAllNewUnstarredItems().size() > 0)
resetDatabase = false;
- if(resetDatabase) {
- ResetDatabase();
+ if(resetDatabase) {
+ new ResetDatabaseAsyncTask(context).execute();
} else {
new AlertDialog.Builder(context)
.setTitle(context.getString(R.string.warning))
@@ -540,7 +486,7 @@ public class SettingsActivity extends SherlockPreferenceActivity {
PostDelayHandler pDelayHandler = new PostDelayHandler(context);
pDelayHandler.stopRunningPostDelayHandler();
- ResetDatabase();
+ new ResetDatabaseAsyncTask(context).execute();
}
})
.setNegativeButton(context.getString(android.R.string.no), null)
@@ -550,19 +496,52 @@ public class SettingsActivity extends SherlockPreferenceActivity {
dbConn.closeDatabase();
}
-
- private static void ResetDatabase() {
- DatabaseConnection dbConn = new DatabaseConnection(_mActivity);
- try {
- dbConn.resetDatabase();
- ImageHandler.clearCache(_mActivity);
- LoginDialogFragment.ShowAlertDialog("Information" , "Cache is cleared!", _mActivity);
- new GetCacheSizeAsync().execute((Void)null);
- } finally {
- dbConn.closeDatabase();
- }
- }
-
+
+ public static class ResetDatabaseAsyncTask extends AsyncTask<Void, Void, Boolean> {
+
+ ProgressDialog pd;
+ Context context;
+
+ public ResetDatabaseAsyncTask(Context context) {
+ this.context = context;
+ }
+
+ @Override
+ protected void onPreExecute() {
+ pd = new ProgressDialog(context);
+ pd.setIndeterminate(true);
+ pd.setCancelable(false);
+ pd.setTitle(context.getString(R.string.dialog_clearing_cache));
+ pd.setMessage(context.getString(R.string.dialog_clearing_cache_please_wait));
+ pd.show();
+
+ super.onPreExecute();
+ }
+
+ @Override
+ protected Boolean doInBackground(Void... params) {
+ DatabaseConnection dbConn = new DatabaseConnection(_mActivity);
+ try {
+ dbConn.resetDatabase();
+ boolean success = ImageHandler.clearCache(_mActivity);
+ new GetCacheSizeAsync().execute((Void)null);
+ return success;
+ } finally {
+ dbConn.closeDatabase();
+ }
+ }
+
+ @Override
+ protected void onPostExecute(Boolean result) {
+ pd.dismiss();
+ if(result)
+ LoginDialogFragment.ShowAlertDialog("Information" , "Cache is cleared!", _mActivity);
+ else
+ LoginDialogFragment.ShowAlertDialog("Information", context.getString(R.string.login_dialog_text_something_went_wrong), _mActivity);
+ super.onPostExecute(result);
+ };
+ }
+
public static class GetCacheSizeAsync extends AsyncTask<Void, Void, Void> {
String mSize = "0MB";
diff --git a/src/de/luhmer/owncloudnewsreader/VersionInfoDialogFragment.java b/src/de/luhmer/owncloudnewsreader/VersionInfoDialogFragment.java
index 5e132ab7..9e10c5c7 100644
--- a/src/de/luhmer/owncloudnewsreader/VersionInfoDialogFragment.java
+++ b/src/de/luhmer/owncloudnewsreader/VersionInfoDialogFragment.java
@@ -35,6 +35,9 @@ import android.widget.TextView;
import com.actionbarsherlock.app.SherlockDialogFragment;
+import it.gmariotti.changelibs.library.internal.ChangeLog;
+import it.gmariotti.changelibs.library.view.ChangeLogListView;
+
/**
* Activity which displays a login screen to the user, offering registration as
* well.
@@ -47,13 +50,23 @@ public class VersionInfoDialogFragment extends SherlockDialogFragment {
// Build the dialog and set up the button click handlers
AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
LayoutInflater inflater = getActivity().getLayoutInflater();
- View view = inflater.inflate(R.layout.dialog_version_info, null);
+ final View view = inflater.inflate(R.layout.dialog_version_info, null);
builder.setView(view).setTitle(getString(R.string.menu_About_Changelog));
try {
PackageInfo pInfo = getActivity().getPackageManager().getPackageInfo(getActivity().getPackageName(), 0);
String version = pInfo.versionName;
((TextView)view.findViewById(R.id.tv_androidAppVersion)).setText("You're using Version " + version);
+
+
+ ChangeLogListView clListView = (ChangeLogListView) view.findViewById(R.id.changelog_listview);
+ clListView.setCallback(new ChangeLogListView.FinishedLoadingCallback() {
+ @Override
+ public void FinishedLoading() {
+ view.findViewById(R.id.changeLogLoadingProgressBar).setVisibility(View.GONE);
+ }
+ });
+
} catch (Exception ex) {
ex.printStackTrace();
}
diff --git a/src/de/luhmer/owncloudnewsreader/cursor/NewsListCursorAdapter.java b/src/de/luhmer/owncloudnewsreader/cursor/NewsListCursorAdapter.java
index 74f5a910..d4d01dda 100644
--- a/src/de/luhmer/owncloudnewsreader/cursor/NewsListCursorAdapter.java
+++ b/src/de/luhmer/owncloudnewsreader/cursor/NewsListCursorAdapter.java
@@ -153,6 +153,7 @@ public class NewsListCursorAdapter extends CursorAdapter {
}
RobotoCheckBox cbRead = (RobotoCheckBox) view.findViewById(R.id.cb_lv_item_read);
+ cbRead.setTag(idItemDb);
cbRead.setOnCheckedChangeListener(null);
Boolean isChecked = dbConn.isFeedUnreadStarred(cursor.getString(0), true);
//Log.d("ISREAD", "" + isChecked + " - Cursor: " + cursor.getString(0));
@@ -168,26 +169,7 @@ public class NewsListCursorAdapter extends CursorAdapter {
@Override
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
- dbConn.updateIsReadOfItem(idItemDb, isChecked);
- UpdateListCursor(mContext);
-
- pDelayHandler.DelayTimer();
-
- RobotoTextView textView = (RobotoTextView) view.findViewById(R.id.summary);
- if(textView != null)
- {
- FontHelper fHelper = new FontHelper(context);
- if(isChecked)
- fHelper.setFontStyleForSingleView(textView, fHelper.getFont());
- //textView.setTextAppearance(mContext, R.style.RobotoFontStyle);
- else {
- fHelper.setFontStyleForSingleView(textView, fHelper.getFontUnreadStyle());
- onStayUnread.stayUnread((RobotoCheckBox)buttonView);
- }
- //textView.setTextAppearance(mContext, R.style.RobotoFontStyleBold);
-
- textView.invalidate();
- }
+ ChangeReadStateOfItem((RobotoCheckBox) buttonView, view, isChecked, context);
}
});
@@ -197,7 +179,31 @@ public class NewsListCursorAdapter extends CursorAdapter {
if(colorString != null)
viewColor.setBackgroundColor(Integer.parseInt(colorString));
}
-
+
+ public void ChangeReadStateOfItem(RobotoCheckBox checkBox, View parentView, boolean isChecked, Context context) {
+
+ dbConn.updateIsReadOfItem(checkBox.getTag().toString(), isChecked);
+ UpdateListCursor(mContext);
+
+ pDelayHandler.DelayTimer();
+
+ RobotoTextView textView = (RobotoTextView) parentView.findViewById(R.id.summary);
+ if(textView != null)
+ {
+ FontHelper fHelper = new FontHelper(context);
+ if(isChecked)
+ fHelper.setFontStyleForSingleView(textView, fHelper.getFont());
+ //textView.setTextAppearance(mContext, R.style.RobotoFontStyle);
+ else {
+ fHelper.setFontStyleForSingleView(textView, fHelper.getFontUnreadStyle());
+ onStayUnread.stayUnread(checkBox);
+ }
+ //textView.setTextAppearance(mContext, R.style.RobotoFontStyleBold);
+
+ textView.invalidate();
+ }
+ }
+
public void setSimpleLayout(View view, Cursor cursor)
{
TextView textViewSummary = (TextView) view.findViewById(R.id.summary);
diff --git a/src/de/luhmer/owncloudnewsreader/helper/ImageHandler.java b/src/de/luhmer/owncloudnewsreader/helper/ImageHandler.java
index 11d30e97..8f8073d4 100644
--- a/src/de/luhmer/owncloudnewsreader/helper/ImageHandler.java
+++ b/src/de/luhmer/owncloudnewsreader/helper/ImageHandler.java
@@ -22,7 +22,9 @@
package de.luhmer.owncloudnewsreader.helper;
import java.io.File;
+import java.io.FileOutputStream;
import java.io.InputStream;
+import java.io.OutputStreamWriter;
import java.math.BigInteger;
import java.net.URL;
import java.security.MessageDigest;
@@ -117,7 +119,7 @@ public class ImageHandler {
}
public static String getPath(Context context) {
- String url = null;
+ String url;
Boolean isSDPresent = android.os.Environment.getExternalStorageState().equals(android.os.Environment.MEDIA_MOUNTED);
if(isSDPresent)
{
@@ -126,10 +128,10 @@ public class ImageHandler {
url = url + "/external_sd";
}
//url = url + "/" + context.getString(R.string.app_name);
- url = url + "/ownCloud News Reader";
+ url = url + "/ownCloud News Reader";
}
else
- url = context.getCacheDir().getAbsolutePath(); //Environment.getDownloadCacheDirectory().getAbsolutePath();
+ url = context.getCacheDir().getAbsolutePath();
return url;
}
@@ -156,10 +158,28 @@ public class ImageHandler {
}
- public static void clearCache(Context context)
+ public static boolean clearCache(Context context)
{
- deleteDir(new File(getPath(context)));
+ String path = getPath(context);
+ boolean result = deleteDir(new File(path));
+ createEmptyFile(path + "/.nomedia");
+ return result;
}
+
+ public static void createEmptyFile(String path) {
+ try {
+ File file = new File(path);
+ if(!file.exists()) {
+ new File(file.getParent()).mkdirs();
+ FileOutputStream fOut = new FileOutputStream(file, false);
+ OutputStreamWriter osw = new OutputStreamWriter(fOut);
+ osw.flush();
+ osw.close();
+ }
+ } catch(Exception ex) {
+ ex.printStackTrace();
+ }
+ }
// Deletes all files and subdirectories under dir.
// Returns true if all deletions were successful.
diff --git a/src/de/luhmer/owncloudnewsreader/helper/MenuUtilsSherlockFragmentActivity.java b/src/de/luhmer/owncloudnewsreader/helper/MenuUtilsSherlockFragmentActivity.java
index 2a7ba624..4d82ef44 100644
--- a/src/de/luhmer/owncloudnewsreader/helper/MenuUtilsSherlockFragmentActivity.java
+++ b/src/de/luhmer/owncloudnewsreader/helper/MenuUtilsSherlockFragmentActivity.java
@@ -101,7 +101,7 @@ public class MenuUtilsSherlockFragmentActivity extends SherlockFragmentActivity
//menuItemMarkAllAsRead.setEnabled(false);
- menuItemDownloadMoreItems.setEnabled(false);
+ menuItemDownloadMoreItems.setEnabled(false);
NewsReaderDetailFragment ndf = ((NewsReaderDetailFragment) activity.getSupportFragmentManager().findFragmentById(R.id.content_frame));
if(ndf != null)