Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
Willy Enns committed Feb 28, 2015
2 parents d359569 + 6a36f5f commit 0ff43fe
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 23 deletions.
6 changes: 3 additions & 3 deletions ACalDAV/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="de.we.acaldav"
android:versionCode="002"
android:versionName="0.0.2">
android:versionCode="004"
android:versionName="0.0.4">

<uses-sdk
android:minSdkVersion="14"
Expand Down Expand Up @@ -46,7 +46,7 @@
<activity
android:name="org.gege.caldavsyncadapter.authenticator.AuthenticatorActivity"
android:label="@string/title_activity_authenticator"
android:windowSoftInputMode="adjustResize|stateVisible"></activity>
android:windowSoftInputMode="adjustResize|stateVisible"/>
</application>

</manifest>
4 changes: 2 additions & 2 deletions ACalDAV/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ apply plugin: 'com.android.application'
apply from: '../config/quality/quality.gradle'

android {
compileSdkVersion 20
buildToolsVersion '20'
compileSdkVersion 19
buildToolsVersion '19.1.0'

sourceSets {
main {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,9 +180,12 @@ public boolean onEditorAction(TextView textView, int id,
@Override
public void onTextChanged(CharSequence s, int start, int before, int count) {
String url = ((EditText) findViewById(R.id.url)).getText().toString();
int visible = url.toLowerCase(Locale.getDefault())
.startsWith("https") ? View.VISIBLE : View.GONE;
(findViewById(R.id.trustall)).setVisibility(visible);
if (url.toLowerCase(Locale.getDefault())
.startsWith("https")) {
(findViewById(R.id.trustall)).setVisibility(View.VISIBLE);
} else {
(findViewById(R.id.trustall)).setVisibility(View.GONE);
}
}

@Override
Expand Down Expand Up @@ -275,7 +278,14 @@ public void attemptLogin() {
mURL = mURLText.getText().toString();
mAccountname = mAccountnameText.getText().toString();
mUpdateInterval = mUpdateIntervalView.getText().toString();
mTrustAll = (mTrustCheckBox.isChecked() ? "false" : "true");

if (mTrustCheckBox.isChecked()) {
mTrustAll = "false";
} else {
mTrustAll = "true";
}


boolean cancel = false;
View focusView = null;

Expand Down Expand Up @@ -303,24 +313,17 @@ public void attemptLogin() {
focusView = mUserView;
cancel = true;
}
//else if (!mUser.contains("@")) {
// mUserView.setError(getString(R.string.error_invalid_email));
// focusView = mUserView;
// cancel = true;
//}


if (TextUtils.isEmpty(mUpdateInterval)) {
mUpdateIntervalView.setError(getString(R.string.error_field_required));
mUpdateInterval = "30";
}
try {
Integer.parseInt(mUpdateInterval);
} catch (Exception e) {
mUpdateIntervalView.setError(getString(R.string.error_invalid_number));
focusView = mUpdateIntervalView;
cancel = true;
} else {
try {
Integer.parseInt(mUpdateInterval);
} catch (Exception e) {
mUpdateIntervalView.setError(getString(R.string.error_invalid_number));
focusView = mUpdateIntervalView;
cancel = true;
}
}

if (cancel) {
Expand Down

0 comments on commit 0ff43fe

Please sign in to comment.