Reworking assistant, add transport in login and fix error display
This commit is contained in:
parent
06f981e538
commit
8f26fe7a23
24 changed files with 745 additions and 626 deletions
|
@ -2,6 +2,8 @@
|
|||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_pressed="true"
|
||||
android:drawable="@drawable/resizable_assistant_button_over" />
|
||||
<item android:state_enabled="false"
|
||||
android:drawable="@drawable/resizable_cancel_button" />
|
||||
<item
|
||||
android:drawable="@drawable/resizable_assistant_button" />
|
||||
</selector>
|
||||
|
|
7
res/drawable/assistant_button_text_color.xml
Normal file
7
res/drawable/assistant_button_text_color.xml
Normal file
|
@ -0,0 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_enabled="true"
|
||||
android:color="@color/colorB"/>
|
||||
<item
|
||||
android:color="@color/colorE"/>
|
||||
</selector>
|
|
@ -5,7 +5,7 @@
|
|||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:text="@string/assistant_linphone_account_title"
|
||||
android:text="@string/assistant_linphone_account"
|
||||
android:contentDescription="@string/content_description_welcome"
|
||||
style="@style/font6"
|
||||
android:textAllCaps="true"
|
||||
|
@ -78,7 +78,7 @@
|
|||
android:gravity="center">
|
||||
|
||||
<TextView
|
||||
android:text="@string/assistant_display_name"
|
||||
android:text="@string/assistant_display_name_optional"
|
||||
style="@style/font13"
|
||||
android:textAllCaps="true"
|
||||
android:layout_marginLeft="5dp"
|
||||
|
|
|
@ -10,16 +10,15 @@
|
|||
android:id="@+id/status"
|
||||
android:name="org.linphone.StatusFragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="35dp"
|
||||
tools:layout="@layout/status" />
|
||||
android:layout_height="40dp"
|
||||
tools:layout="@layout/status"/>
|
||||
|
||||
<include layout="@layout/assistant_topbar" android:id="@+id/topbar" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/fragmentContainer"
|
||||
android:id="@+id/fragment_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:padding="20dp"
|
||||
android:orientation="horizontal" />
|
||||
|
||||
</LinearLayout>
|
||||
|
|
|
@ -1,186 +1,187 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical" >
|
||||
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<TextView
|
||||
android:text="@string/assistant_create_account_title"
|
||||
style="@style/font6"
|
||||
android:textAllCaps="true"
|
||||
android:contentDescription="@string/content_description_welcome"
|
||||
android:paddingTop="20dp"
|
||||
android:layout_width="wrap_content"
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:gravity="center_horizontal"/>
|
||||
android:padding="30dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:text="@string/assistant_create_account_part_1"
|
||||
style="@style/font11"
|
||||
android:layout_gravity="center"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingRight="10dp"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/username_label"
|
||||
android:text="@string/username"
|
||||
style="@style/font13"
|
||||
android:textAllCaps="true"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/username"
|
||||
android:background="@drawable/resizable_textfield"
|
||||
android:textColor="@color/colorB"
|
||||
android:inputType="text|textEmailAddress"
|
||||
android:textCursorDrawable="@null"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingRight="10dp"
|
||||
android:singleLine="true"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/username_error"
|
||||
android:text="@string/error"
|
||||
style="@style/font20"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="invisible"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/password_label"
|
||||
style="@style/font13"
|
||||
android:text="@string/password"
|
||||
android:textAllCaps="true"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/password"
|
||||
android:background="@drawable/resizable_textfield"
|
||||
android:textColor="@color/colorB"
|
||||
android:inputType="textPassword"
|
||||
android:textCursorDrawable="@null"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingRight="10dp"
|
||||
android:singleLine="true"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/password_error"
|
||||
android:text="@string/error"
|
||||
style="@style/font20"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="invisible"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/confirm_password_label"
|
||||
android:text="@string/confirm_password"
|
||||
style="@style/font13"
|
||||
android:textAllCaps="true"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/confirm_password"
|
||||
android:background="@drawable/resizable_textfield"
|
||||
android:textColor="@color/colorB"
|
||||
android:inputType="textPassword"
|
||||
android:textCursorDrawable="@null"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingRight="10dp"
|
||||
android:singleLine="true"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/confirm_password_error"
|
||||
android:text="@string/error"
|
||||
style="@style/font20"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="invisible"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/email_label"
|
||||
android:text="@string/email"
|
||||
style="@style/font13"
|
||||
android:textAllCaps="true"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/email"
|
||||
android:background="@drawable/resizable_textfield"
|
||||
android:textColor="@color/colorB"
|
||||
android:inputType="text|textEmailAddress"
|
||||
android:textCursorDrawable="@null"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingRight="10dp"
|
||||
android:singleLine="true"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/email_error"
|
||||
android:text="@string/error"
|
||||
style="@style/font20"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="invisible"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<Button
|
||||
android:id="@+id/assistant_create"
|
||||
android:text="@string/assistant_create"
|
||||
android:background="@drawable/assistant_button"
|
||||
style="@style/font8"
|
||||
android:contentDescription="@string/content_description_validate"
|
||||
<TextView
|
||||
android:text="@string/assistant_create_account"
|
||||
style="@style/font6"
|
||||
android:textAllCaps="true"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="5dp"
|
||||
android:layout_centerVertical="true"/>
|
||||
android:layout_gravity="center"/>
|
||||
|
||||
<TextView
|
||||
android:text="@string/assistant_create_account_part_1"
|
||||
style="@style/font11"
|
||||
android:paddingTop="10dp"
|
||||
android:layout_gravity="center"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:layout_marginTop="30dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/username_label"
|
||||
android:text="@string/username"
|
||||
style="@style/font13"
|
||||
android:textAllCaps="true"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/username"
|
||||
android:background="@drawable/resizable_textfield"
|
||||
android:textColor="@color/colorB"
|
||||
android:inputType="text|textEmailAddress"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:singleLine="true"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/username_error"
|
||||
android:text="@string/error"
|
||||
style="@style/font20"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="invisible"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/password_label"
|
||||
style="@style/font13"
|
||||
android:text="@string/password"
|
||||
android:textAllCaps="true"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/password"
|
||||
android:background="@drawable/resizable_textfield"
|
||||
android:textColor="@color/colorB"
|
||||
android:inputType="textPassword"
|
||||
android:textCursorDrawable="@null"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingRight="10dp"
|
||||
android:singleLine="true"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/password_error"
|
||||
android:text="@string/error"
|
||||
style="@style/font20"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="invisible"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/confirm_password_label"
|
||||
android:text="@string/confirm_password"
|
||||
style="@style/font13"
|
||||
android:textAllCaps="true"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/confirm_password"
|
||||
android:background="@drawable/resizable_textfield"
|
||||
android:textColor="@color/colorB"
|
||||
android:inputType="textPassword"
|
||||
android:textCursorDrawable="@null"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingRight="10dp"
|
||||
android:singleLine="true"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/confirm_password_error"
|
||||
android:text="@string/error"
|
||||
style="@style/font20"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="invisible"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/email_label"
|
||||
android:text="@string/email"
|
||||
style="@style/font13"
|
||||
android:textAllCaps="true"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/email"
|
||||
android:background="@drawable/resizable_textfield"
|
||||
android:textColor="@color/colorB"
|
||||
android:inputType="text|textEmailAddress"
|
||||
android:textCursorDrawable="@null"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingRight="10dp"
|
||||
android:singleLine="true"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/email_error"
|
||||
android:text="@string/error"
|
||||
style="@style/font20"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="invisible"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<Button
|
||||
android:id="@+id/assistant_create"
|
||||
android:text="@string/assistant_create_account"
|
||||
android:background="@drawable/assistant_button"
|
||||
android:textColor="@drawable/assistant_button_text_color"
|
||||
style="@style/font8"
|
||||
android:contentDescription="@string/content_description_validate"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="40dp"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingRight="10dp"
|
||||
android:layout_marginTop="20dp"/>
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
|
@ -2,39 +2,42 @@
|
|||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center_horizontal"
|
||||
android:padding="30dp"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical" >
|
||||
|
||||
<TextView
|
||||
android:text="@string/assistant_create_account"
|
||||
android:contentDescription="@string/content_description_welcome"
|
||||
style="@style/font6"
|
||||
android:textAllCaps="true"
|
||||
android:paddingTop="20dp"
|
||||
android:layout_gravity="center"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal"/>
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<TextView
|
||||
android:text="@string/assistant_create_account_part_2"
|
||||
style="@style/font11"
|
||||
android:paddingTop="10dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<TextView
|
||||
android:text="@string/assistant_validate_account"
|
||||
style="@style/font11"
|
||||
android:paddingTop="10dp"
|
||||
android:layout_gravity="center"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
|
||||
<Button
|
||||
android:id="@+id/assistant_check"
|
||||
android:text="@string/assistant_create"
|
||||
android:text="@string/assistant_create_account"
|
||||
android:background="@drawable/assistant_button"
|
||||
style="@style/font8"
|
||||
android:contentDescription="@string/content_description_validate"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="40dp"
|
||||
android:layout_margin="10dp"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingRight="10dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"/>
|
||||
android:paddingRight="10dp"/>
|
||||
|
||||
</LinearLayout>
|
|
@ -2,25 +2,22 @@
|
|||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:padding="30dp"
|
||||
android:orientation="vertical" >
|
||||
|
||||
<TextView
|
||||
android:text="@string/assistant_ec_calibration"
|
||||
android:contentDescription="@string/content_description_welcome"
|
||||
style="@style/font6"
|
||||
android:textAllCaps="true"
|
||||
android:paddingTop="20dp"
|
||||
android:layout_gravity="center"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal"/>
|
||||
|
||||
<ImageView
|
||||
android:contentDescription="@string/content_description_welcome"
|
||||
android:layout_width="200dp"
|
||||
android:layout_height="200dp"
|
||||
android:layout_centerInParent="true"
|
||||
android:src="@drawable/linphone_logo_orange"/>
|
||||
<ImageView
|
||||
android:src="@drawable/linphone_logo_orange"
|
||||
android:layout_width="150dp"
|
||||
android:layout_height="150dp"
|
||||
android:layout_centerInParent="true"/>
|
||||
|
||||
<ProgressBar
|
||||
android:layout_height="wrap_content"
|
||||
|
|
|
@ -1,101 +1,99 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<TextView
|
||||
android:text="@string/assistant_linphone_account_title"
|
||||
android:contentDescription="@string/content_description_welcome"
|
||||
style="@style/font6"
|
||||
android:textAllCaps="true"
|
||||
android:paddingTop="20dp"
|
||||
android:layout_gravity="center"
|
||||
android:layout_width="wrap_content"
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal"/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingRight="10dp"
|
||||
android:gravity="center">
|
||||
android:padding="30dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:text="@string/username"
|
||||
style="@style/font13"
|
||||
android:text="@string/assistant_linphone_account"
|
||||
style="@style/font6"
|
||||
android:textAllCaps="true"
|
||||
android:paddingTop="10dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/assistant_username"
|
||||
android:background="@drawable/resizable_textfield"
|
||||
android:textColor="@color/colorB"
|
||||
android:textCursorDrawable="@null"
|
||||
android:inputType="textEmailAddress"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingRight="10dp"
|
||||
android:singleLine="true"/>
|
||||
|
||||
<TextView
|
||||
android:text="@string/password"
|
||||
style="@style/font13"
|
||||
android:textAllCaps="true"
|
||||
android:paddingTop="10dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/assistant_password"
|
||||
android:background="@drawable/resizable_textfield"
|
||||
android:textColor="@color/colorB"
|
||||
android:textCursorDrawable="@null"
|
||||
android:inputType="textPassword"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingRight="10dp"
|
||||
android:singleLine="true"/>
|
||||
|
||||
<TextView
|
||||
android:text="@string/assistant_display_name"
|
||||
style="@style/font13"
|
||||
android:textAllCaps="true"
|
||||
android:paddingTop="10dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/assistant_display_name"
|
||||
android:background="@drawable/resizable_textfield"
|
||||
android:textColor="@color/colorB"
|
||||
android:textCursorDrawable="@null"
|
||||
android:inputType="textEmailAddress"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingRight="10dp"
|
||||
android:singleLine="true"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/assistant_apply"
|
||||
android:text="@string/assistant_login"
|
||||
android:background="@drawable/assistant_button"
|
||||
style="@style/font8"
|
||||
android:contentDescription="@string/content_description_validate"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingRight="10dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_centerVertical="true"/>
|
||||
android:gravity="center_horizontal"/>
|
||||
|
||||
<TextView
|
||||
android:text="@string/assistant_linphone_login_desc"
|
||||
style="@style/font11"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="10dp"
|
||||
android:gravity="center"/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:layout_marginTop="30dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:text="@string/username"
|
||||
style="@style/font13"
|
||||
android:textAllCaps="true"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/assistant_username"
|
||||
android:background="@drawable/resizable_textfield"
|
||||
android:textColor="@color/colorB"
|
||||
android:inputType="text|textEmailAddress"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:singleLine="true"/>
|
||||
|
||||
<TextView
|
||||
android:text="@string/password"
|
||||
style="@style/font13"
|
||||
android:textAllCaps="true"
|
||||
android:paddingTop="20dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/assistant_password"
|
||||
android:background="@drawable/resizable_textfield"
|
||||
android:textColor="@color/colorB"
|
||||
android:inputType="textPassword"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:singleLine="true"/>
|
||||
|
||||
<TextView
|
||||
android:text="@string/assistant_display_name_optional"
|
||||
style="@style/font13"
|
||||
android:textAllCaps="true"
|
||||
android:paddingTop="20dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/assistant_display_name"
|
||||
android:background="@drawable/resizable_textfield"
|
||||
android:textColor="@color/colorB"
|
||||
android:inputType="textEmailAddress"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:singleLine="true"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/assistant_apply"
|
||||
android:text="@string/assistant_login"
|
||||
android:background="@drawable/assistant_button"
|
||||
android:textColor="@drawable/assistant_button_text_color"
|
||||
style="@style/font8"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="40dp"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingRight="10dp"
|
||||
android:layout_marginTop="20dp"/>
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
|
@ -1,123 +1,154 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical" >
|
||||
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="fill_parent">
|
||||
|
||||
<TextView
|
||||
android:text="@string/assistant_general_account_title"
|
||||
android:contentDescription="@string/content_description_welcome"
|
||||
style="@style/font6"
|
||||
android:textAllCaps="true"
|
||||
android:paddingTop="20dp"
|
||||
android:layout_gravity="center"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal"/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingRight="10dp"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:padding="30dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:text="@string/username"
|
||||
style="@style/font13"
|
||||
android:text="@string/assistant_generic_account"
|
||||
style="@style/font6"
|
||||
android:textAllCaps="true"
|
||||
android:paddingTop="10dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/assistant_username"
|
||||
android:background="@drawable/resizable_textfield"
|
||||
android:textColor="@color/colorB"
|
||||
android:textCursorDrawable="@null"
|
||||
android:inputType="textEmailAddress"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingRight="10dp"
|
||||
android:singleLine="true"/>
|
||||
|
||||
<TextView
|
||||
android:text="@string/password"
|
||||
style="@style/font13"
|
||||
android:textAllCaps="true"
|
||||
android:paddingTop="10dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/assistant_password"
|
||||
android:background="@drawable/resizable_textfield"
|
||||
android:textColor="@color/colorB"
|
||||
android:textCursorDrawable="@null"
|
||||
android:inputType="textPassword"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingRight="10dp"
|
||||
android:singleLine="true"/>
|
||||
|
||||
|
||||
<TextView
|
||||
android:text="@string/domain"
|
||||
style="@style/font13"
|
||||
android:textAllCaps="true"
|
||||
android:paddingTop="10dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
|
||||
<EditText
|
||||
android:id="@+id/assistant_domain"
|
||||
android:background="@drawable/resizable_textfield"
|
||||
android:textColor="@color/colorB"
|
||||
android:textCursorDrawable="@null"
|
||||
android:inputType="textEmailAddress"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingRight="10dp"
|
||||
android:singleLine="true"/>
|
||||
|
||||
<TextView
|
||||
android:text="@string/assistant_display_name"
|
||||
style="@style/font13"
|
||||
android:textAllCaps="true"
|
||||
android:paddingTop="10dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/assistant_display_name"
|
||||
android:background="@drawable/resizable_textfield"
|
||||
android:textColor="@color/colorB"
|
||||
android:textCursorDrawable="@null"
|
||||
android:inputType="textEmailAddress"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingRight="10dp"
|
||||
android:singleLine="true"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/assistant_apply"
|
||||
android:text="@string/assistant_login"
|
||||
android:background="@drawable/assistant_button"
|
||||
style="@style/font8"
|
||||
android:contentDescription="@string/content_description_validate"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingRight="10dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_centerVertical="true"/>
|
||||
android:layout_gravity="center_horizontal"/>
|
||||
|
||||
<TextView
|
||||
android:text="@string/assistant_login_desc"
|
||||
style="@style/font11"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="10dp"
|
||||
android:gravity="center"/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:layout_marginTop="30dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:text="@string/username"
|
||||
style="@style/font13"
|
||||
android:textAllCaps="true"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/assistant_username"
|
||||
android:background="@drawable/resizable_textfield"
|
||||
android:textColor="@color/colorB"
|
||||
android:inputType="text|textEmailAddress"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:singleLine="true"/>
|
||||
|
||||
<TextView
|
||||
android:text="@string/password"
|
||||
style="@style/font13"
|
||||
android:textAllCaps="true"
|
||||
android:paddingTop="20dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/assistant_password"
|
||||
android:background="@drawable/resizable_textfield"
|
||||
android:textColor="@color/colorB"
|
||||
android:inputType="textPassword"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:singleLine="true"/>
|
||||
|
||||
<TextView
|
||||
android:text="@string/domain"
|
||||
style="@style/font13"
|
||||
android:textAllCaps="true"
|
||||
android:paddingTop="20dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/assistant_domain"
|
||||
android:background="@drawable/resizable_textfield"
|
||||
android:textColor="@color/colorB"
|
||||
android:inputType="textEmailAddress"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:singleLine="true"/>
|
||||
|
||||
<TextView
|
||||
android:text="@string/assistant_display_name_optional"
|
||||
style="@style/font13"
|
||||
android:textAllCaps="true"
|
||||
android:paddingTop="20dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/assistant_display_name"
|
||||
android:background="@drawable/resizable_textfield"
|
||||
android:textColor="@color/colorB"
|
||||
android:inputType="textEmailAddress"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:singleLine="true"/>
|
||||
|
||||
<TextView
|
||||
android:text="@string/transport"
|
||||
style="@style/font13"
|
||||
android:textAllCaps="true"
|
||||
android:paddingTop="20dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<RadioGroup
|
||||
android:id="@+id/assistant_transports"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/transport_udp"
|
||||
android:text="@string/pref_transport_udp"
|
||||
android:layout_margin="5dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/transport_tcp"
|
||||
android:text="@string/pref_transport_tcp"
|
||||
android:layout_margin="5dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/transport_tls"
|
||||
android:text="@string/pref_transport_tls"
|
||||
android:layout_margin="5dp"
|
||||
android:checked="true"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
</RadioGroup>
|
||||
|
||||
<Button
|
||||
android:id="@+id/assistant_apply"
|
||||
android:text="@string/assistant_login"
|
||||
android:background="@drawable/assistant_button"
|
||||
android:textColor="@drawable/assistant_button_text_color"
|
||||
style="@style/font8"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="40dp"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingRight="10dp"
|
||||
android:layout_marginTop="20dp"/>
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
|
@ -2,32 +2,36 @@
|
|||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:padding="30dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:text="@string/assistant_remote_provisioning_title"
|
||||
android:contentDescription="@string/content_description_welcome"
|
||||
style="@style/font6"
|
||||
android:textAllCaps="true"
|
||||
android:paddingTop="20dp"
|
||||
android:layout_gravity="center"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal"/>
|
||||
|
||||
<TextView
|
||||
android:text="@string/assistant_remote_provisioning_desc"
|
||||
style="@style/font11"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="10dp"
|
||||
android:layout_gravity="center"/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingRight="10dp"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:layout_marginTop="30dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:text="@string/remote_provisioning_url"
|
||||
style="@style/font13"
|
||||
android:textAllCaps="true"
|
||||
android:paddingTop="10dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
|
@ -35,27 +39,22 @@
|
|||
android:id="@+id/assistant_remote_provisioning_url"
|
||||
android:background="@drawable/resizable_textfield"
|
||||
android:textColor="@color/colorB"
|
||||
android:textCursorDrawable="@null"
|
||||
android:inputType="textEmailAddress"
|
||||
android:inputType="textUri"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingRight="10dp"
|
||||
android:singleLine="true"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/assistant_apply"
|
||||
android:text="@string/assistant_apply"
|
||||
android:text="@string/assistant_fetch_apply"
|
||||
android:background="@drawable/assistant_button"
|
||||
android:textColor="@drawable/assistant_button_text_color"
|
||||
style="@style/font8"
|
||||
android:contentDescription="@string/content_description_validate"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_height="40dp"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingRight="10dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_centerVertical="true"/>
|
||||
</LinearLayout>
|
||||
android:layout_marginTop="20dp"/>
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
|
@ -96,7 +96,7 @@
|
|||
|
||||
<Button
|
||||
android:id="@+id/assistant_connect"
|
||||
android:text="@string/assistant_connect"
|
||||
android:text="@string/connect"
|
||||
android:background="@drawable/assistant_button"
|
||||
style="@style/font8"
|
||||
android:contentDescription="@string/content_description_validate"
|
||||
|
|
|
@ -1,36 +1,38 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/topbar"
|
||||
android:background="@color/colorF"
|
||||
android:orientation="horizontal"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="70dp">
|
||||
android:layout_height="60dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/back"
|
||||
android:src="@drawable/back"
|
||||
android:background="@drawable/toolbar_button"
|
||||
android:contentDescription="@string/content_description_back"
|
||||
android:layout_width="70dp"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:padding="20dp"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_centerInParent="true"/>
|
||||
android:layout_weight="0.2"
|
||||
android:padding="18dp"/>
|
||||
|
||||
<TextView
|
||||
android:text="@string/assistant_title"
|
||||
android:text="@string/assistant"
|
||||
style="@style/font1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_centerInParent="true"
|
||||
android:gravity="center_vertical"/>
|
||||
android:layout_weight="0.6"
|
||||
android:gravity="center"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/cancel"
|
||||
android:src="@drawable/dialer_back"
|
||||
android:background="@drawable/toolbar_button"
|
||||
android:contentDescription="@string/content_description_dialer"
|
||||
android:layout_width="70dp"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:padding="20dp"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_alignParentRight="true"/>
|
||||
android:layout_weight="0.2"
|
||||
android:padding="15dp"/>
|
||||
|
||||
</RelativeLayout>
|
||||
</LinearLayout>
|
|
@ -1,71 +1,79 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:text="@string/assistant_welcome"
|
||||
style="@style/font6"
|
||||
android:textAllCaps="true"
|
||||
android:layout_width="wrap_content"
|
||||
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="20dp"
|
||||
android:layout_gravity="center"/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center"
|
||||
android:layout_margin="20dp"
|
||||
android:layout_gravity="center">
|
||||
android:padding="30dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<Button
|
||||
android:id="@+id/create_account"
|
||||
android:text="@string/assistant_create_account"
|
||||
android:background="@drawable/assistant_button"
|
||||
style="@style/font8"
|
||||
android:contentDescription="@string/assistant_create_account"
|
||||
android:layout_marginTop="20dp"
|
||||
<TextView
|
||||
android:text="@string/welcome"
|
||||
style="@style/font6"
|
||||
android:textAllCaps="true"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"/>
|
||||
|
||||
<TextView
|
||||
android:text="@string/assistant_welcome_desc"
|
||||
style="@style/font11"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="10dp"
|
||||
android:gravity="center"/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"/>
|
||||
android:orientation="vertical"
|
||||
android:gravity="center"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_gravity="center">
|
||||
|
||||
<Button
|
||||
android:id="@+id/create_account"
|
||||
android:text="@string/assistant_create_account"
|
||||
android:background="@drawable/assistant_button"
|
||||
style="@style/font8"
|
||||
android:contentDescription="@string/assistant_create_account"
|
||||
android:layout_marginTop="30dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"/>
|
||||
|
||||
|
||||
<Button
|
||||
android:id="@+id/login_linphone"
|
||||
android:text="@string/assistant_login_linphone"
|
||||
android:background="@drawable/assistant_button"
|
||||
style="@style/font8"
|
||||
android:contentDescription="@string/assistant_login_linphone"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_centerInParent="true"/>
|
||||
<Button
|
||||
android:id="@+id/login_linphone"
|
||||
android:text="@string/assistant_login_linphone"
|
||||
android:background="@drawable/assistant_button"
|
||||
style="@style/font8"
|
||||
android:contentDescription="@string/assistant_login_linphone"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginTop="30dp"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/login_generic"
|
||||
android:text="@string/assistant_login_generic"
|
||||
android:background="@drawable/assistant_button"
|
||||
style="@style/font8"
|
||||
android:contentDescription="@string/assistant_login_generic"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_centerInParent="true"/>
|
||||
<Button
|
||||
android:id="@+id/login_generic"
|
||||
android:text="@string/assistant_login_generic"
|
||||
android:background="@drawable/assistant_button"
|
||||
style="@style/font8"
|
||||
android:contentDescription="@string/assistant_login_generic"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginTop="30dp"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/remote_provisioning"
|
||||
android:text="@string/assistant_remote_provisioning"
|
||||
android:background="@drawable/assistant_button"
|
||||
style="@style/font8"
|
||||
android:contentDescription="@string/assistant_remote_provisioning"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_centerInParent="true"/>
|
||||
<Button
|
||||
android:id="@+id/remote_provisioning"
|
||||
android:text="@string/assistant_remote_provisioning"
|
||||
android:background="@drawable/assistant_button"
|
||||
style="@style/font8"
|
||||
android:contentDescription="@string/assistant_remote_provisioning"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginTop="30dp"/>
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
|
@ -9,7 +9,7 @@
|
|||
android:id="@+id/status"
|
||||
android:name="org.linphone.StatusFragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="35dp"
|
||||
android:layout_height="40dp"
|
||||
tools:layout="@layout/status" />
|
||||
|
||||
<android.support.v4.widget.DrawerLayout
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
android:id="@+id/status"
|
||||
android:background="@color/colorA"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="35dp"
|
||||
android:layout_height="40dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<RelativeLayout
|
||||
|
@ -37,9 +37,9 @@
|
|||
android:contentDescription="@string/content_description_led"
|
||||
android:paddingLeft="5dp"
|
||||
android:adjustViewBounds="true"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_toRightOf="@id/side_menu_button"/>
|
||||
|
||||
<TextView
|
||||
|
|
|
@ -9,13 +9,14 @@
|
|||
<string name="password">Password</string>
|
||||
<string name="confirm_password">Password confirmation</string>
|
||||
<string name="domain">Domain</string>
|
||||
<string name="remote_provisioning_url">Provisioning url</string>
|
||||
<string name="remote_provisioning_url">Url</string>
|
||||
<string name="email">Email</string>
|
||||
<string name="delete_text">Are you sure you want to delete your selection ?</string>
|
||||
<string name="delete">Delete</string>
|
||||
<string name="retry">Retry</string>
|
||||
<string name="cancel">Cancel</string>
|
||||
<string name="accept">Accept</string>
|
||||
<string name="continue_text">Continue</string>
|
||||
<string name="about">About</string>
|
||||
<string name="deny">Deny</string>
|
||||
<string name="no_account">No account configured</string>
|
||||
|
@ -24,30 +25,37 @@
|
|||
<string name="incoming">incoming</string>
|
||||
<string name="missed">missed</string>
|
||||
<string name="settings">Settings</string>
|
||||
<string name="connect">Connection</string>
|
||||
|
||||
<!-- splashscreen -->
|
||||
<string name="app_description">free SIP VOIP client</string>
|
||||
|
||||
<!-- 0. Assistant -->
|
||||
<string name="assistant_welcome">Welcome</string>
|
||||
<string name="assistant_title">Assistant</string>
|
||||
<string name="welcome">Welcome</string>
|
||||
<string name="assistant">Assistant</string>
|
||||
<string name="assistant_create_account">Create account</string>
|
||||
<string name="assistant_welcome_desc">This assistant will help you to use a SIP account for your calls.</string>
|
||||
<string name="assistant_linphone_login_desc">Enter your username and password of your linphone.org account</string>
|
||||
<string name="assistant_remote_provisioning_desc">Please provide your provisioning url</string>
|
||||
<string name="assistant_login_desc">Enter your username and password with your SIP domain</string>
|
||||
<string name="assistant_validate_account">An email has been sent to the address you gave. In order to activate your account, you need to click on the link inside it. Once it is done, come back here and click on the button.</string>
|
||||
<string name="transport">Transport</string>
|
||||
<string name="assistant_login_linphone">Use Linphone account</string>
|
||||
<string name="assistant_login_generic">Use SIP account</string>
|
||||
<string name="assistant_remote_provisioning">Fetch remote configuration</string>
|
||||
<string name="assistant_create_account_title">Create account</string>
|
||||
<string name="assistant_create_account_part_1">1/2</string>
|
||||
<string name="assistant_create_account_part_2">2/2</string>
|
||||
<string name="assistant_display_name">Display name (optional)</string>
|
||||
<string name="assistant_linphone_account_title">Configure Linphone account</string>
|
||||
<string name="assistant_general_account_title">Configure SIP account</string>
|
||||
<string name="assistant_display_name_optional">Display name (optional)</string>
|
||||
<string name="assistant_linphone_account">Configure Linphone account</string>
|
||||
<string name="assistant_generic_account">Configure SIP account</string>
|
||||
<string name="assistant_remote_provisioning_title">Fetch remote configuration</string>
|
||||
<string name="assistant_create">Create account</string>
|
||||
<string name="assistant_apply">Fetch and apply</string>
|
||||
<string name="assistant_fetch_apply">Fetch and apply</string>
|
||||
<string name="assistant_login">Login</string>
|
||||
<string name="assistant_ec_calibration">Echo canceller calibration in progress</string>
|
||||
<string name="assistant_remote_provisioning_login">Enter your login</string>
|
||||
<string name="assistant_connect">Connection</string>
|
||||
<string name="assistant_account_not_validated">Your account has not been validated yet.</string>
|
||||
<string name="assistant_account_validated">Your account has been validated.</string>
|
||||
<string name="assistant_error_bad_credentials">Incorrect username or passowrd</string>
|
||||
|
||||
<!-- 1. Dailer -->
|
||||
<string name="address_bar_hint">Enter a number or an address</string>
|
||||
|
@ -94,6 +102,9 @@
|
|||
|
||||
|
||||
<!-- Content description -->
|
||||
<string name="content_description_back">Back</string>
|
||||
<string name="content_description_dialer">Dialer</string>
|
||||
|
||||
<string name="content_description_toggle_micro">Toggle micro</string>
|
||||
<string name="content_description_toggle_speaker">Toggle speaker</string>
|
||||
<string name="content_description_decline">Decline</string>
|
||||
|
@ -132,7 +143,6 @@
|
|||
<string name="content_description_pause">Pause</string>
|
||||
<string name="content_description_numpad">Numpad</string>
|
||||
<string name="content_description_settings">Settings button</string>
|
||||
<string name="content_description_dialer">Dialer</string>
|
||||
<string name="content_description_history">History button</string>
|
||||
<string name="content_description_chat_button">Chat button</string>
|
||||
<string name="content_description_contacts">Contacts button</string>
|
||||
|
@ -140,12 +150,9 @@
|
|||
<string name="content_description_call_quality">Call quality</string>
|
||||
<string name="content_description_encryption">Encryption</string>
|
||||
<string name="content_description_switch_camera">Switch camera</string>
|
||||
<string name="content_description_welcome">Welcome to the account setup assistant</string>
|
||||
<string name="content_description_cancel">Cancel</string>
|
||||
<string name="content_description_cancel_button">Cancel button</string>
|
||||
<string name="content_description_next">Next button</string>
|
||||
<string name="content_description_back">Back button</string>
|
||||
<string name="content_description_setup_ok">Ok</string>
|
||||
<string name="content_description_message_status">Message status</string>
|
||||
<string name="content_description_conference">Conference</string>
|
||||
|
||||
|
@ -187,10 +194,7 @@
|
|||
<string name="state_paused">paused</string>
|
||||
<string name="state_paused_by_remote">paused by remote</string>
|
||||
<string name="state_streams_running"></string>
|
||||
<string name="mutemic_button_txt">Mute</string>
|
||||
<string name="speaker_button_txt">Speaker</string>
|
||||
<string name="bluetooth_button_txt">Bluetooth</string>
|
||||
<string name="CancelButtonText">Cancel</string>
|
||||
<string name="AddCallButtonText">Add call</string>
|
||||
<string name="TransferCallButtonText">Transfer call</string>
|
||||
<string name="conf_admin_choice_enter">Enter conference</string>
|
||||
|
@ -382,22 +386,11 @@
|
|||
<string name="call_stats_video_resolution">Video size:</string>
|
||||
<!--Used by Android to help blind people by describing them images-->
|
||||
|
||||
<string name="setup_password_hint">password</string>
|
||||
<string name="setup_domain_hint">domain</string>
|
||||
<string name="setup_email_hint">email</string>
|
||||
<string name="setup_create">Create Account</string>
|
||||
<string name="setup_validate_account">An email has been sent to the address you gave. In order to activate your account, you need to click on the link inside it. Once it is done, come back here and click on the button above.</string>
|
||||
<string name="setup_check_account_validation">Check</string>
|
||||
<string name="setup_account_not_validated">Your account has not been validated yet.</string>
|
||||
<string name="setup_account_validated">Your account has been validated.</string>
|
||||
<string name="button_history">History</string>
|
||||
<string name="button_contacts">Contacts</string>
|
||||
<string name="button_settings">Settings</string>
|
||||
<string name="button_chat">Chat</string>
|
||||
<string name="button_about">About</string>
|
||||
<string name="button_setup_cancel">Cancel</string>
|
||||
<string name="button_setup_back">Back</string>
|
||||
<string name="button_setup_next">Let\'s go</string>
|
||||
<string name="button_new_chat">New conversation</string>
|
||||
<string name="button_edit">Edit</string>
|
||||
<string name="button_ok">Okay</string>
|
||||
|
|
|
@ -14,100 +14,100 @@
|
|||
|
||||
<style name="font2" parent="@android:style/TextAppearance.Medium">
|
||||
<item name="android:textColor">@color/colorA</item>
|
||||
<item name="android:textSize">18sp</item>
|
||||
<item name="android:textSize">16sp</item>
|
||||
</style>
|
||||
|
||||
<style name="font3" parent="@android:style/TextAppearance.Small">
|
||||
<item name="android:textColor">@color/colorA</item>
|
||||
<item name="android:textSize">15sp</item>
|
||||
<item name="android:textSize">13sp</item>
|
||||
</style>
|
||||
|
||||
<style name="font4" parent="@android:style/TextAppearance.Medium">
|
||||
<item name="android:textColor">@color/colorB</item>
|
||||
<item name="android:textAllCaps">true</item>
|
||||
<item name="android:textStyle">bold</item>
|
||||
<item name="android:textSize">28sp</item>
|
||||
<item name="android:textSize">21sp</item>
|
||||
</style>
|
||||
|
||||
<style name="font5" parent="@android:style/TextAppearance.Medium">
|
||||
<item name="android:textColor">@color/colorC</item>
|
||||
<item name="android:textSize">28sp</item>
|
||||
<item name="android:textSize">30sp</item>
|
||||
</style>
|
||||
|
||||
<style name="font6" parent="@android:style/TextAppearance.Medium">
|
||||
<item name="android:textColor">@color/colorC</item>
|
||||
<item name="android:textSize">18sp</item>
|
||||
<item name="android:textSize">21sp</item>
|
||||
</style>
|
||||
|
||||
<style name="font7" parent="@android:style/TextAppearance.Medium">
|
||||
<item name="android:textColor">@color/colorC</item>
|
||||
<item name="android:textStyle">bold</item>
|
||||
<item name="android:textSize">26sp</item>
|
||||
<item name="android:textSize">18sp</item>
|
||||
</style>
|
||||
|
||||
<style name="font8" parent="@android:style/TextAppearance.Medium">
|
||||
<item name="android:textColor">@color/colorC</item>
|
||||
<item name="android:textAllCaps">true</item>
|
||||
<item name="android:textSize">18sp</item>
|
||||
<item name="android:textSize">16sp</item>
|
||||
</style>
|
||||
|
||||
<style name="font9" parent="@android:style/TextAppearance.Small">
|
||||
<item name="android:textColor">@color/colorC</item>
|
||||
<item name="android:textSize">15sp</item>
|
||||
<item name="android:textSize">13sp</item>
|
||||
</style>
|
||||
|
||||
<style name="font10" parent="@android:style/TextAppearance.Medium">
|
||||
<item name="android:textColor">@color/colorD</item>
|
||||
<item name="android:textSize">20sp</item>
|
||||
<item name="android:textSize">18sp</item>
|
||||
</style>
|
||||
|
||||
<style name="font11" parent="@android:style/TextAppearance.Medium">
|
||||
<item name="android:textColor">@color/colorD</item>
|
||||
<item name="android:textSize">16sp</item>
|
||||
<item name="android:textSize">15sp</item>
|
||||
</style>
|
||||
|
||||
<style name="font12" parent="@android:style/TextAppearance.Small">
|
||||
<item name="android:textColor">@color/colorE</item>
|
||||
<item name="android:textSize">25sp</item>
|
||||
<item name="android:textSize">16sp</item>
|
||||
</style>
|
||||
|
||||
<style name="font13" parent="@android:style/TextAppearance.Medium">
|
||||
<item name="android:textColor">@color/colorE</item>
|
||||
<item name="android:textSize">18sp</item>
|
||||
<item name="android:textSize">13sp</item>
|
||||
</style>
|
||||
|
||||
<style name="font14" parent="@android:style/TextAppearance.Small">
|
||||
<item name="android:textColor">@color/colorH</item>
|
||||
<item name="android:textSize">26sp</item>
|
||||
<item name="android:textSize">21sp</item>
|
||||
</style>
|
||||
|
||||
<style name="font15" parent="@android:style/TextAppearance.Small">
|
||||
<item name="android:textColor">@color/colorH</item>
|
||||
<item name="android:textAllCaps">true</item>
|
||||
<item name="android:textSize">20sp</item>
|
||||
<item name="android:textSize">16sp</item>
|
||||
</style>
|
||||
|
||||
<style name="font16" parent="@android:style/TextAppearance.Small">
|
||||
<item name="android:textColor">@color/colorH</item>
|
||||
<item name="android:textSize">18sp</item>
|
||||
<item name="android:textSize">15sp</item>
|
||||
</style>
|
||||
|
||||
<style name="font17" parent="@android:style/TextAppearance.Small">
|
||||
<item name="android:textColor">@color/colorH</item>
|
||||
<item name="android:textStyle">bold</item>
|
||||
<item name="android:textSize">20sp</item>
|
||||
<item name="android:textSize">13sp</item>
|
||||
</style>
|
||||
|
||||
<style name="font18" parent="@android:style/TextAppearance.Small">
|
||||
<item name="android:textColor">@color/colorH</item>
|
||||
<item name="android:textSize">15sp</item>
|
||||
<item name="android:textSize">10sp</item>
|
||||
</style>
|
||||
|
||||
<style name="font19" parent="@android:style/TextAppearance.Medium">
|
||||
<item name="android:textColor">@color/colorD</item>
|
||||
<item name="android:textStyle">bold</item>
|
||||
<item name="android:textAllCaps">true</item>
|
||||
<item name="android:textSize">22sp</item>
|
||||
<item name="android:textSize">13sp</item>
|
||||
</style>
|
||||
|
||||
<style name="font20" parent="@android:style/TextAppearance.Small">
|
||||
|
|
|
@ -337,7 +337,7 @@ public class LinphonePreferences {
|
|||
lc.addProxyConfig(prxCfg);
|
||||
lc.addAuthInfo(authInfo);
|
||||
|
||||
if (!tempNoDefault && LinphonePreferences.instance().getAccountCount() == 1)
|
||||
if (!tempNoDefault)
|
||||
lc.setDefaultProxyConfig(prxCfg);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -21,12 +21,10 @@ import org.linphone.LinphoneActivity;
|
|||
import org.linphone.LinphoneManager;
|
||||
import org.linphone.LinphonePreferences;
|
||||
import org.linphone.LinphonePreferences.AccountBuilder;
|
||||
import org.linphone.LinphoneUtils;
|
||||
import org.linphone.R;
|
||||
import org.linphone.StatusFragment;
|
||||
import org.linphone.core.LinphoneAddress;
|
||||
import org.linphone.core.LinphoneAddress.TransportType;
|
||||
import org.linphone.core.LinphoneAuthInfo;
|
||||
import org.linphone.core.LinphoneCore;
|
||||
import org.linphone.core.LinphoneCore.RegistrationState;
|
||||
import org.linphone.core.LinphoneCoreException;
|
||||
|
@ -35,22 +33,23 @@ import org.linphone.core.LinphoneCoreListenerBase;
|
|||
import org.linphone.core.LinphoneProxyConfig;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.AlertDialog;
|
||||
import android.app.Dialog;
|
||||
import android.app.Fragment;
|
||||
import android.app.FragmentTransaction;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.pm.ActivityInfo;
|
||||
import android.graphics.drawable.ColorDrawable;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.os.Bundle;
|
||||
import android.text.TextUtils;
|
||||
|
||||
import android.view.View;
|
||||
import android.view.View.OnClickListener;
|
||||
import android.view.Window;
|
||||
import android.view.WindowManager;
|
||||
import android.view.inputmethod.InputMethodManager;
|
||||
import android.widget.Button;
|
||||
import android.widget.EditText;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
@ -68,6 +67,7 @@ public class AssistantActivity extends Activity implements OnClickListener {
|
|||
private LinphoneCoreListenerBase mListener;
|
||||
private LinphoneAddress address;
|
||||
private StatusFragment status;
|
||||
private Dialog dialog;
|
||||
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
@ -83,7 +83,7 @@ public class AssistantActivity extends Activity implements OnClickListener {
|
|||
|
||||
firstFragment = getResources().getBoolean(R.bool.assistant_use_linphone_login_as_first_fragment) ?
|
||||
AssistantFragmentsEnum.LINPHONE_LOGIN : AssistantFragmentsEnum.WELCOME;
|
||||
if (findViewById(R.id.fragmentContainer) != null) {
|
||||
if (findViewById(R.id.fragment_container) != null) {
|
||||
if (savedInstanceState == null) {
|
||||
display(firstFragment);
|
||||
} else {
|
||||
|
@ -102,8 +102,8 @@ public class AssistantActivity extends Activity implements OnClickListener {
|
|||
launchEchoCancellerCalibration(true);
|
||||
}
|
||||
} else if (state == RegistrationState.RegistrationFailed) {
|
||||
//showDialog(cfg);
|
||||
Toast.makeText(AssistantActivity.this, getString(R.string.first_launch_bad_login_password), Toast.LENGTH_LONG).show();
|
||||
dialog = createErrorDialog(cfg, smessage);
|
||||
dialog.show();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -156,7 +156,7 @@ public class AssistantActivity extends Activity implements OnClickListener {
|
|||
|
||||
private void changeFragment(Fragment newFragment) {
|
||||
FragmentTransaction transaction = getFragmentManager().beginTransaction();
|
||||
transaction.replace(R.id.fragmentContainer, newFragment);
|
||||
transaction.replace(R.id.fragment_container, newFragment);
|
||||
transaction.commitAllowingStateLoss();
|
||||
}
|
||||
|
||||
|
@ -194,7 +194,7 @@ public class AssistantActivity extends Activity implements OnClickListener {
|
|||
WelcomeFragment fragment = new WelcomeFragment();
|
||||
changeFragment(fragment);
|
||||
currentFragment = AssistantFragmentsEnum.WELCOME;
|
||||
back.setVisibility(View.GONE);
|
||||
back.setVisibility(View.INVISIBLE);
|
||||
} else if (currentFragment == AssistantFragmentsEnum.WELCOME) {
|
||||
finish();
|
||||
}
|
||||
|
@ -215,33 +215,40 @@ public class AssistantActivity extends Activity implements OnClickListener {
|
|||
}
|
||||
}
|
||||
|
||||
private void logIn(String username, String password, String displayName, String domain, boolean sendEcCalibrationResult) {
|
||||
private void logIn(String username, String password, String displayName, String domain, TransportType transport, boolean sendEcCalibrationResult) {
|
||||
InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
|
||||
if (imm != null && getCurrentFocus() != null) {
|
||||
imm.hideSoftInputFromWindow(getCurrentFocus().getWindowToken(), 0);
|
||||
}
|
||||
|
||||
saveCreatedAccount(username, password, displayName, domain);
|
||||
|
||||
if (LinphoneManager.getLc().getDefaultProxyConfig() != null) {
|
||||
launchEchoCancellerCalibration(sendEcCalibrationResult);
|
||||
}
|
||||
saveCreatedAccount(username, password, displayName, domain, transport);
|
||||
/*if (LinphoneManager.getLc().getDefaultProxyConfig() != null) {
|
||||
//launchEchoCancellerCalibration(sendEcCalibrationResult);
|
||||
}*/
|
||||
}
|
||||
|
||||
public void checkAccount(String username, String password, String displayName, String domain) {
|
||||
saveCreatedAccount(username, password, displayName, domain);
|
||||
saveCreatedAccount(username, password, displayName, domain, null);
|
||||
}
|
||||
|
||||
public void linphoneLogIn(String username, String password, String displayName, boolean validate) {
|
||||
if (validate) {
|
||||
checkAccount(username, password, displayName, getString(R.string.default_domain));
|
||||
} else {
|
||||
logIn(username, password, displayName, getString(R.string.default_domain), true);
|
||||
if(accountCreated) {
|
||||
retryLogin(username, password, displayName, getString(R.string.default_domain), null);
|
||||
} else {
|
||||
logIn(username, password, displayName, getString(R.string.default_domain), null, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void genericLogIn(String username, String password, String displayName, String domain) {
|
||||
logIn(username, password, displayName, domain, false);
|
||||
public void genericLogIn(String username, String password, String displayName, String domain, TransportType transport) {
|
||||
if(accountCreated) {
|
||||
retryLogin(username, password, displayName, domain, transport);
|
||||
} else {
|
||||
logIn(username, password, displayName, domain, transport, false);
|
||||
}
|
||||
}
|
||||
|
||||
private void display(AssistantFragmentsEnum fragment) {
|
||||
|
@ -261,7 +268,7 @@ public class AssistantActivity extends Activity implements OnClickListener {
|
|||
fragment = new WelcomeFragment();
|
||||
changeFragment(fragment);
|
||||
currentFragment = AssistantFragmentsEnum.WELCOME;
|
||||
back.setVisibility(View.GONE);
|
||||
back.setVisibility(View.INVISIBLE);
|
||||
}
|
||||
|
||||
public void displayLoginGeneric() {
|
||||
|
@ -272,12 +279,9 @@ public class AssistantActivity extends Activity implements OnClickListener {
|
|||
}
|
||||
|
||||
public void displayLoginLinphone() {
|
||||
//loadConfig();
|
||||
fragment = new LinphoneLoginFragment();
|
||||
|
||||
//LinphoneManager.getInstance().loadConfig(R.raw.config_linphone_account);
|
||||
//LinphoneManager.getInstance().resetLinphoneCore(this);
|
||||
|
||||
|
||||
changeFragment(fragment);
|
||||
currentFragment = AssistantFragmentsEnum.LINPHONE_LOGIN;
|
||||
back.setVisibility(View.VISIBLE);
|
||||
|
@ -297,16 +301,17 @@ public class AssistantActivity extends Activity implements OnClickListener {
|
|||
back.setVisibility(View.VISIBLE);
|
||||
}
|
||||
|
||||
public void retryLogin(LinphoneProxyConfig proxy, String password){
|
||||
LinphoneAuthInfo info = LinphoneManager.getLc().findAuthInfo(LinphoneUtils.getUsernameFromAddress(proxy.getIdentity()),proxy.getRealm(),proxy.getDomain());
|
||||
if(info != null) {
|
||||
info.setPassword(password);
|
||||
LinphoneManager.getLc().addAuthInfo(info);
|
||||
}
|
||||
LinphoneManager.getLc().refreshRegisters();
|
||||
public void retryLogin(String username, String password, String displayName, String domain, TransportType transport) {
|
||||
accountCreated = false;
|
||||
saveCreatedAccount(username, password, displayName, domain, transport);
|
||||
}
|
||||
|
||||
public void saveCreatedAccount(String username, String password, String displayName, String domain) {
|
||||
|
||||
public void loadLinphoneConfig(){
|
||||
LinphoneManager.getInstance().loadConfig();
|
||||
LinphoneManager.getInstance().restartLinphoneCore();
|
||||
}
|
||||
|
||||
public void saveCreatedAccount(String username, String password, String displayName, String domain, TransportType transport) {
|
||||
if (accountCreated)
|
||||
return;
|
||||
|
||||
|
@ -356,7 +361,8 @@ public class AssistantActivity extends Activity implements OnClickListener {
|
|||
.setQualityReportingCollector("sip:voip-metrics@sip.linphone.org")
|
||||
.setQualityReportingEnabled(true)
|
||||
.setQualityReportingInterval(180)
|
||||
.setRealm("sip.linphone.org");
|
||||
.setRealm("sip.linphone.org")
|
||||
.setNoDefault(false);
|
||||
|
||||
|
||||
mPrefs.setStunServer(getString(R.string.default_stun));
|
||||
|
@ -368,6 +374,10 @@ public class AssistantActivity extends Activity implements OnClickListener {
|
|||
.setOutboundProxyEnabled(true)
|
||||
.setAvpfRRInterval(5);
|
||||
}
|
||||
|
||||
if(transport != null){
|
||||
builder.setTransport(transport);
|
||||
}
|
||||
}
|
||||
|
||||
if (getResources().getBoolean(R.bool.enable_push_id)) {
|
||||
|
@ -396,7 +406,7 @@ public class AssistantActivity extends Activity implements OnClickListener {
|
|||
changeFragment(fragment);
|
||||
|
||||
currentFragment = AssistantFragmentsEnum.CREATE_ACCOUNT_ACTIVATION;
|
||||
back.setVisibility(View.GONE);
|
||||
back.setVisibility(View.INVISIBLE);
|
||||
}
|
||||
|
||||
public void isAccountVerified(String username) {
|
||||
|
@ -424,30 +434,27 @@ public class AssistantActivity extends Activity implements OnClickListener {
|
|||
return dialog;
|
||||
}
|
||||
|
||||
public void showDialog(final LinphoneProxyConfig proxy){
|
||||
final Dialog dialog = displayWrongPasswordDialog();
|
||||
|
||||
Button retry = (Button) dialog.findViewById(R.id.retry);
|
||||
Button cancel = (Button) dialog.findViewById(R.id.cancel);
|
||||
|
||||
retry.setOnClickListener(new OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
String newPassword = ((EditText) dialog.findViewById(R.id.password)).getText().toString();
|
||||
retryLogin(proxy, newPassword);
|
||||
dialog.dismiss();
|
||||
}
|
||||
});
|
||||
|
||||
cancel.setOnClickListener(new OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
success();
|
||||
dialog.dismiss();
|
||||
}
|
||||
});
|
||||
|
||||
dialog.show();
|
||||
public Dialog createErrorDialog(LinphoneProxyConfig proxy, String message){
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(this);
|
||||
if(message.equals("Forbidden")) {
|
||||
message = getString(R.string.assistant_error_bad_credentials);
|
||||
}
|
||||
builder.setMessage(message)
|
||||
.setTitle(proxy.getState().toString())
|
||||
.setPositiveButton(getString(R.string.continue_text), new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int id) {
|
||||
success();
|
||||
}
|
||||
})
|
||||
.setNegativeButton(getString(R.string.cancel), new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int id) {
|
||||
LinphoneManager.getLc().removeProxyConfig(LinphoneManager.getLc().getDefaultProxyConfig());
|
||||
LinphonePreferences.instance().resetDefaultProxyConfig();
|
||||
LinphoneManager.getLc().refreshRegisters();
|
||||
dialog.cancel();
|
||||
}
|
||||
});
|
||||
return builder.create();
|
||||
}
|
||||
|
||||
public void success() {
|
||||
|
|
|
@ -72,7 +72,7 @@ public class CreateAccountActivationFragment extends Fragment {
|
|||
XMLRPCCallback listener = new XMLRPCCallback() {
|
||||
Runnable runNotOk = new Runnable() {
|
||||
public void run() {
|
||||
Toast.makeText(getActivity(), getString(R.string.setup_account_not_validated), Toast.LENGTH_LONG).show();
|
||||
Toast.makeText(getActivity(), getString(R.string.assistant_account_not_validated), Toast.LENGTH_LONG).show();
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -107,7 +107,7 @@ public class CreateAccountFragment extends Fragment {
|
|||
if (end > start) {
|
||||
for (int index = start; index < end; index++) {
|
||||
if (!inputFilterCharacters.contains(String.valueOf(source.charAt(index)))) {
|
||||
return "";
|
||||
return "";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -156,7 +156,7 @@ public class CreateAccountFragment extends Fragment {
|
|||
}
|
||||
|
||||
private void displayError(Boolean isOk, TextView error, EditText editText, String errorText){
|
||||
if(isOk){
|
||||
if(isOk || editText.getText().toString().equals("")){
|
||||
error.setVisibility(View.INVISIBLE);
|
||||
error.setText(errorText);
|
||||
editText.setBackgroundResource(R.drawable.resizable_textfield);
|
||||
|
@ -261,7 +261,7 @@ public class CreateAccountFragment extends Fragment {
|
|||
|
||||
Runnable runOk = new Runnable() {
|
||||
public void run() {
|
||||
AssistantActivity.instance().saveCreatedAccount(username, password, null, context.getString(R.string.default_domain));
|
||||
AssistantActivity.instance().saveCreatedAccount(username, password, null, context.getString(R.string.default_domain), null);
|
||||
AssistantActivity.instance().displayWizardConfirm(username);
|
||||
}
|
||||
};
|
||||
|
|
|
@ -21,6 +21,8 @@ import org.linphone.R;
|
|||
|
||||
import android.app.Fragment;
|
||||
import android.os.Bundle;
|
||||
import android.text.Editable;
|
||||
import android.text.TextWatcher;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.View.OnClickListener;
|
||||
|
@ -31,7 +33,7 @@ import android.widget.Toast;
|
|||
/**
|
||||
* @author Sylvain Berfini
|
||||
*/
|
||||
public class LinphoneLoginFragment extends Fragment implements OnClickListener {
|
||||
public class LinphoneLoginFragment extends Fragment implements OnClickListener, TextWatcher {
|
||||
private EditText login, password, displayName;
|
||||
private Button apply;
|
||||
|
||||
|
@ -41,9 +43,12 @@ public class LinphoneLoginFragment extends Fragment implements OnClickListener {
|
|||
View view = inflater.inflate(R.layout.assistant_linphone_login, container, false);
|
||||
|
||||
login = (EditText) view.findViewById(R.id.assistant_username);
|
||||
login.addTextChangedListener(this);
|
||||
password = (EditText) view.findViewById(R.id.assistant_password);
|
||||
password.addTextChangedListener(this);
|
||||
displayName = (EditText) view.findViewById(R.id.assistant_display_name);
|
||||
apply = (Button) view.findViewById(R.id.assistant_apply);
|
||||
apply.setEnabled(false);
|
||||
apply.setOnClickListener(this);
|
||||
|
||||
if (getResources().getBoolean(R.bool.assistant_use_linphone_login_as_first_fragment)) {
|
||||
|
@ -70,4 +75,15 @@ public class LinphoneLoginFragment extends Fragment implements OnClickListener {
|
|||
linphoneLogIn();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void beforeTextChanged(CharSequence s, int start, int count, int after) {}
|
||||
|
||||
@Override
|
||||
public void onTextChanged(CharSequence s, int start, int before, int count) {
|
||||
apply.setEnabled(!login.getText().toString().isEmpty() && !password.getText().toString().isEmpty());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void afterTextChanged(Editable s) {}
|
||||
}
|
||||
|
|
|
@ -21,18 +21,26 @@ import org.linphone.R;
|
|||
|
||||
import android.app.Fragment;
|
||||
import android.os.Bundle;
|
||||
import android.text.Editable;
|
||||
import android.text.TextWatcher;
|
||||
|
||||
import org.linphone.core.LinphoneAddress.TransportType;
|
||||
import org.linphone.core.LinphoneAddress;
|
||||
import org.linphone.mediastream.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.View.OnClickListener;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.Button;
|
||||
import android.widget.EditText;
|
||||
import android.widget.RadioGroup;
|
||||
import android.widget.Toast;
|
||||
/**
|
||||
* @author Sylvain Berfini
|
||||
*/
|
||||
public class LoginFragment extends Fragment implements OnClickListener {
|
||||
public class LoginFragment extends Fragment implements OnClickListener, TextWatcher {
|
||||
private EditText login, password, displayName, domain;
|
||||
private RadioGroup transports;
|
||||
private Button apply;
|
||||
|
||||
@Override
|
||||
|
@ -41,10 +49,15 @@ public class LoginFragment extends Fragment implements OnClickListener {
|
|||
View view = inflater.inflate(R.layout.assistant_login, container, false);
|
||||
|
||||
login = (EditText) view.findViewById(R.id.assistant_username);
|
||||
login.addTextChangedListener(this);
|
||||
password = (EditText) view.findViewById(R.id.assistant_password);
|
||||
password.addTextChangedListener(this);
|
||||
displayName = (EditText) view.findViewById(R.id.assistant_display_name);
|
||||
domain = (EditText) view.findViewById(R.id.assistant_domain);
|
||||
domain.addTextChangedListener(this);
|
||||
transports = (RadioGroup) view.findViewById(R.id.assistant_transports);
|
||||
apply = (Button) view.findViewById(R.id.assistant_apply);
|
||||
apply.setEnabled(false);
|
||||
apply.setOnClickListener(this);
|
||||
|
||||
return view;
|
||||
|
@ -59,8 +72,32 @@ public class LoginFragment extends Fragment implements OnClickListener {
|
|||
Toast.makeText(getActivity(), getString(R.string.first_launch_no_login_password), Toast.LENGTH_LONG).show();
|
||||
return;
|
||||
}
|
||||
|
||||
AssistantActivity.instance().genericLogIn(login.getText().toString(), password.getText().toString(), displayName.getText().toString(), domain.getText().toString());
|
||||
|
||||
TransportType transport;
|
||||
if(transports.getCheckedRadioButtonId() == R.id.transport_udp){
|
||||
transport = TransportType.LinphoneTransportUdp;
|
||||
} else {
|
||||
if(transports.getCheckedRadioButtonId() == R.id.transport_tcp){
|
||||
transport = TransportType.LinphoneTransportTcp;
|
||||
} else {
|
||||
transport = TransportType.LinphoneTransportTls;
|
||||
}
|
||||
}
|
||||
|
||||
AssistantActivity.instance().genericLogIn(login.getText().toString(), password.getText().toString(), displayName.getText().toString(), domain.getText().toString(),transport);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void beforeTextChanged(CharSequence s, int start, int count, int after) {}
|
||||
|
||||
@Override
|
||||
public void onTextChanged(CharSequence s, int start, int before, int count) {
|
||||
apply.setEnabled(!login.getText().toString().isEmpty() && !password.getText().toString().isEmpty() && !domain.getText().toString().isEmpty());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void afterTextChanged(Editable s) {
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -25,6 +25,8 @@ import org.linphone.R;
|
|||
|
||||
import android.app.Fragment;
|
||||
import android.os.Bundle;
|
||||
import android.text.Editable;
|
||||
import android.text.TextWatcher;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.View.OnClickListener;
|
||||
|
@ -32,7 +34,7 @@ import android.view.ViewGroup;
|
|||
import android.widget.Button;
|
||||
import android.widget.EditText;
|
||||
|
||||
public class RemoteProvisioningFragment extends Fragment implements OnClickListener {
|
||||
public class RemoteProvisioningFragment extends Fragment implements OnClickListener, TextWatcher{
|
||||
private EditText remoteProvisioningUrl;
|
||||
private Button apply;
|
||||
|
||||
|
@ -42,7 +44,9 @@ public class RemoteProvisioningFragment extends Fragment implements OnClickListe
|
|||
View view = inflater.inflate(R.layout.assistant_remote_provisioning, container, false);
|
||||
|
||||
remoteProvisioningUrl = (EditText) view.findViewById(R.id.assistant_remote_provisioning_url);
|
||||
remoteProvisioningUrl.addTextChangedListener(this);
|
||||
apply = (Button) view.findViewById(R.id.assistant_apply);
|
||||
apply.setEnabled(false);
|
||||
apply.setOnClickListener(this);
|
||||
|
||||
return view;
|
||||
|
@ -58,4 +62,19 @@ public class RemoteProvisioningFragment extends Fragment implements OnClickListe
|
|||
LinphoneManager.getInstance().restartLinphoneCore();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTextChanged(CharSequence s, int start, int before, int count) {
|
||||
apply.setEnabled(!remoteProvisioningUrl.getText().toString().isEmpty());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void afterTextChanged(Editable s) {
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue