Add recover password in assistant
This commit is contained in:
parent
a01a6a60f8
commit
516b37bc8d
3 changed files with 18 additions and 1 deletions
|
@ -68,11 +68,18 @@
|
||||||
android:layout_height="40dp"
|
android:layout_height="40dp"
|
||||||
android:singleLine="true"/>
|
android:singleLine="true"/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/forgot_password"
|
||||||
|
android:layout_gravity="right"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:singleLine="true"/>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:text="@string/assistant_display_name_optional"
|
android:text="@string/assistant_display_name_optional"
|
||||||
style="@style/font13"
|
style="@style/font13"
|
||||||
android:textAllCaps="true"
|
android:textAllCaps="true"
|
||||||
android:paddingTop="20dp"
|
android:paddingTop="15dp"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"/>
|
android:layout_height="wrap_content"/>
|
||||||
|
|
||||||
|
|
|
@ -87,6 +87,7 @@
|
||||||
<string name="wizard_passwords_unmatched">Passwords do not match.</string>
|
<string name="wizard_passwords_unmatched">Passwords do not match.</string>
|
||||||
<string name="setup_confirm_username">Your username will be %s.\r\n\r\nIt may differ from your input to match requirements.\r\nDo you accept?</string>
|
<string name="setup_confirm_username">Your username will be %s.\r\n\r\nIt may differ from your input to match requirements.\r\nDo you accept?</string>
|
||||||
<string name="first_launch_no_login_password">Please enter your login and password</string>
|
<string name="first_launch_no_login_password">Please enter your login and password</string>
|
||||||
|
<string name="forgot_password">Forgot password ?</string>
|
||||||
|
|
||||||
<!-- Dailer -->
|
<!-- Dailer -->
|
||||||
<string name="address_bar_hint">Enter a number or an address</string>
|
<string name="address_bar_hint">Enter a number or an address</string>
|
||||||
|
|
|
@ -22,13 +22,16 @@ import org.linphone.R;
|
||||||
import android.app.Fragment;
|
import android.app.Fragment;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.text.Editable;
|
import android.text.Editable;
|
||||||
|
import android.text.Html;
|
||||||
import android.text.TextWatcher;
|
import android.text.TextWatcher;
|
||||||
|
import android.text.method.LinkMovementMethod;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.View.OnClickListener;
|
import android.view.View.OnClickListener;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.widget.Button;
|
import android.widget.Button;
|
||||||
import android.widget.EditText;
|
import android.widget.EditText;
|
||||||
|
import android.widget.TextView;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
/**
|
/**
|
||||||
* @author Sylvain Berfini
|
* @author Sylvain Berfini
|
||||||
|
@ -36,16 +39,22 @@ import android.widget.Toast;
|
||||||
public class LinphoneLoginFragment extends Fragment implements OnClickListener, TextWatcher {
|
public class LinphoneLoginFragment extends Fragment implements OnClickListener, TextWatcher {
|
||||||
private EditText login, password, displayName;
|
private EditText login, password, displayName;
|
||||||
private Button apply;
|
private Button apply;
|
||||||
|
private TextView forgotPassword;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||||
Bundle savedInstanceState) {
|
Bundle savedInstanceState) {
|
||||||
View view = inflater.inflate(R.layout.assistant_linphone_login, container, false);
|
View view = inflater.inflate(R.layout.assistant_linphone_login, container, false);
|
||||||
|
|
||||||
|
String url = "http://linphone.org/free-sip-service.html&action=recover";
|
||||||
|
|
||||||
login = (EditText) view.findViewById(R.id.assistant_username);
|
login = (EditText) view.findViewById(R.id.assistant_username);
|
||||||
login.addTextChangedListener(this);
|
login.addTextChangedListener(this);
|
||||||
password = (EditText) view.findViewById(R.id.assistant_password);
|
password = (EditText) view.findViewById(R.id.assistant_password);
|
||||||
password.addTextChangedListener(this);
|
password.addTextChangedListener(this);
|
||||||
|
forgotPassword = (TextView) view.findViewById(R.id.forgot_password);
|
||||||
|
forgotPassword.setText(Html.fromHtml("<a href=\"" + url + "\"'>"+ getString(R.string.forgot_password) + "</a>"));
|
||||||
|
forgotPassword.setMovementMethod(LinkMovementMethod.getInstance());
|
||||||
displayName = (EditText) view.findViewById(R.id.assistant_display_name);
|
displayName = (EditText) view.findViewById(R.id.assistant_display_name);
|
||||||
apply = (Button) view.findViewById(R.id.assistant_apply);
|
apply = (Button) view.findViewById(R.id.assistant_apply);
|
||||||
apply.setEnabled(false);
|
apply.setEnabled(false);
|
||||||
|
|
Loading…
Reference in a new issue