update to 0.5.7 - see readme for changelog
This commit is contained in:
parent
6bc61819b0
commit
b33a9348ad
31 changed files with 767 additions and 735 deletions
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$" external.system.id="GRADLE" external.system.module.group="" external.system.module.version="unspecified" type="JAVA_MODULE" version="4">
|
||||
<component name="NewModuleRootManager" inherit-compiler-output="false">
|
||||
<module external.linked.project.path="C:\Users\David\Documents\Android-Projects\News-Android-App" external.root.project.path="$MODULE_DIR$" external.system.id="GRADLE" external.system.module.group="" external.system.module.version="unspecified" type="JAVA_MODULE" version="4">
|
||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||
<output url="file://$MODULE_DIR$/build/classes/main" />
|
||||
<output-test url="file://$MODULE_DIR$/build/classes/test" />
|
||||
<exclude-output />
|
||||
|
|
|
@ -1,6 +1,11 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$/.." external.system.id="GRADLE" external.system.module.group="News-Android-App" external.system.module.version="unspecified" type="JAVA_MODULE" version="4">
|
||||
<module external.linked.project.path="C:\Users\David\Documents\Android-Projects\News-Android-App\News-Android-App" external.root.project.path="$MODULE_DIR$/.." external.system.id="GRADLE" external.system.module.group="News-Android-App" external.system.module.version="unspecified" type="JAVA_MODULE" version="4">
|
||||
<component name="FacetManager">
|
||||
<facet type="android-gradle" name="Android-Gradle">
|
||||
<configuration>
|
||||
<option name="GRADLE_PROJECT_PATH" value=":News-Android-App" />
|
||||
</configuration>
|
||||
</facet>
|
||||
<facet type="android" name="Android">
|
||||
<configuration>
|
||||
<option name="SELECTED_BUILD_VARIANT" value="debug" />
|
||||
|
@ -15,11 +20,6 @@
|
|||
<option name="ASSETS_FOLDER_RELATIVE_PATH" value="/src/main/assets" />
|
||||
</configuration>
|
||||
</facet>
|
||||
<facet type="android-gradle" name="Android-Gradle">
|
||||
<configuration>
|
||||
<option name="GRADLE_PROJECT_PATH" value=":News-Android-App" />
|
||||
</configuration>
|
||||
</facet>
|
||||
</component>
|
||||
<component name="NewModuleRootManager" inherit-compiler-output="false">
|
||||
<output url="file://$MODULE_DIR$/build/classes/debug" />
|
||||
|
@ -30,31 +30,31 @@
|
|||
<sourceFolder url="file://$MODULE_DIR$/build/source/buildConfig/debug" isTestSource="false" generated="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/build/source/rs/debug" isTestSource="false" generated="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/build/res/rs/debug" type="java-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/build/source/r/test/debug" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/build/source/aidl/test/debug" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/build/source/buildConfig/test/debug" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/build/source/rs/test/debug" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/build/source/r/test/debug" isTestSource="true" generated="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/build/source/aidl/test/debug" isTestSource="true" generated="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/build/source/buildConfig/test/debug" isTestSource="true" generated="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/build/source/rs/test/debug" isTestSource="true" generated="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/build/res/rs/test/debug" type="java-test-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/debug/res" type="java-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/debug/resources" type="java-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/debug/aidl" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/debug/assets" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/debug/java" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/debug/jni" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/debug/rs" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/debug/res" type="java-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/debug/resources" type="java-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/main/res" type="java-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/main/assets" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/main/jni" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/main/rs" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/main/res" type="java-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/instrumentTest/aidl" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/instrumentTest/assets" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/instrumentTest/java" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/instrumentTest/jni" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/instrumentTest/rs" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/instrumentTest/res" type="java-test-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/instrumentTest/resources" type="java-test-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/res" type="java-test-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/resources" type="java-test-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/aidl" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/assets" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/java" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/jni" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/rs" isTestSource="true" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/apk" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/assets" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/bundles" />
|
||||
|
@ -69,15 +69,15 @@
|
|||
</content>
|
||||
<orderEntry type="jdk" jdkName="Android API 19 Platform" jdkType="Android SDK" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="module" module-name="MessageBar" exported="" />
|
||||
<orderEntry type="library" exported="" name="ComGithubChrisbanesActionbarpulltorefreshExtraAbs093.aar" level="project" />
|
||||
<orderEntry type="library" exported="" name="extra-abs-0.9.3" level="project" />
|
||||
<orderEntry type="library" exported="" name="library-0.2.0" level="project" />
|
||||
<orderEntry type="library" exported="" name="library-0.9.3" level="project" />
|
||||
<orderEntry type="library" exported="" name="gson-2.2.4" level="project" />
|
||||
<orderEntry type="library" exported="" name="ComActionbarsherlockActionbarsherlock440.aar" level="project" />
|
||||
<orderEntry type="library" exported="" name="jsoup-1.7.2" level="project" />
|
||||
<orderEntry type="library" exported="" name="ComGithubCastorflexSmoothprogressbarLibrary020.aar" level="project" />
|
||||
<orderEntry type="library" exported="" name="support-v4-19.0.1" level="project" />
|
||||
<orderEntry type="library" exported="" name="actionbarsherlock-4.4.0" level="project" />
|
||||
<orderEntry type="module" module-name="MessageBar" exported="" />
|
||||
<orderEntry type="module" module-name="ChangeLogLibrary" exported="" />
|
||||
<orderEntry type="library" exported="" name="ComGithubChrisbanesActionbarpulltorefreshLibrary093.aar" level="project" />
|
||||
</component>
|
||||
</module>
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ buildscript {
|
|||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:0.8.+'
|
||||
classpath 'com.android.tools.build:gradle:0.9.+'
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -24,6 +24,7 @@ android {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
sourceSets {
|
||||
main {
|
||||
aidl.srcDirs = ['src/main/java']
|
||||
|
|
|
@ -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="41"
|
||||
android:versionName="0.5.6" >
|
||||
android:versionCode="42"
|
||||
android:versionName="0.5.7" >
|
||||
|
||||
<uses-sdk
|
||||
android:minSdkVersion="7"
|
||||
|
@ -11,36 +11,33 @@
|
|||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
|
||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
||||
|
||||
<uses-permission android:name="android.permission.GET_TASKS" />
|
||||
|
||||
<uses-permission android:name="android.permission.READ_SYNC_SETTINGS"/>
|
||||
<uses-permission android:name="android.permission.READ_SYNC_SETTINGS" />
|
||||
<uses-permission android:name="android.permission.USE_CREDENTIALS" />
|
||||
<uses-permission android:name="android.permission.WRITE_SYNC_SETTINGS"/>
|
||||
<uses-permission android:name="android.permission.AUTHENTICATE_ACCOUNTS"/>
|
||||
<uses-permission android:name="android.permission.GET_ACCOUNTS"/>
|
||||
|
||||
<uses-permission android:name="android.permission.WRITE_SYNC_SETTINGS" />
|
||||
<uses-permission android:name="android.permission.AUTHENTICATE_ACCOUNTS" />
|
||||
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
|
||||
|
||||
<application
|
||||
android:debuggable="false"
|
||||
android:allowBackup="true"
|
||||
android:debuggable="true"
|
||||
android:icon="@drawable/ic_launcher"
|
||||
android:label="@string/app_name"
|
||||
android:theme="@style/AppTheme">
|
||||
android:theme="@style/AppTheme" >
|
||||
<activity
|
||||
android:name="de.luhmer.owncloudnewsreader.NewsReaderListActivity"
|
||||
android:label="@string/app_name"> <!-- android:configChanges="keyboardHidden|orientation|screenSize" -->
|
||||
android:label="@string/app_name" >
|
||||
<!-- android:configChanges="keyboardHidden|orientation|screenSize" -->
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
|
||||
<activity
|
||||
android:name="de.luhmer.owncloudnewsreader.NewsDetailActivity"
|
||||
android:label="@string/title_activity_news_detail"
|
||||
android:configChanges="keyboardHidden|orientation|screenSize" >
|
||||
android:configChanges="keyboardHidden|orientation|screenSize"
|
||||
android:label="@string/title_activity_news_detail" >
|
||||
</activity>
|
||||
|
||||
<service android:name="de.luhmer.owncloudnewsreader.services.DownloadImagesService" />
|
||||
|
@ -50,8 +47,7 @@
|
|||
android:name="de.luhmer.owncloudnewsreader.SettingsActivity"
|
||||
android:label="@string/title_activity_settings" >
|
||||
</activity>
|
||||
|
||||
<activity android:name=".DownloadImagesActivity" />
|
||||
<activity android:name="de.luhmer.owncloudnewsreader.DownloadImagesActivity" />
|
||||
|
||||
<!--
|
||||
**********************************************************************
|
||||
|
@ -59,45 +55,46 @@
|
|||
**********************************************************************
|
||||
-->
|
||||
|
||||
|
||||
<service
|
||||
android:name="de.luhmer.owncloudnewsreader.services.OwnCloudAuthenticatorService"
|
||||
android:exported="true" >
|
||||
<intent-filter>
|
||||
<action android:name="android.accounts.AccountAuthenticator" />
|
||||
</intent-filter>
|
||||
<meta-data android:name="android.accounts.AccountAuthenticator"
|
||||
android:resource="@xml/authenticator" />
|
||||
</service>
|
||||
<intent-filter>
|
||||
<action android:name="android.accounts.AccountAuthenticator" />
|
||||
</intent-filter>
|
||||
|
||||
<meta-data
|
||||
android:name="android.accounts.AccountAuthenticator"
|
||||
android:resource="@xml/authenticator" />
|
||||
</service>
|
||||
<service android:name="de.luhmer.owncloudnewsreader.services.OwnCloudSyncService" />
|
||||
|
||||
<service
|
||||
android:name="de.luhmer.owncloudnewsreader.services.OwnCloudSettingsSyncService"
|
||||
android:exported="true" >
|
||||
<intent-filter>
|
||||
<action android:name="android.content.SyncAdapter" />
|
||||
</intent-filter>
|
||||
<meta-data
|
||||
android:name="android.content.SyncAdapter"
|
||||
android:resource="@xml/syncadapter" />
|
||||
</service>
|
||||
android:exported="true" >
|
||||
<intent-filter>
|
||||
<action android:name="android.content.SyncAdapter" />
|
||||
</intent-filter>
|
||||
|
||||
<meta-data
|
||||
android:name="android.content.SyncAdapter"
|
||||
android:resource="@xml/syncadapter" />
|
||||
</service>
|
||||
|
||||
<provider
|
||||
android:name=".providers.OwnCloudSyncProvider"
|
||||
android:authorities="de.luhmer.owncloudnewsreader"
|
||||
android:label="@string/auto_sync_string"
|
||||
android:syncable="true">
|
||||
android:name="de.luhmer.owncloudnewsreader.providers.OwnCloudSyncProvider"
|
||||
android:authorities="de.luhmer.owncloudnewsreader"
|
||||
android:label="@string/auto_sync_string"
|
||||
android:syncable="true" >
|
||||
</provider>
|
||||
|
||||
<!--
|
||||
<!--
|
||||
<activity
|
||||
android:name=".authentication.AuthenticatorActivity"
|
||||
android:label="@string/title_activity_settings"
|
||||
android:launchMode="singleTask" > -->
|
||||
<!-- android:theme="@style/Theme.Transparent" > --><!--
|
||||
</activity>
|
||||
-->
|
||||
android:launchMode="singleTask" >
|
||||
-->
|
||||
<!-- android:theme="@style/Theme.Transparent" > -->
|
||||
<!-- </activity> -->
|
||||
|
||||
|
||||
<!--
|
||||
**********************************************************************
|
||||
|
@ -119,5 +116,10 @@
|
|||
android:exported="false"
|
||||
android:permission="android.permission.BIND_REMOTEVIEWS" />
|
||||
|
||||
<activity
|
||||
android:name="de.luhmer.owncloudnewsreader.SyncIntervalSelectorActivity"
|
||||
android:label="@string/title_activity_sync_interval_selector" >
|
||||
</activity>
|
||||
</application>
|
||||
|
||||
</manifest>
|
31
News-Android-App/src/main/assets/LinkLongClick.js
Normal file
31
News-Android-App/src/main/assets/LinkLongClick.js
Normal file
|
@ -0,0 +1,31 @@
|
|||
var links = document.getElementsByTagName('a');
|
||||
|
||||
for (var i = 0; i < links.length; i++) {
|
||||
|
||||
(function (link) {
|
||||
var timer;
|
||||
link.addEventListener('mouseup', function() {
|
||||
clearTimeout(timer);
|
||||
});
|
||||
|
||||
|
||||
link.addEventListener('mousedown', function (e) {
|
||||
timer = window.setTimeout(function() {
|
||||
e.preventDefault();
|
||||
Android.openLinkInBrowser(link.getAttribute('href'));
|
||||
}, 1000);
|
||||
});
|
||||
|
||||
link.addEventListener("touchstart", function(e){
|
||||
timer = window.setTimeout(function() {
|
||||
e.preventDefault();
|
||||
Android.openLinkInBrowser(link.getAttribute('href'));
|
||||
}, 1000);
|
||||
});
|
||||
|
||||
link.addEventListener('touchend', function() {
|
||||
clearTimeout(timer);
|
||||
});
|
||||
})(links[i]);
|
||||
|
||||
}
|
|
@ -264,7 +264,7 @@ public class NewsDetailActivity extends SherlockFragmentActivity {
|
|||
{
|
||||
NewsDetailFragment fragment = (NewsDetailFragment) getSupportFragmentManager().findFragmentByTag("android:switcher:" + R.id.pager + ":" + currentPosition);
|
||||
if(fragment != null) // could be null if not instantiated yet
|
||||
fragment.ResumCurrentPage();
|
||||
fragment.ResumeCurrentPage();
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -49,6 +49,7 @@ import de.luhmer.owncloudnewsreader.database.DatabaseConnection;
|
|||
import de.luhmer.owncloudnewsreader.helper.FontHelper;
|
||||
import de.luhmer.owncloudnewsreader.helper.ImageHandler;
|
||||
import de.luhmer.owncloudnewsreader.helper.ThemeChooser;
|
||||
import de.luhmer.owncloudnewsreader.interfaces.WebViewLinkLongClickInterface;
|
||||
|
||||
public class NewsDetailFragment extends SherlockFragment {
|
||||
public static final String ARG_SECTION_NUMBER = "ARG_SECTION_NUMBER";
|
||||
|
@ -76,7 +77,7 @@ public class NewsDetailFragment extends SherlockFragment {
|
|||
@Override
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
ResumCurrentPage();
|
||||
ResumeCurrentPage();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -109,7 +110,7 @@ public class NewsDetailFragment extends SherlockFragment {
|
|||
}
|
||||
|
||||
@TargetApi(Build.VERSION_CODES.HONEYCOMB_MR2)
|
||||
public void ResumCurrentPage()
|
||||
public void ResumeCurrentPage()
|
||||
{
|
||||
/*
|
||||
Class.forName("android.webkit.WebView")
|
||||
|
@ -132,10 +133,6 @@ public class NewsDetailFragment extends SherlockFragment {
|
|||
|
||||
webview = (WebView) rootView.findViewById(R.id.webview);
|
||||
|
||||
if(ThemeChooser.isDarkTheme(getActivity())) {
|
||||
webview.setBackgroundColor(getResources().getColor(android.R.color.background_dark));
|
||||
}
|
||||
|
||||
progressbar_webview = (ProgressBar) rootView.findViewById(R.id.progressbar_webview);
|
||||
|
||||
LoadRssItemInWebView();
|
||||
|
@ -149,7 +146,7 @@ public class NewsDetailFragment extends SherlockFragment {
|
|||
|
||||
if(background_color != Integer.MIN_VALUE && ThemeChooser.isDarkTheme(ndActivity))
|
||||
{
|
||||
//webview.setBackgroundColor(background_color);
|
||||
webview.setBackgroundColor(background_color);
|
||||
ndActivity.mViewPager.setBackgroundColor(background_color);
|
||||
}
|
||||
|
||||
|
@ -184,6 +181,7 @@ public class NewsDetailFragment extends SherlockFragment {
|
|||
//webview.clearCache(true);
|
||||
|
||||
|
||||
webview.addJavascriptInterface(new WebViewLinkLongClickInterface(getActivity()), "Android");
|
||||
|
||||
webview.setWebChromeClient(new WebChromeClient() {
|
||||
public void onProgressChanged(WebView view, int progress)
|
||||
|
@ -195,9 +193,42 @@ public class NewsDetailFragment extends SherlockFragment {
|
|||
if(progress == 100) {
|
||||
progressbar_webview.setVisibility(ProgressBar.GONE);
|
||||
|
||||
//The following three lines are a workaround for websites which don't use a background colour
|
||||
NewsDetailActivity ndActivity = ((NewsDetailActivity)getActivity());
|
||||
webview.setBackgroundColor(getResources().getColor(R.color.slider_listview_text_color));
|
||||
ndActivity.mViewPager.setBackgroundColor(getResources().getColor(R.color.slider_listview_text_color));
|
||||
|
||||
|
||||
if(ThemeChooser.isDarkTheme(getActivity())) {
|
||||
webview.setBackgroundColor(getResources().getColor(android.R.color.transparent));
|
||||
}
|
||||
|
||||
|
||||
|
||||
String jsLinkLongClick = getTextFromAssets("LinkLongClick.js", getActivity());
|
||||
//webview.loadUrl("javascript:(function(){document.getElementById('buttonClick').click();})()");
|
||||
webview.loadUrl("javascript:(function(){ " + jsLinkLongClick + " })()");
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
image.addEventListener("touchstart", function(e){
|
||||
timer = window.setTimeout(function() {
|
||||
e.preventDefault();
|
||||
alert(image.getAttribute('title'));
|
||||
//alert("fired - touchstart");
|
||||
}, 1000);
|
||||
});
|
||||
|
||||
image.addEventListener('touchend', function() {
|
||||
clearTimeout(timer);
|
||||
});
|
||||
*/
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -208,6 +239,7 @@ public class NewsDetailFragment extends SherlockFragment {
|
|||
}
|
||||
|
||||
|
||||
|
||||
@SuppressLint("SimpleDateFormat")
|
||||
public static String getHtmlPage(Context context, DatabaseConnection dbConn, int idItem)
|
||||
{
|
||||
|
@ -379,22 +411,29 @@ public class NewsDetailFragment extends SherlockFragment {
|
|||
|
||||
|
||||
|
||||
static String getTextFromAssets(String fileName, Context context) {
|
||||
InputStream input;
|
||||
try {
|
||||
input = context.getAssets().open(fileName);
|
||||
int size = input.available();
|
||||
byte[] buffer = new byte[size];
|
||||
input.read(buffer);
|
||||
input.close();
|
||||
|
||||
private static void init_webTemplate(Context context)
|
||||
// byte buffer into a string
|
||||
return new String(buffer);
|
||||
} catch(Exception ex) {
|
||||
ex.printStackTrace();
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
private static void init_webTemplate(Context context)
|
||||
{
|
||||
if(web_template == null)
|
||||
{
|
||||
InputStream input = null;
|
||||
try {
|
||||
//Activity act = getActivity();
|
||||
input = context.getAssets().open("web_template.html");
|
||||
int size = input.available();
|
||||
byte[] buffer = new byte[size];
|
||||
input.read(buffer);
|
||||
input.close();
|
||||
|
||||
// byte buffer into a string
|
||||
web_template = new String(buffer);
|
||||
web_template = getTextFromAssets("web_template.html", context);
|
||||
|
||||
String background_color_string = SearchString(web_template, "background-color:", ";");
|
||||
|
||||
|
|
|
@ -33,6 +33,7 @@ import android.os.Looper;
|
|||
import android.os.Message;
|
||||
import android.os.RemoteException;
|
||||
import android.preference.PreferenceManager;
|
||||
import android.provider.Settings;
|
||||
import android.support.v4.app.FragmentActivity;
|
||||
import android.support.v4.app.FragmentManager;
|
||||
import android.support.v4.widget.SlidingPaneLayout;
|
||||
|
@ -478,6 +479,13 @@ public class NewsReaderListActivity extends MenuUtilsSherlockFragmentActivity im
|
|||
startActivityForResult(intent, RESULT_SETTINGS);
|
||||
return true;
|
||||
|
||||
case R.id.action_sync_settings:
|
||||
String[] authorities = { "de.luhmer.owncloudnewsreader" };
|
||||
Intent intentSyncSettings = new Intent(Settings.ACTION_SYNC_SETTINGS);
|
||||
intentSyncSettings.putExtra(Settings.EXTRA_AUTHORITIES, authorities);
|
||||
startActivity(intentSyncSettings);
|
||||
break;
|
||||
|
||||
case R.id.menu_update:
|
||||
//menuItemUpdater = item.setActionView(R.layout.inderterminate_progress);
|
||||
startSync();
|
||||
|
|
|
@ -0,0 +1,152 @@
|
|||
package de.luhmer.owncloudnewsreader;
|
||||
|
||||
import android.accounts.Account;
|
||||
import android.accounts.AccountManager;
|
||||
import android.annotation.TargetApi;
|
||||
import android.content.ContentResolver;
|
||||
import android.content.SharedPreferences;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.preference.PreferenceManager;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ArrayAdapter;
|
||||
import android.widget.ListView;
|
||||
|
||||
|
||||
import com.actionbarsherlock.app.SherlockFragment;
|
||||
import com.actionbarsherlock.app.SherlockFragmentActivity;
|
||||
import com.actionbarsherlock.view.Menu;
|
||||
import com.actionbarsherlock.view.MenuItem;
|
||||
|
||||
import de.luhmer.owncloudnewsreader.authentication.AccountGeneral;
|
||||
|
||||
|
||||
public class SyncIntervalSelectorActivity extends SherlockFragmentActivity {
|
||||
|
||||
SharedPreferences mPrefs;
|
||||
PlaceholderFragment mFragment;
|
||||
String[] items_values;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_sync_interval_selector);
|
||||
|
||||
mPrefs = PreferenceManager.getDefaultSharedPreferences(this);
|
||||
items_values = getResources().getStringArray(R.array.array_sync_interval_values);
|
||||
|
||||
if (savedInstanceState == null) {
|
||||
mFragment = new PlaceholderFragment();
|
||||
|
||||
getSupportFragmentManager().beginTransaction()
|
||||
.add(R.id.container, mFragment)
|
||||
.commit();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean onCreateOptionsMenu(Menu menu) {
|
||||
|
||||
// Inflate the menu; this adds items to the action bar if it is present.
|
||||
getSupportMenuInflater()
|
||||
.inflate(R.menu.sync_interval_selector, menu);
|
||||
return true;
|
||||
}
|
||||
|
||||
@TargetApi(Build.VERSION_CODES.FROYO)
|
||||
@Override
|
||||
public boolean onOptionsItemSelected(MenuItem item) {
|
||||
// Handle action bar item clicks here. The action bar will
|
||||
// automatically handle clicks on the Home/Up button, so long
|
||||
// as you specify a parent activity in AndroidManifest.xml.
|
||||
int id = item.getItemId();
|
||||
if (id == R.id.action_settings) {
|
||||
return true;
|
||||
} else if(id == R.id.action_save) {
|
||||
int checkedPosition = mFragment.lvItems.getCheckedItemPosition();
|
||||
|
||||
Integer minutes = Integer.parseInt(items_values[checkedPosition]);
|
||||
|
||||
mPrefs.edit().putInt(SYNC_INTERVAL_IN_MINUTES_STRING, minutes).commit();
|
||||
|
||||
long SYNC_INTERVAL = minutes * SECONDS_PER_MINUTE;
|
||||
|
||||
AccountManager mAccountManager = AccountManager.get(this);
|
||||
Account[] accounts = mAccountManager.getAccountsByType(AccountGeneral.ACCOUNT_TYPE);
|
||||
for(Account account : accounts) {
|
||||
|
||||
ContentResolver.setSyncAutomatically(account, AccountGeneral.ACCOUNT_TYPE, true);
|
||||
|
||||
Bundle bundle = new Bundle();
|
||||
ContentResolver.addPeriodicSync(
|
||||
account,
|
||||
AccountGeneral.ACCOUNT_TYPE,
|
||||
bundle,
|
||||
SYNC_INTERVAL);
|
||||
}
|
||||
|
||||
finish();
|
||||
}
|
||||
|
||||
|
||||
return super.onOptionsItemSelected(item);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* A placeholder fragment containing a simple view.
|
||||
*/
|
||||
|
||||
// Sync interval constants
|
||||
public static final long MILLISECONDS_PER_SECOND = 1000L;
|
||||
public static final long SECONDS_PER_MINUTE = 60L;
|
||||
//public static final long SYNC_INTERVAL_IN_MINUTES = 60L;
|
||||
public static final String SYNC_INTERVAL_IN_MINUTES_STRING = "SYNC_INTERVAL_IN_MINUTES_STRING";
|
||||
|
||||
public static class PlaceholderFragment extends SherlockFragment {
|
||||
|
||||
public ListView lvItems;
|
||||
|
||||
public PlaceholderFragment() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||
Bundle savedInstanceState) {
|
||||
View rootView = inflater.inflate(R.layout.fragment_sync_interval_selector, container, false);
|
||||
|
||||
String[] items = getResources().getStringArray(R.array.array_sync_interval);
|
||||
|
||||
lvItems = (ListView) rootView.findViewById(R.id.lv_sync_interval_items);
|
||||
lvItems.setChoiceMode(ListView.CHOICE_MODE_SINGLE);
|
||||
|
||||
|
||||
ArrayAdapter<String> adapter = new ArrayAdapter<String>(getActivity(),
|
||||
android.R.layout.simple_list_item_single_choice, android.R.id.text1, items);
|
||||
|
||||
|
||||
lvItems.setAdapter(adapter);
|
||||
|
||||
SharedPreferences mPrefs = PreferenceManager.getDefaultSharedPreferences(getActivity());
|
||||
if(!mPrefs.contains(SYNC_INTERVAL_IN_MINUTES_STRING))
|
||||
lvItems.setItemChecked(items.length - 1, true);//The last item is 24hours. This is the default value!
|
||||
else {
|
||||
int position = 0;
|
||||
int minutes = mPrefs.getInt(SYNC_INTERVAL_IN_MINUTES_STRING, 0);
|
||||
for(String item : ((SyncIntervalSelectorActivity)getActivity()).items_values) {
|
||||
if(Integer.parseInt(item) == minutes)
|
||||
break;
|
||||
position++;
|
||||
}
|
||||
lvItems.setItemChecked(position, true);//The last item is 24hours. This is the default value!
|
||||
}
|
||||
|
||||
return rootView;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,28 @@
|
|||
package de.luhmer.owncloudnewsreader.interfaces;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.net.Uri;
|
||||
import android.webkit.JavascriptInterface;
|
||||
|
||||
/**
|
||||
* Created by David on 25.03.2014.
|
||||
*/
|
||||
public class WebViewLinkLongClickInterface {
|
||||
Context mContext;
|
||||
|
||||
/** Instantiate the interface and set the context */
|
||||
public WebViewLinkLongClickInterface(Context c) {
|
||||
mContext = c;
|
||||
}
|
||||
|
||||
/** Show a toast from the web page */
|
||||
@JavascriptInterface
|
||||
public void openLinkInBrowser(String url) {
|
||||
if (!url.startsWith("http://") && !url.startsWith("https://"))
|
||||
url = "http://" + url;
|
||||
|
||||
Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));
|
||||
mContext.startActivity(browserIntent);
|
||||
}
|
||||
}
|
BIN
News-Android-App/src/main/res/drawable-hdpi/ic_menu_save.png
Normal file
BIN
News-Android-App/src/main/res/drawable-hdpi/ic_menu_save.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1 KiB |
BIN
News-Android-App/src/main/res/drawable-mdpi/ic_menu_save.png
Normal file
BIN
News-Android-App/src/main/res/drawable-mdpi/ic_menu_save.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.5 KiB |
BIN
News-Android-App/src/main/res/drawable-xhdpi/ic_menu_save.png
Normal file
BIN
News-Android-App/src/main/res/drawable-xhdpi/ic_menu_save.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.3 KiB |
|
@ -0,0 +1,7 @@
|
|||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context="de.luhmer.tasksync.SyncIntervalSelectorActivity"
|
||||
tools:ignore="MergeRootFrame" />
|
|
@ -0,0 +1,17 @@
|
|||
<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"
|
||||
android:paddingLeft="@dimen/activity_horizontal_margin"
|
||||
android:paddingRight="@dimen/activity_horizontal_margin"
|
||||
android:paddingTop="@dimen/activity_vertical_margin"
|
||||
android:paddingBottom="@dimen/activity_vertical_margin"
|
||||
tools:context="de.luhmer.tasksync.SyncIntervalSelectorActivity$PlaceholderFragment">
|
||||
|
||||
|
||||
<ListView
|
||||
android:id="@+id/lv_sync_interval_items"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
</RelativeLayout>
|
|
@ -28,6 +28,12 @@
|
|||
android:showAsAction="never"
|
||||
android:title="@string/action_settings"/>
|
||||
|
||||
<item
|
||||
android:id="@+id/action_sync_settings"
|
||||
android:orderInCategory="98"
|
||||
android:showAsAction="never"
|
||||
android:title="@string/action_sync_settings"/>
|
||||
|
||||
<item
|
||||
android:id="@+id/action_login"
|
||||
android:orderInCategory="99"
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
<menu xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
tools:context="de.luhmer.owncloudnewsreader.SyncIntervalSelectorActivity" >
|
||||
|
||||
<!--
|
||||
<item android:id="@+id/action_settings"
|
||||
android:title="@string/action_settings"
|
||||
android:orderInCategory="100"
|
||||
app:showAsAction="never" />
|
||||
-->
|
||||
|
||||
<item android:id="@+id/action_save"
|
||||
android:title="@string/action_save"
|
||||
android:icon="@drawable/ic_menu_save"
|
||||
android:showAsAction="always" />
|
||||
</menu>
|
|
@ -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>
|
|
@ -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>
|
|
@ -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>
|
|
@ -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>
|
|
@ -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>
|
|
@ -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>
|
6
News-Android-App/src/main/res/values-w820dp/dimens.xml
Normal file
6
News-Android-App/src/main/res/values-w820dp/dimens.xml
Normal file
|
@ -0,0 +1,6 @@
|
|||
<resources>
|
||||
<!-- Example customization of dimensions originally defined in res/values/dimens.xml
|
||||
(such as screen margins) for screens with more than 820dp of available width. This
|
||||
would include 7" and 10" devices in landscape (~960dp and ~1280dp respectively). -->
|
||||
<dimen name="activity_horizontal_margin">64dp</dimen>
|
||||
</resources>
|
|
@ -1,45 +1,33 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<string name="auto_sync_string">Auto sync</string>
|
||||
|
||||
|
||||
<string name="app_name">ownCloud News Reader</string>
|
||||
<string name="action_settings">Settings</string>
|
||||
<string name="title_activity_sync_interval_selector">Sync Interval Selector</string>
|
||||
<string name="title_activity_news_detail">NewsDetailActivity</string>
|
||||
<string name="title_activity_subscription">SubscriptionActivity</string>
|
||||
<string name="title_newsreader_list">NewsReader</string>
|
||||
<string name="title_newsreader_detail">NewsReader Detail</string>
|
||||
|
||||
|
||||
<string name="empty_view_header">Information</string>
|
||||
<string name="empty_view_content">No items here</string>
|
||||
<string name="toast_GettingMoreItems">Started downloading more items.. Please wait.</string>
|
||||
|
||||
<string name="tv_clickHereToOpenItem">Click here to open item</string>
|
||||
<string name="no_wifi_available">No WiFi connected</string>
|
||||
<string name="do_you_want_to_download_without_wifi">Do you want to download the images without a WiFi connection</string>
|
||||
|
||||
<string name="max_items_count_reached">You\'ve reached the maxiumum size of XX items</string>
|
||||
|
||||
<string name="widget_header">ownCloud News</string>
|
||||
|
||||
<string name="message_bar_new_articles_available">New items available</string>
|
||||
<string name="message_bar_reload">Reload</string>
|
||||
|
||||
<string name="allUnreadFeeds">All unread items</string>
|
||||
<string name="starredFeeds">Starred items</string>
|
||||
<!-- <string name="non_sorted_articles">Nicht zugeordnete Artikel</string> -->
|
||||
|
||||
<string name="menu_update">Refresh</string>
|
||||
<string name="menu_About_Changelog">About / Changelog</string>
|
||||
|
||||
|
||||
<string name="menu_markAllAsRead">Mark all as read</string>
|
||||
<string name="menu_StartImageCaching">Download images</string>
|
||||
<string name="menu_downloadMoreItems">Download more items</string>
|
||||
|
||||
|
||||
|
||||
<!-- EMAIL -->
|
||||
<string name="email_sourceCode">Sourcecode of item - Bugreport</string>
|
||||
<string name="email_sendMail">Send EMail</string>
|
||||
|
@ -51,12 +39,12 @@
|
|||
<string name="action_sendSourceCode">Send item to Developer</string>
|
||||
<string name="action_Share">Share</string>
|
||||
<string name="action_login">Server Settings</string>
|
||||
|
||||
|
||||
<string name="action_save">Save</string>
|
||||
<string name="action_settings">Settings</string>
|
||||
<string name="action_sync_settings">Sync Settings</string>
|
||||
<string name="notification_new_items_ticker">You have X new unread items</string>
|
||||
<string name="notification_new_items_text">X new unread items available</string>
|
||||
|
||||
|
||||
<!-- Strings related to login -->
|
||||
<string name="pref_title_username">Username</string>
|
||||
<string name="pref_title_password">Password</string>
|
||||
|
@ -65,27 +53,19 @@
|
|||
<!-- <string name="pref_default_username">admin</string> -->
|
||||
|
||||
<string name="action_sign_in_short">Sign in</string>
|
||||
<string name="login_progress_signing_in">Signing in…</string>
|
||||
<string name="login_progress_signing_in">Signing in…</string>
|
||||
<string name="error_incorrect_password">This password is incorrect</string>
|
||||
<string name="error_field_required">This field is required</string>
|
||||
<string name="error_invalid_url">This url is incorrect</string>
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- Toast Messages -->
|
||||
<string name="toast_downloaded_x_items">Downloaded X old items</string>
|
||||
<string name="toast_no_more_downloads_available">No further items available</string>
|
||||
|
||||
|
||||
|
||||
<string name="pull_to_refresh_updateTags">Synchronizing items states</string>
|
||||
<string name="pull_to_refresh_updateFolder">Synchronizing folder</string>
|
||||
<string name="pull_to_refresh_updateFeeds">Synchronizing feeds</string>
|
||||
<string name="pull_to_refresh_updateItems">Synchronizing items</string>
|
||||
|
||||
|
||||
|
||||
<!-- Strings related to Settings -->
|
||||
<string name="title_activity_settings">Settings</string>
|
||||
|
||||
|
@ -94,13 +74,13 @@
|
|||
<string name="pref_title_general_sort_order">Sort Order</string>
|
||||
|
||||
<string-array name="pref_general_sort_order">
|
||||
<item>New -> Old</item>
|
||||
<item>Old -> New</item>
|
||||
<item>New -> Old</item>
|
||||
<item>Old -> New</item>
|
||||
</string-array>
|
||||
<string-array name="pref_general_sort_order_values_not_translated">
|
||||
<item>1</item>
|
||||
<item>0</item>
|
||||
</string-array>
|
||||
</string-array>
|
||||
<!--
|
||||
<string-array name="pref_general_sort_order_values">
|
||||
<item>desc</item>
|
||||
|
@ -108,6 +88,7 @@
|
|||
</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>
|
||||
|
@ -118,19 +99,15 @@
|
|||
<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>
|
||||
|
||||
|
||||
<string name="pref_title_AutoSyncOnStart">Sync on startup</string>
|
||||
<string name="pref_title_ShowOnlyUnread">Show only unread articles</string>
|
||||
<!-- <string name="pref_title_AllowAllSSLCertificates">Allow all SSL Certificates</string> -->
|
||||
<!-- <string name="pref_title_AllowAllSSLCertificates">Allow all SSL Certificates</string> -->
|
||||
<string name="pref_title_DisableHostnameVerification">Disable Hostname Verification</string>
|
||||
<string name="pref_title_NavigateWithVolumeButtons">Navigate with volume buttons</string>
|
||||
<string name="pref_title_MarkAsReadWhileScrolling">Mark as read while scrolling</string>
|
||||
<string name="pref_title_OpenInBrowserDirectly">Skip detail view and open article in the browser</string>
|
||||
<string name="pref_title_notification_new_articles_available">Show notification when new articles are available</string>
|
||||
|
||||
|
||||
|
||||
<!-- MemorizingTrustManager -->
|
||||
<string name="mtm_accept_cert">Accept Unknown Certificate?</string>
|
||||
<string name="mtm_decision_always">Always</string>
|
||||
|
@ -138,15 +115,12 @@
|
|||
<string name="mtm_decision_abort">Abort</string>
|
||||
<string name="mtm_notification">Certificate Verification</string>
|
||||
|
||||
|
||||
|
||||
<!-- Settings for Display -->
|
||||
<string name="pref_header_display">Display</string>
|
||||
<string name="pref_title_app_theme">App theme (requires restart to apply)</string>
|
||||
<string name="pref_title_feed_list_layout">Feed list layout</string>
|
||||
<string name="pref_display_font_layout">Font (requires restart to apply)</string>
|
||||
|
||||
|
||||
<string-array name="pref_display_apptheme">
|
||||
<item>Dark</item>
|
||||
<item>Light</item>
|
||||
|
@ -155,7 +129,6 @@
|
|||
<item>0</item>
|
||||
<item>1</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="pref_display_feed_list_layout">
|
||||
<item>Simple</item>
|
||||
<item>Extended</item>
|
||||
|
@ -166,7 +139,6 @@
|
|||
<item>1</item>
|
||||
<item>2</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="pref_display_font">
|
||||
<item>Roboto Thin</item>
|
||||
<item>Roboto Light</item>
|
||||
|
@ -180,8 +152,8 @@
|
|||
<item>Roboto Slab Light</item>
|
||||
<item>Roboto Slab Regular</item>
|
||||
<item>Roboto Slab Bold</item>
|
||||
</string-array>
|
||||
<string-array name="pref_display_font_values">
|
||||
</string-array>
|
||||
<string-array name="pref_display_font_values">
|
||||
<item>0</item>
|
||||
<item>2</item>
|
||||
<item>4</item>
|
||||
|
@ -194,26 +166,20 @@
|
|||
<item>17</item>
|
||||
<item>18</item>
|
||||
<item>19</item>
|
||||
</string-array>
|
||||
|
||||
|
||||
</string-array>
|
||||
|
||||
<!-- Login Dialog -->
|
||||
<string name="login_dialog_title_error">Error</string>
|
||||
<string name="login_dialog_text_something_went_wrong">Something went wrong :(</string>
|
||||
<string name="login_dialog_text_not_compatible">This App version is not compatible with your ownCloud News App. Please update the news app and the appframework.</string>
|
||||
|
||||
<string name="login_dialog_title_security_warning">Security Warning</string>
|
||||
<string name="login_dialog_text_security_warning">You\'re not using https. An attacker could intercept your traffic and gain access to some sensitive data (e.g. your password). So it\'s strongly recommend to use https!</string>
|
||||
|
||||
|
||||
<!-- Data & Sync -->
|
||||
<string name="pref_header_data_sync">Data & sync</string>
|
||||
<!-- <string name="pref_title_data_sync_max_items">Max number of items to sync</string> -->
|
||||
<!-- <string name="pref_title_data_sync_max_items">Max number of items to sync</string> -->
|
||||
<string name="pref_title_clearCache">Clear cache</string>
|
||||
<string name="pref_title_CacheImagesOffline">Cache images offline</string>
|
||||
|
||||
|
||||
<string name="pref_title_Max_Cache_Size">Max Cache Size</string>
|
||||
|
||||
<string-array name="pref_data_sync_max_cache_size">
|
||||
|
@ -236,7 +202,30 @@
|
|||
</string-array>
|
||||
|
||||
|
||||
|
||||
<string-array name="array_sync_interval">
|
||||
<item>5 Minutes</item>
|
||||
<item>15 Minutes</item>
|
||||
<item>30 Minutes</item>
|
||||
<item>45 Minutes</item>
|
||||
<item>1 Hour</item>
|
||||
<item>2 Hours</item>
|
||||
<item>3 Hours</item>
|
||||
<item>6 Hours</item>
|
||||
<item>12 Hours</item>
|
||||
<item>24 Hours</item>
|
||||
</string-array>
|
||||
<string-array name="array_sync_interval_values">
|
||||
<item>5</item>
|
||||
<item>15</item>
|
||||
<item>30</item>
|
||||
<item>45</item>
|
||||
<item>60</item>
|
||||
<item>120</item>
|
||||
<item>180</item>
|
||||
<item>360</item>
|
||||
<item>720</item>
|
||||
<item>1440</item>
|
||||
</string-array>
|
||||
|
||||
<!--
|
||||
<string name="pref_title_sync_frequency">Sync frequency</string>
|
||||
|
@ -259,11 +248,8 @@
|
|||
</string-array>
|
||||
-->
|
||||
|
||||
<!--
|
||||
<string name="pref_title_system_sync_settings">System sync settings</string>
|
||||
-->
|
||||
|
||||
|
||||
<!-- <string name="pref_title_system_sync_settings">System sync settings</string> -->
|
||||
|
||||
<string name="pref_header_notifications">Notifications</string>
|
||||
<!--
|
||||
|
|
16
News-Android-App/src/main/res/xml/account_preferences.xml
Normal file
16
News-Android-App/src/main/res/xml/account_preferences.xml
Normal file
|
@ -0,0 +1,16 @@
|
|||
<PreferenceScreen
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<PreferenceCategory
|
||||
android:title="Sync Settings" />
|
||||
|
||||
<PreferenceScreen
|
||||
android:key="account_sync_interval"
|
||||
android:title="Sync Interval"
|
||||
android:summary="Set the sync interval">
|
||||
<intent
|
||||
android:action="de.luhmer.owncloudnewsreader.Preferences.SYNC_INTERVAL"
|
||||
android:targetPackage="de.luhmer.owncloudnewsreader"
|
||||
android:targetClass="de.luhmer.owncloudnewsreader.SyncIntervalSelectorActivity" />
|
||||
</PreferenceScreen>
|
||||
</PreferenceScreen>
|
|
@ -1,6 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<account-authenticator xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:accountType="de.luhmer.owncloudnewsreader"
|
||||
android:icon="@drawable/ic_launcher"
|
||||
android:smallIcon="@drawable/ic_launcher"
|
||||
android:label="@string/app_name"/>
|
||||
android:accountType="de.luhmer.owncloudnewsreader"
|
||||
android:icon="@drawable/ic_launcher"
|
||||
android:smallIcon="@drawable/ic_launcher"
|
||||
android:label="@string/app_name"
|
||||
android:accountPreferences="@xml/account_preferences" />
|
||||
|
|
|
@ -27,12 +27,6 @@ https://groups.google.com/d/forum/owncloud-news-android-app
|
|||
there you can find a link (after I accepted you in the group) to Google Play for registering as beta tester of the app.
|
||||
|
||||
|
||||
Language
|
||||
==================================
|
||||
Is your language not supported yet ?
|
||||
You can add your language easily on:
|
||||
https://www.transifex.com/projects/p/owncloud/resource/android-news/
|
||||
|
||||
|
||||
FAQ:
|
||||
==================================
|
||||
|
@ -72,6 +66,9 @@ Updates
|
|||
==================================
|
||||
0.5.7 (in development)
|
||||
---------------------
|
||||
- Bug fix - <a href="https://github.com/owncloud/News-Android-App/issues/213">#213 When using the dark theme websites with no background color are unreadable</a>
|
||||
- Improvement - <a href="https://github.com/owncloud/News-Android-App/issues/211">#211 Links within articles</a>
|
||||
- Improvement - <a href="https://github.com/owncloud/News-Android-App/issues/198">#198 enable auto sync configuration</a>
|
||||
|
||||
|
||||
0.5.6 (Google Play - Beta)
|
||||
|
|
|
@ -5,7 +5,7 @@ buildscript {
|
|||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:0.8.+'
|
||||
classpath 'com.android.tools.build:gradle:0.9.+'
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
## This file is automatically generated by Android Studio.
|
||||
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
|
||||
#
|
||||
# This file should *NOT* be checked into Version Control Systems,
|
||||
# This file must *NOT* be checked into Version Control Systems,
|
||||
# as it contains information specific to your local configuration.
|
||||
#
|
||||
# Location of the SDK. This is only used by Gradle.
|
||||
# For customization when using a Version Control System, please read the
|
||||
# header note.
|
||||
sdk.dir=/opt/android-studio/sdk
|
||||
#Wed Feb 26 20:33:26 CET 2014
|
||||
sdk.dir=C\:\\Program Files\\Android\\android-studio\\sdk
|
||||
|
|
|
@ -1,6 +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/
|
||||
git rm -r News-Android-App/src/main/res/values-ach/
|
||||
git rm -r News-Android-App/src/main/res/values-ady/
|
||||
git rm -r News-Android-App/src/main/res/values-en@pirate/
|
||||
git rm -r News-Android-App/src/main/res/values-nds/
|
||||
git rm -r News-Android-App/src/main/res/values-nqo/
|
||||
git rm -r News-Android-App/src/main/res/values-tzm/
|
||||
|
|
Loading…
Reference in a new issue