diff --git a/app/src/main/java/com/etesync/syncadapter/Constants.java b/app/src/main/java/com/etesync/syncadapter/Constants.java index 7b1c790b..32de59f2 100644 --- a/app/src/main/java/com/etesync/syncadapter/Constants.java +++ b/app/src/main/java/com/etesync/syncadapter/Constants.java @@ -34,6 +34,7 @@ public class Constants { public static final Uri dashboard = webUri.buildUpon().appendEncodedPath("dashboard/").build(); public static final Uri faqUri = webUri.buildUpon().appendEncodedPath("faq/").build(); public static final Uri helpUri = webUri.buildUpon().appendEncodedPath("user-guide/").build(); + public static final Uri forgotPassword = webUri.buildUpon().appendEncodedPath("accounts/password/reset/").build(); public static final Uri serviceUrl = Uri.parse((DEBUG_REMOTE_URL == null) ? "https://api.etesync.com/" : DEBUG_REMOTE_URL); diff --git a/app/src/main/java/com/etesync/syncadapter/ui/setup/LoginCredentialsFragment.java b/app/src/main/java/com/etesync/syncadapter/ui/setup/LoginCredentialsFragment.java index 974b5ea7..5002a2ca 100644 --- a/app/src/main/java/com/etesync/syncadapter/ui/setup/LoginCredentialsFragment.java +++ b/app/src/main/java/com/etesync/syncadapter/ui/setup/LoginCredentialsFragment.java @@ -18,6 +18,7 @@ import android.view.View; import android.view.ViewGroup; import android.widget.Button; import android.widget.EditText; +import android.widget.TextView; import com.etesync.syncadapter.Constants; import com.etesync.syncadapter.R; @@ -68,6 +69,14 @@ public class LoginCredentialsFragment extends Fragment { } }); + final TextView forgotPassword = (TextView) v.findViewById(R.id.forgot_password); + forgotPassword.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + WebViewActivity.openUrl(getContext(), Constants.forgotPassword); + } + }); + return v; } @@ -88,5 +97,4 @@ public class LoginCredentialsFragment extends Fragment { return valid ? new LoginCredentials(userName, password) : null; } - } diff --git a/app/src/main/res/layout/login_credentials_fragment.xml b/app/src/main/res/layout/login_credentials_fragment.xml index d1b57b1d..7face84e 100644 --- a/app/src/main/res/layout/login_credentials_fragment.xml +++ b/app/src/main/res/layout/login_credentials_fragment.xml @@ -45,7 +45,16 @@ android:id="@+id/url_password" android:layout_width="match_parent" android:layout_height="wrap_content" - android:hint="@string/login_password"/> + android:layout_marginBottom="7dp" + android:hint="@string/login_password" /> + + diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 8da760a3..614a7bfd 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -121,6 +121,7 @@ Secret Encryption Password Account: This is your login password, *not* your encryption password! + Forgot password? Configuration detection Please wait, querying server…