Minor changes
* new icons with 3D effect as required in Android Iconography Guide * target SDK version updated to 20 * replaced UI directions left/right by start/end for RTL support * Show "unnamed calendar"/"unnamed address book" instead of "null" in "Select collections" fragment * "Add account" button now directly adds DAVdroid account * .svgz for "How DAVdroid interacts with other components" added to doc
@ -6,7 +6,7 @@
|
||||
|
||||
<uses-sdk
|
||||
android:minSdkVersion="14"
|
||||
android:targetSdkVersion="19" />
|
||||
android:targetSdkVersion="20" />
|
||||
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
<uses-permission android:name="android.permission.AUTHENTICATE_ACCOUNTS" />
|
||||
|
BIN
doc/how_davdroid_works.svgz
Normal file
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 5.2 KiB |
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 3.2 KiB |
Before Width: | Height: | Size: 7.1 KiB After Width: | Height: | Size: 7.6 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
@ -14,13 +14,13 @@
|
||||
|
||||
<TextView
|
||||
android:layout_columnSpan="2"
|
||||
android:layout_gravity="left"
|
||||
android:layout_gravity="start"
|
||||
android:layout_marginBottom="20dp"
|
||||
android:text="@string/setup_account_details"
|
||||
android:textAppearance="?android:attr/textAppearanceLarge" />
|
||||
|
||||
<TextView
|
||||
android:layout_gravity="left"
|
||||
android:layout_gravity="start"
|
||||
android:text="@string/setup_account_name"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium" />
|
||||
|
||||
@ -28,21 +28,24 @@
|
||||
android:id="@+id/account_name"
|
||||
android:layout_gravity="fill_horizontal"
|
||||
android:hint="@string/setup_account_name_hint"
|
||||
android:inputType="textEmailAddress" />
|
||||
android:inputType="textEmailAddress">
|
||||
<requestFocus />
|
||||
</EditText>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/account_name_info"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_columnSpan="2"
|
||||
android:layout_gravity="left"
|
||||
android:layout_gravity="start"
|
||||
android:drawableLeft="@drawable/extra_actions_about"
|
||||
android:drawableStart="@drawable/extra_actions_about"
|
||||
android:drawablePadding="10dp"
|
||||
android:padding="10dp"
|
||||
android:text="@string/setup_account_name_info"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium" />
|
||||
|
||||
<Space
|
||||
android:layout_gravity="left|top"
|
||||
android:layout_gravity="start|top"
|
||||
android:layout_row="3" />
|
||||
|
||||
</GridLayout>
|
||||
|
@ -13,7 +13,7 @@
|
||||
|
||||
<TextView
|
||||
android:layout_columnSpan="2"
|
||||
android:layout_gravity="left"
|
||||
android:layout_gravity="start"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:text="@string/login_email_description" />
|
||||
|
||||
|
@ -13,14 +13,14 @@
|
||||
|
||||
<TextView
|
||||
android:layout_columnSpan="2"
|
||||
android:layout_gravity="left"
|
||||
android:layout_gravity="start"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:text="@string/login_base_url" />
|
||||
|
||||
<Spinner
|
||||
android:id="@+id/login_scheme"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_gravity="left"
|
||||
android:layout_gravity="start"
|
||||
android:entries="@array/login_url_scheme" />
|
||||
|
||||
<EditText
|
||||
@ -40,8 +40,9 @@
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_columnSpan="2"
|
||||
android:layout_gravity="left"
|
||||
android:layout_gravity="start"
|
||||
android:drawableLeft="@drawable/alerts_and_states_warning"
|
||||
android:drawableStart="@drawable/alerts_and_states_warning"
|
||||
android:drawablePadding="10dp"
|
||||
android:padding="10dp"
|
||||
android:text="@string/login_http_warning" />
|
||||
@ -78,10 +79,10 @@
|
||||
android:id="@+id/auth_preemptive"
|
||||
android:layout_columnSpan="2"
|
||||
android:checked="true"
|
||||
android:layout_gravity="left"
|
||||
android:layout_gravity="start"
|
||||
android:text="@string/login_auth_preemptive" />
|
||||
|
||||
<Space android:layout_gravity="left|top" />
|
||||
<Space android:layout_gravity="start|top" />
|
||||
|
||||
</GridLayout>
|
||||
|
||||
|
@ -3,6 +3,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:orientation="horizontal"
|
||||
android:padding="20dp" >
|
||||
|
||||
@ -10,7 +11,8 @@
|
||||
style="?android:attr/progressBarStyleLarge"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginRight="10dp" />
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginEnd="10dp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
|
@ -108,7 +108,9 @@
|
||||
<string name="setup_querying_server">Daten werden vom Server abgefragt. Bitte warten…</string>
|
||||
<string name="setup_what_to_sync">Welche Ordner sollen synchronisiert werden?</string>
|
||||
<string name="setup_address_books">Adressbücher</string>
|
||||
<string name="setup_address_book">Adressbuch</string>
|
||||
<string name="setup_calendars">Kalender</string>
|
||||
<string name="setup_calendar">Kalender</string>
|
||||
<string name="setup_select_address_book">Ein oder kein Adressbuch auswählen (nochmal berühren, um abzuwählen):</string>
|
||||
<string name="setup_select_calendars">Kalender zur Synchronisation auswählen:</string>
|
||||
|
||||
|
@ -112,7 +112,9 @@
|
||||
<string name="setup_querying_server">Querying server. Please wait…</string>
|
||||
<string name="setup_what_to_sync">Which collections shall be synchronized?</string>
|
||||
<string name="setup_address_books">Address books</string>
|
||||
<string name="setup_address_book">Address book</string>
|
||||
<string name="setup_calendars">Calendars</string>
|
||||
<string name="setup_calendar">Calendar</string>
|
||||
<string name="setup_select_address_book">Select up to one address book (tap again to unselect):</string>
|
||||
<string name="setup_select_calendars">Select your calendars:</string>
|
||||
|
||||
|
@ -19,6 +19,7 @@ import android.view.MenuInflater;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.widget.TextView;
|
||||
import at.bitfire.davdroid.syncadapter.AddAccountActivity;
|
||||
import at.bitfire.davdroid.syncadapter.GeneralSettingsActivity;
|
||||
|
||||
public class MainActivity extends Activity {
|
||||
@ -50,7 +51,7 @@ public class MainActivity extends Activity {
|
||||
|
||||
|
||||
public void addAccount(MenuItem item) {
|
||||
Intent intent = new Intent(Settings.ACTION_ADD_ACCOUNT);
|
||||
Intent intent = new Intent(this, AddAccountActivity.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
|
||||
|
@ -44,22 +44,6 @@ public class URLUtils {
|
||||
return href;
|
||||
}
|
||||
|
||||
/*public static URI ensureTrailingSlash(URI href) {
|
||||
if (!href.getPath().endsWith("/"))
|
||||
try {
|
||||
URI newURI = new URI(href.getScheme(), href.getAuthority(), href.getPath() + "/", href.getQuery(), null);
|
||||
|
||||
// "@" is the only character that is not encoded
|
||||
newURI = new URI(newURI.toString().replaceAll("@", "%40"));
|
||||
|
||||
Log.d(TAG, "Implicitly appending trailing slash to collection " + href + " -> " + newURI);
|
||||
return newURI;
|
||||
} catch (URISyntaxException e) {
|
||||
Log.e(TAG, "Couldn't append trailing slash to collection URI", e);
|
||||
}
|
||||
return href;
|
||||
}*/
|
||||
|
||||
|
||||
/** handles invalid URLs/paths as good as possible **/
|
||||
public static String sanitize(String original) {
|
||||
|
@ -50,7 +50,7 @@ public class ServerInfo implements Serializable {
|
||||
public static class ResourceInfo implements Serializable {
|
||||
private static final long serialVersionUID = -5516934508229552112L;
|
||||
|
||||
enum Type {
|
||||
public enum Type {
|
||||
ADDRESS_BOOK,
|
||||
CALENDAR
|
||||
}
|
||||
|
@ -54,8 +54,7 @@ public class AccountAuthenticatorService extends Service {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Bundle confirmCredentials(AccountAuthenticatorResponse response, Account account, Bundle options)
|
||||
throws NetworkErrorException {
|
||||
public Bundle confirmCredentials(AccountAuthenticatorResponse response, Account account, Bundle options) throws NetworkErrorException {
|
||||
return null;
|
||||
}
|
||||
|
||||
@ -65,8 +64,7 @@ public class AccountAuthenticatorService extends Service {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Bundle getAuthToken(AccountAuthenticatorResponse response, Account account, String authTokenType, Bundle options)
|
||||
throws NetworkErrorException {
|
||||
public Bundle getAuthToken(AccountAuthenticatorResponse response, Account account, String authTokenType, Bundle options) throws NetworkErrorException {
|
||||
return null;
|
||||
}
|
||||
|
||||
@ -76,14 +74,12 @@ public class AccountAuthenticatorService extends Service {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Bundle hasFeatures(AccountAuthenticatorResponse response, Account account, String[] features)
|
||||
throws NetworkErrorException {
|
||||
public Bundle hasFeatures(AccountAuthenticatorResponse response, Account account, String[] features) throws NetworkErrorException {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Bundle updateCredentials(AccountAuthenticatorResponse response, Account account, String authTokenType,
|
||||
Bundle options) throws NetworkErrorException {
|
||||
public Bundle updateCredentials(AccountAuthenticatorResponse response, Account account, String authTokenType, Bundle options) throws NetworkErrorException {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
@ -47,6 +47,7 @@ public class AccountDetailsFragment extends Fragment implements TextWatcher {
|
||||
|
||||
editAccountName = (EditText)v.findViewById(R.id.account_name);
|
||||
editAccountName.addTextChangedListener(this);
|
||||
editAccountName.setText(serverInfo.getUserName());
|
||||
|
||||
TextView textAccountNameInfo = (TextView)v.findViewById(R.id.account_name_info);
|
||||
if (!serverInfo.hasEnabledCalendars())
|
||||
|
@ -18,6 +18,7 @@ import android.widget.CheckedTextView;
|
||||
import android.widget.ListAdapter;
|
||||
import at.bitfire.davdroid.R;
|
||||
import at.bitfire.davdroid.resource.ServerInfo;
|
||||
import at.bitfire.davdroid.resource.ServerInfo.ResourceInfo.Type;
|
||||
|
||||
public class SelectCollectionsAdapter extends BaseAdapter implements ListAdapter {
|
||||
final static int TYPE_ADDRESS_BOOKS_HEADING = 0,
|
||||
@ -126,7 +127,11 @@ public class SelectCollectionsAdapter extends BaseAdapter implements ListAdapter
|
||||
view.setCompoundDrawablePadding(10);
|
||||
|
||||
// set text
|
||||
String title = "<b>" + info.getTitle() + "</b>";
|
||||
String title = info.getTitle();
|
||||
if (title == null) // unnamed collection
|
||||
title = context.getString((info.getType() == Type.ADDRESS_BOOK) ?
|
||||
R.string.setup_address_book : R.string.setup_calendar);
|
||||
title = "<b>" + title + "</b>";
|
||||
if (info.isReadOnly())
|
||||
title = title + " (" + context.getString(R.string.setup_read_only) + ")";
|
||||
|
||||
|