This GitLab instance reached the end of its service life. It won't be possible to create new users or projects.

Please read the deprecation notice for more information concerning the deprecation timeline

Visit migration.git.tu-berlin.de (internal network only) to import your old projects to the new GitLab platform 📥

Commit 8d863950 by Nico Suhl

finish app if login dialog is dismissed

parent 9b661d22
......@@ -3,6 +3,7 @@ package de.k4ever.k4android.fragments;
import android.app.DialogFragment;
import android.app.FragmentTransaction;
import android.app.ProgressDialog;
import android.content.DialogInterface;
import android.content.SharedPreferences.Editor;
import android.os.Bundle;
import android.preference.PreferenceManager;
......@@ -50,7 +51,7 @@ public class LoginFragment extends DialogFragment implements OnEditorActionListe
mPassword.setText(PreferenceManager.getDefaultSharedPreferences(
getActivity()).getString("pref_password", ""));
// Watch for button clicks.
// Watch for button clicks
Button button = (Button)v.findViewById(R.id.login);
button.setOnClickListener(new OnClickListener() {
public void onClick(View v) {
......@@ -71,6 +72,11 @@ public class LoginFragment extends DialogFragment implements OnEditorActionListe
return false;
}
@Override
public void onCancel (DialogInterface dialog) {
getActivity().finish();
}
private void login() {
if (mServerURL.getText().toString().length() == 0 ) {
mServerURL.setError(getText(R.string.error_no_input));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment