diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index c8872b9f..f92d8389 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -9,7 +9,7 @@
{
protected Builder buildEntry(Builder builder, Resource resource, boolean update) {
final Event event = (Event)resource;
- if (!update)
- builder .withValue(Events.ACCOUNT_TYPE, account.type)
- .withValue(Events.ACCOUNT_NAME, account.name);
-
builder .withValue(Events.CALENDAR_ID, id)
.withValue(Events.ALL_DAY, event.isAllDay() ? 1 : 0)
.withValue(Events.DTSTART, event.getDtStartInMillis())
diff --git a/app/src/main/java/at/bitfire/davdroid/ui/setup/InstallAppsFragment.java b/app/src/main/java/at/bitfire/davdroid/ui/setup/InstallAppsFragment.java
index 334acfce..a5beaa41 100644
--- a/app/src/main/java/at/bitfire/davdroid/ui/setup/InstallAppsFragment.java
+++ b/app/src/main/java/at/bitfire/davdroid/ui/setup/InstallAppsFragment.java
@@ -19,6 +19,8 @@ import android.graphics.drawable.Drawable;
import android.net.Uri;
import android.os.Bundle;
import android.os.Handler;
+import android.text.Html;
+import android.text.method.LinkMovementMethod;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.Menu;
@@ -28,19 +30,23 @@ import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
+import at.bitfire.davdroid.Constants;
import at.bitfire.davdroid.R;
import at.bitfire.davdroid.resource.LocalTaskList;
-public class InstallAppsFragment extends Fragment implements Runnable {
+public class InstallAppsFragment extends Fragment {
private static final String TAG = "davdroid.setup";
- final protected Handler timerHandler = new Handler();
-
+ // https://code.google.com/p/android/issues/detail?id=25906
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View v = inflater.inflate(R.layout.setup_install_apps, container, false);
setHasOptionsMenu(true);
+ TextView tvInfo = (TextView)v.findViewById(R.id.setup_install_tasks_app);
+ tvInfo.setText(Html.fromHtml(getString(R.string.setup_install_tasks_app_html)));
+ tvInfo.setMovementMethod(LinkMovementMethod.getInstance());
+
return v;
}
@@ -49,23 +55,11 @@ public class InstallAppsFragment extends Fragment implements Runnable {
inflater.inflate(R.menu.only_skip, menu);
}
- @Override
- public void onResume() {
- super.onResume();
- timerHandler.postDelayed(this, 1000);
- }
-
- @Override
- public void onPause() {
- super.onPause();
- timerHandler.removeCallbacks(this);
- }
-
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case R.id.skip:
- skip(true);
+ skip();
break;
default:
return false;
@@ -73,20 +67,9 @@ public class InstallAppsFragment extends Fragment implements Runnable {
return true;
}
- @Override
- public void run() {
- if (LocalTaskList.isAvailable(getActivity()))
- skip(false);
- else
- timerHandler.postDelayed(this, 1000);
- }
-
- protected void skip(boolean addToBackStack) {
+ protected void skip() {
FragmentManager fm = getFragmentManager();
- if (!addToBackStack)
- fm.popBackStack();
-
getFragmentManager().beginTransaction()
.replace(R.id.right_pane, new SelectCollectionsFragment())
.addToBackStack(null)
diff --git a/app/src/main/java/at/bitfire/davdroid/ui/setup/SelectCollectionsAdapter.java b/app/src/main/java/at/bitfire/davdroid/ui/setup/SelectCollectionsAdapter.java
index cc5bda91..0bb90a2a 100644
--- a/app/src/main/java/at/bitfire/davdroid/ui/setup/SelectCollectionsAdapter.java
+++ b/app/src/main/java/at/bitfire/davdroid/ui/setup/SelectCollectionsAdapter.java
@@ -56,11 +56,11 @@ public class SelectCollectionsAdapter extends BaseAdapter implements ListAdapter
this.context = context;
this.serverInfo = serverInfo;
- nAddressBooks = serverInfo.getAddressBooks() == null ? 0 : serverInfo.getAddressBooks().size();
+ nAddressBooks = serverInfo.getAddressBooks().size();
nAddressBookHeadings = nAddressBooks == 0 ? 0 : 1;
- nCalendars = serverInfo.getCalendars() == null ? 0 : serverInfo.getCalendars().size();
+ nCalendars = serverInfo.getCalendars().size();
nCalendarHeadings = nCalendars == 0 ? 0 : 1;
- nTaskLists = serverInfo.getTodoLists() == null ? 0 : serverInfo.getTodoLists().size();
+ nTaskLists = serverInfo.getTodoLists().size();
nTaskListHeadings = nTaskLists == 0 ? 0 : 1;
}
@@ -83,7 +83,7 @@ public class SelectCollectionsAdapter extends BaseAdapter implements ListAdapter
return serverInfo.getCalendars().get(position - (nAddressBookHeadings + nAddressBooks + nCalendarHeadings));
else if (position >= (nAddressBookHeadings + nAddressBooks + nCalendarHeadings + nCalendars + nTaskListHeadings) &&
- (position < (nAddressBookHeadings + nAddressBooks + nCalendarHeadings + nCalendars + + nTaskListHeadings + nTaskLists)))
+ (position < (nAddressBookHeadings + nAddressBooks + nCalendarHeadings + nCalendars + nTaskListHeadings + nTaskLists)))
return serverInfo.getTodoLists().get(position - (nAddressBookHeadings + nAddressBooks + nCalendarHeadings + nCalendars + nTaskListHeadings));
return null;
diff --git a/app/src/main/res/layout/setup_install_apps.xml b/app/src/main/res/layout/setup_install_apps.xml
index 4189256d..90d10bf8 100644
--- a/app/src/main/res/layout/setup_install_apps.xml
+++ b/app/src/main/res/layout/setup_install_apps.xml
@@ -30,16 +30,10 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="10dp"
- android:text="@string/setup_install_tasks_app_info"
+ android:id="@+id/setup_install_tasks_app"
+ android:text="@string/setup_install_tasks_app_html"
android:textAppearance="?android:attr/textAppearanceMedium" />
-
-
\ No newline at end of file
diff --git a/app/src/main/res/layout-sw720dp/setup_task_lists_heading.xml b/app/src/main/res/layout/setup_task_lists_heading.xml
similarity index 100%
rename from app/src/main/res/layout-sw720dp/setup_task_lists_heading.xml
rename to app/src/main/res/layout/setup_task_lists_heading.xml
diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml
index a54d0ec5..62c37d1e 100644
--- a/app/src/main/res/values-de/strings.xml
+++ b/app/src/main/res/values-de/strings.xml
@@ -149,8 +149,16 @@
Konto hinzufügenDaten werden vom Server abgefragt. Bitte warten…Android bietet im Gegensatz zu Kontakten und Terminen keine integrierte Lösung für Aufgaben.
- DAVdroid kann mit der "Aufgaben"-App von Marten Gajda synchronisieren. Sie können diese App installieren, um Aufgaben zu synchronisieren, oder auf Aufgaben verzichten und die Installation überspringen.
- Aufgaben-App installieren
+ DAVdroid kann Aufgaben mit der Aufgaben-App von Marten Gajda synchronisieren.
+
Wegen eines Android-Fehlersmuss die Aufgaben-App
+ vor DAVdroid installiert werden (ansonsten bekommt DAVdroid nicht die Berechtigungen, um auf die Aufgaben zuzugreifen).
+
Wenn Sie Aufgaben synchronisiert haben wollen:
+
1. Installieren Sie bitte zuerst die Aufgaben-App.
+ 2. Installieren Sie DAVdroid neu (um die Zugriffsberechtigung zu erlangen).
+ 3. Richten Sie Ihr DAVdroid-Konto neu ein.
+
Andernfalls können Sie diesen Schritt überspringen.
+ ]]>
Welche Ordner sollen synchronisiert werden?AdressbücherKalender
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 0969b3f4..1087e767 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -163,8 +163,16 @@
Add accountQuerying server. Please wait…Plain Android doesn\'t support to-do lists (in contrast to contacts and calendars).
- DAVdroid is able to synchronize tasks with the "Tasks" app (by Marten Gajda). You may install this app if you want tasks to be synchronized or skip the installation.
- Install Tasks app
+ DAVdroid is able to synchronize tasks with the Tasks app (by Marten Gajda).
+
Because of an Android bug, the Tasks app must be installed
+ before installing DAVdroid (otherwise, DAVdroid can\'t get the permission to access the tasks provider).
+
If you want tasks to be synchronized:
+
1. Install the Tasks app.
+ 2. Re-install DAVdroid (to gain tasks access permission).
+ 3. Add your DAVdroid account again.