summaryrefslogtreecommitdiff
path: root/app/src/main/java/se/leap/bitmaskclient/SignupActivity.java
blob: 0ff792bbc52e13e06561e752649397d91a31485f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
package se.leap.bitmaskclient;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.View;

import butterknife.OnClick;

import static android.view.View.VISIBLE;

/**
 * Create an account with a provider
 */

public class SignupActivity extends ProviderCredentialsBaseActivity {

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        setProviderHeaderLogo(R.drawable.mask);
        setProviderHeaderText(R.string.create_profile);

        setProgressbarText(R.string.signing_up);
        setButtonText(R.string.signup_button);

        passwordVerificationField.setVisibility(VISIBLE);
        passwordVerificationError.setVisibility(VISIBLE);
    }

    @Override
    @OnClick(R.id.button)
    void handleButton() {
        super.handleButton();
        if (getPassword().equals(getPasswordVerification())) {
            signUp(getUsername(), getPassword());
        }
    }
}