diff --git a/res/layout-small/setup_generic_login.xml b/res/layout-small/setup_generic_login.xml
deleted file mode 100644
index 68c52a87b..000000000
--- a/res/layout-small/setup_generic_login.xml
+++ /dev/null
@@ -1,106 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/res/layout-small/setup_linphone_login.xml b/res/layout-small/setup_linphone_login.xml
deleted file mode 100644
index 7d2da6b49..000000000
--- a/res/layout-small/setup_linphone_login.xml
+++ /dev/null
@@ -1,93 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/res/layout-small/setup_menu.xml b/res/layout-small/setup_menu.xml
deleted file mode 100644
index 6d91eec58..000000000
--- a/res/layout-small/setup_menu.xml
+++ /dev/null
@@ -1,137 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/res/layout-small/setup_wizard.xml b/res/layout-small/setup_wizard.xml
deleted file mode 100644
index addb837a7..000000000
--- a/res/layout-small/setup_wizard.xml
+++ /dev/null
@@ -1,181 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/res/layout-small/setup_wizard_confirm.xml b/res/layout-small/setup_wizard_confirm.xml
deleted file mode 100644
index bdd1c7bfe..000000000
--- a/res/layout-small/setup_wizard_confirm.xml
+++ /dev/null
@@ -1,47 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/res/layout-sw533dp-land/setup.xml b/res/layout-sw533dp-land/setup.xml
deleted file mode 100644
index 4f0fe608c..000000000
--- a/res/layout-sw533dp-land/setup.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/res/layout-sw533dp-land/setup_back_button.xml b/res/layout-sw533dp-land/setup_back_button.xml
deleted file mode 100644
index 885720661..000000000
--- a/res/layout-sw533dp-land/setup_back_button.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/res/layout-sw533dp-land/setup_cancel_button.xml b/res/layout-sw533dp-land/setup_cancel_button.xml
deleted file mode 100644
index a03d1825b..000000000
--- a/res/layout-sw533dp-land/setup_cancel_button.xml
+++ /dev/null
@@ -1,29 +0,0 @@
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/res/layout-sw533dp-land/setup_generic_login.xml b/res/layout-sw533dp-land/setup_generic_login.xml
deleted file mode 100644
index ca7c84af5..000000000
--- a/res/layout-sw533dp-land/setup_generic_login.xml
+++ /dev/null
@@ -1,99 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/res/layout-sw533dp-land/setup_linphone_login.xml b/res/layout-sw533dp-land/setup_linphone_login.xml
deleted file mode 100644
index 430786096..000000000
--- a/res/layout-sw533dp-land/setup_linphone_login.xml
+++ /dev/null
@@ -1,86 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/res/layout-sw533dp-land/setup_menu.xml b/res/layout-sw533dp-land/setup_menu.xml
deleted file mode 100644
index b3d8f4779..000000000
--- a/res/layout-sw533dp-land/setup_menu.xml
+++ /dev/null
@@ -1,129 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/res/layout-sw533dp-land/setup_next_button.xml b/res/layout-sw533dp-land/setup_next_button.xml
deleted file mode 100644
index 37a72e477..000000000
--- a/res/layout-sw533dp-land/setup_next_button.xml
+++ /dev/null
@@ -1,29 +0,0 @@
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/res/layout-sw533dp-land/setup_wizard.xml b/res/layout-sw533dp-land/setup_wizard.xml
deleted file mode 100644
index 7f838ce1f..000000000
--- a/res/layout-sw533dp-land/setup_wizard.xml
+++ /dev/null
@@ -1,177 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/res/layout/setup.xml b/res/layout/setup.xml
index 69b8845c9..52f4dd80e 100644
--- a/res/layout/setup.xml
+++ b/res/layout/setup.xml
@@ -1,59 +1,26 @@
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
+ android:orientation="vertical"
+ android:layout_above="@id/footer">
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/res/layout/setup_generic_login.xml b/res/layout/setup_generic_login.xml
index 6b696d18d..526931608 100644
--- a/res/layout/setup_generic_login.xml
+++ b/res/layout/setup_generic_login.xml
@@ -3,103 +3,114 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
-
-
-
-
-
-
+
+
+
+
+ android:background="@drawable/resizable_textfield" />
+
+
+ android:background="@drawable/resizable_textfield" />
+
+
+ android:background="@drawable/resizable_textfield" />
-
-
-
-
+
+
-
-
-
-
+
+
\ No newline at end of file
diff --git a/res/layout/setup_linphone_login.xml b/res/layout/setup_linphone_login.xml
index 5841dd34f..8dda58dbe 100644
--- a/res/layout/setup_linphone_login.xml
+++ b/res/layout/setup_linphone_login.xml
@@ -3,90 +3,94 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
-
-
-
-
+
+
-
-
-
-
+
+
+
+
+
+
+
+
+
-
-
-
-
+
+
-
-
-
-
+
+
\ No newline at end of file
diff --git a/res/layout/setup_menu.xml b/res/layout/setup_menu.xml
index bf1f592b4..a908ef6c8 100644
--- a/res/layout/setup_menu.xml
+++ b/res/layout/setup_menu.xml
@@ -2,130 +2,102 @@
+ android:orientation="vertical"
+ android:weightSum="1">
-
+
-
-
-
-
-
+ android:layout_height="wrap_content"
+ android:padding="10dp">
+
+
+
-
+
-
-
-
-
-
+ android:layout_height="wrap_content"
+ android:padding="10dp">
+
+
+
-
-
-
-
+ android:layout_height="wrap_content"
+ android:padding="10dp">
+
+
-
-
-
-
+ android:layout_height="wrap_content"
+ android:padding="10dp">
+
+
-
-
-
-
+
+
\ No newline at end of file
diff --git a/res/layout/setup_next_button.xml b/res/layout/setup_next_button.xml
deleted file mode 100644
index dc138cf01..000000000
--- a/res/layout/setup_next_button.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/res/layout/setup_remote_provisioning.xml b/res/layout/setup_remote_provisioning.xml
index bf9feff07..684ea2cee 100644
--- a/res/layout/setup_remote_provisioning.xml
+++ b/res/layout/setup_remote_provisioning.xml
@@ -3,76 +3,71 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
-
-
-
-
+
+
+
+
+ android:background="@drawable/resizable_textfield" />
-
-
-
-
+
+
-
-
-
-
+
+
\ No newline at end of file
diff --git a/res/layout/setup_remote_provisioning_login.xml b/res/layout/setup_remote_provisioning_login.xml
index f3022b9fb..c3e120838 100644
--- a/res/layout/setup_remote_provisioning_login.xml
+++ b/res/layout/setup_remote_provisioning_login.xml
@@ -1,42 +1,12 @@
-
-
-
-
-
-
-
-
@@ -79,7 +49,7 @@
android:paddingRight="10dp"
android:singleLine="true"
android:textColor="@color/edittextcolor"
- android:background="@drawable/setup_field_background" />
+ android:background="@drawable/resizable_textfield" />
+ android:background="@drawable/resizable_textfield" />
-
-
-
-
+ android:background="@drawable/resizable_textfield" />
+
+
@@ -125,10 +89,6 @@
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:orientation="horizontal">
-
-
-
-
diff --git a/res/layout/setup_toolbar.xml b/res/layout/setup_toolbar.xml
new file mode 100644
index 000000000..dbe3f0a53
--- /dev/null
+++ b/res/layout/setup_toolbar.xml
@@ -0,0 +1,53 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/res/layout/setup_welcome.xml b/res/layout/setup_welcome.xml
deleted file mode 100644
index 717678cec..000000000
--- a/res/layout/setup_welcome.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/res/layout/setup_wizard.xml b/res/layout/setup_wizard.xml
index ac1804a66..f918ad4c8 100644
--- a/res/layout/setup_wizard.xml
+++ b/res/layout/setup_wizard.xml
@@ -3,16 +3,26 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
-
-
+
+
+
+
+
+
-
-
+
+ android:background="@drawable/resizable_textfield" />
+
+
-
@@ -69,14 +92,13 @@
android:textCursorDrawable="@null"
android:id="@+id/setup_password"
android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:hint="@string/setup_password_hint"
+ android:layout_height="40dp"
android:inputType="textPassword"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:singleLine="true"
android:textColor="@android:color/black"
- android:background="@drawable/setup_field_background" />
+ android:background="@drawable/resizable_textfield" />
+
+
-
@@ -99,14 +129,13 @@
android:textCursorDrawable="@null"
android:id="@+id/setup_password_confirm"
android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:hint="@string/setup_password_confirm_hint"
+ android:layout_height="40dp"
android:inputType="textPassword"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:singleLine="true"
android:textColor="@android:color/black"
- android:background="@drawable/setup_field_background" />
+ android:background="@drawable/resizable_textfield" />
+
+
-
@@ -129,14 +166,13 @@
android:textCursorDrawable="@null"
android:id="@+id/setup_email"
android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:hint="@string/setup_email_hint"
+ android:layout_height="40dp"
android:inputType="textEmailAddress"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:singleLine="true"
android:textColor="@android:color/black"
- android:background="@drawable/setup_field_background" />
+ android:background="@drawable/resizable_textfield" />
-
-
-
-
+
+
-
-
-
-
+
+
\ No newline at end of file
diff --git a/res/layout/setup_wizard_confirm.xml b/res/layout/setup_wizard_confirm.xml
index c48c30967..c84955316 100644
--- a/res/layout/setup_wizard_confirm.xml
+++ b/res/layout/setup_wizard_confirm.xml
@@ -4,38 +4,45 @@
android:layout_height="match_parent"
android:gravity="center_horizontal"
android:orientation="vertical" >
-
-
-
-
+
+
+
+
-
-
-
-
+
+
diff --git a/src/org/linphone/setup/GenericLoginFragment.java b/src/org/linphone/setup/GenericLoginFragment.java
index a043e8d69..8b690d246 100644
--- a/src/org/linphone/setup/GenericLoginFragment.java
+++ b/src/org/linphone/setup/GenericLoginFragment.java
@@ -25,6 +25,7 @@ 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.ImageView;
import android.widget.Toast;
@@ -33,7 +34,7 @@ import android.widget.Toast;
*/
public class GenericLoginFragment extends Fragment implements OnClickListener {
private EditText login, password, domain;
- private ImageView apply;
+ private Button apply;
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
@@ -43,7 +44,7 @@ public class GenericLoginFragment extends Fragment implements OnClickListener {
login = (EditText) view.findViewById(R.id.setup_username);
password = (EditText) view.findViewById(R.id.setup_password);
domain = (EditText) view.findViewById(R.id.setup_domain);
- apply = (ImageView) view.findViewById(R.id.setup_apply);
+ apply = (Button) view.findViewById(R.id.setup_apply);
apply.setOnClickListener(this);
return view;
diff --git a/src/org/linphone/setup/LinphoneLoginFragment.java b/src/org/linphone/setup/LinphoneLoginFragment.java
index 6e252108a..5b7a1cf13 100644
--- a/src/org/linphone/setup/LinphoneLoginFragment.java
+++ b/src/org/linphone/setup/LinphoneLoginFragment.java
@@ -25,6 +25,7 @@ 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.ImageView;
import android.widget.Toast;
@@ -33,7 +34,7 @@ import android.widget.Toast;
*/
public class LinphoneLoginFragment extends Fragment implements OnClickListener {
private EditText login, password;
- private ImageView apply;
+ private Button apply;
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
@@ -42,7 +43,7 @@ public class LinphoneLoginFragment extends Fragment implements OnClickListener {
login = (EditText) view.findViewById(R.id.setup_username);
password = (EditText) view.findViewById(R.id.setup_password);
- apply = (ImageView) view.findViewById(R.id.setup_apply);
+ apply = (Button) view.findViewById(R.id.setup_apply);
apply.setOnClickListener(this);
if (getResources().getBoolean(R.bool.setup_use_linphone_as_first_fragment)) {
diff --git a/src/org/linphone/setup/MenuFragment.java b/src/org/linphone/setup/MenuFragment.java
index ba893fc3e..8e6370904 100644
--- a/src/org/linphone/setup/MenuFragment.java
+++ b/src/org/linphone/setup/MenuFragment.java
@@ -25,36 +25,37 @@ import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
+import android.widget.Button;
import android.widget.ImageView;
/**
* @author Sylvain Berfini
*/
public class MenuFragment extends Fragment implements OnClickListener {
- private ImageView createAccount, logLinphoneAccount, logGenericAccount, remoteProvisioning;
+ private Button createAccount, logLinphoneAccount, logGenericAccount, remoteProvisioning;
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.setup_menu, container, false);
- createAccount = (ImageView) view.findViewById(R.id.setup_create_account);
+ createAccount = (Button) view.findViewById(R.id.setup_create_account);
createAccount.setOnClickListener(this);
- logLinphoneAccount = (ImageView) view.findViewById(R.id.setup_login_linphone);
+ logLinphoneAccount = (Button) view.findViewById(R.id.setup_login_linphone);
if (getResources().getBoolean(R.bool.hide_linphone_accounts_wizard)) {
view.findViewById(R.id.setup_login_linphone_layout).setVisibility(View.GONE);
} else {
logLinphoneAccount.setOnClickListener(this);
}
- logGenericAccount = (ImageView) view.findViewById(R.id.setup_login_generic);
+ logGenericAccount = (Button) view.findViewById(R.id.setup_login_generic);
if (getResources().getBoolean(R.bool.hide_generic_accounts_wizard)) {
view.findViewById(R.id.setup_login_generic_layout).setVisibility(View.GONE);
} else {
logGenericAccount.setOnClickListener(this);
}
- remoteProvisioning = (ImageView) view.findViewById(R.id.setup_remote_provisioning);
+ remoteProvisioning = (Button) view.findViewById(R.id.setup_remote_provisioning);
if (getResources().getBoolean(R.bool.hide_remote_provisioning_in_wizard)) {
view.findViewById(R.id.setup_remote_provisioning_layout).setVisibility(View.GONE);
} else {
diff --git a/src/org/linphone/setup/RemoteProvisioningFragment.java b/src/org/linphone/setup/RemoteProvisioningFragment.java
index 87da3325e..45353b2bd 100644
--- a/src/org/linphone/setup/RemoteProvisioningFragment.java
+++ b/src/org/linphone/setup/RemoteProvisioningFragment.java
@@ -12,12 +12,13 @@ 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.ImageView;
public class RemoteProvisioningFragment extends Fragment implements OnClickListener {
private EditText remoteProvisioningUrl;
- private ImageView apply;
+ private Button apply;
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
@@ -25,7 +26,7 @@ public class RemoteProvisioningFragment extends Fragment implements OnClickListe
View view = inflater.inflate(R.layout.setup_remote_provisioning, container, false);
remoteProvisioningUrl = (EditText) view.findViewById(R.id.setup_remote_provisioning_url);
- apply = (ImageView) view.findViewById(R.id.setup_apply);
+ apply = (Button) view.findViewById(R.id.setup_apply);
apply.setOnClickListener(this);
return view;
diff --git a/src/org/linphone/setup/RemoteProvisioningLoginActivity.java b/src/org/linphone/setup/RemoteProvisioningLoginActivity.java
index 6b358d7b1..8b37ece5b 100644
--- a/src/org/linphone/setup/RemoteProvisioningLoginActivity.java
+++ b/src/org/linphone/setup/RemoteProvisioningLoginActivity.java
@@ -40,7 +40,7 @@ import android.widget.Toast;
*/
public class RemoteProvisioningLoginActivity extends Activity implements OnClickListener {
private EditText login, password, domain;
- private RelativeLayout next, cancel;
+ private RelativeLayout cancel;
@Override
public void onCreate(Bundle savedInstanceState) {
@@ -50,9 +50,7 @@ public class RemoteProvisioningLoginActivity extends Activity implements OnClick
login = (EditText) findViewById(R.id.setup_username);
password = (EditText) findViewById(R.id.setup_password);
domain = (EditText) findViewById(R.id.setup_domain);
-
- next = (RelativeLayout) findViewById(R.id.setup_next);
- next.setOnClickListener(this);
+
cancel = (RelativeLayout) findViewById(R.id.setup_cancel);
cancel.setOnClickListener(this);
@@ -97,15 +95,7 @@ public class RemoteProvisioningLoginActivity extends Activity implements OnClick
public void onClick(View v) {
int id = v.getId();
- if (id == R.id.setup_next) {
- if (login.getText() == null || login.length() == 0 || password.getText() == null || password.length() == 0 || domain.getText() == null || domain.length() == 0) {
- Toast.makeText(this, getString(R.string.first_launch_no_login_password), Toast.LENGTH_LONG).show();
- return;
- }
-
- storeAccount(login.getText().toString(), password.getText().toString(), domain.getText().toString());
- cancelWizard(true);
- } else if (id == R.id.setup_cancel) {
+ if (id == R.id.setup_cancel) {
cancelWizard(false);
}
}
diff --git a/src/org/linphone/setup/SetupActivity.java b/src/org/linphone/setup/SetupActivity.java
index 21d4db55f..62468184d 100644
--- a/src/org/linphone/setup/SetupActivity.java
+++ b/src/org/linphone/setup/SetupActivity.java
@@ -47,7 +47,7 @@ import android.widget.Toast;
*/
public class SetupActivity extends Activity implements OnClickListener {
private static SetupActivity instance;
- private RelativeLayout back, next, cancel;
+ private RelativeLayout back, cancel;
private SetupFragmentsEnum currentFragment;
private SetupFragmentsEnum firstFragment;
private Fragment fragment;
@@ -65,7 +65,7 @@ public class SetupActivity extends Activity implements OnClickListener {
setContentView(R.layout.setup);
firstFragment = getResources().getBoolean(R.bool.setup_use_linphone_as_first_fragment) ?
- SetupFragmentsEnum.LINPHONE_LOGIN : SetupFragmentsEnum.WELCOME;
+ SetupFragmentsEnum.LINPHONE_LOGIN : SetupFragmentsEnum.MENU;
if (findViewById(R.id.fragmentContainer) != null) {
if (savedInstanceState == null) {
display(firstFragment);
@@ -130,8 +130,6 @@ public class SetupActivity extends Activity implements OnClickListener {
private void initUI() {
back = (RelativeLayout) findViewById(R.id.setup_back);
back.setOnClickListener(this);
- next = (RelativeLayout) findViewById(R.id.setup_next);
- next.setOnClickListener(this);
cancel = (RelativeLayout) findViewById(R.id.setup_cancel);
cancel.setOnClickListener(this);
}
@@ -157,22 +155,6 @@ public class SetupActivity extends Activity implements OnClickListener {
setResult(Activity.RESULT_CANCELED);
finish();
}
- } else if (id == R.id.setup_next) {
- if (firstFragment == SetupFragmentsEnum.LINPHONE_LOGIN) {
- LinphoneLoginFragment linphoneFragment = (LinphoneLoginFragment) fragment;
- linphoneFragment.linphoneLogIn();
- } else {
- if (currentFragment == SetupFragmentsEnum.WELCOME) {
- MenuFragment fragment = new MenuFragment();
- changeFragment(fragment);
- currentFragment = SetupFragmentsEnum.MENU;
-
- next.setVisibility(View.GONE);
- back.setVisibility(View.VISIBLE);
- } else if (currentFragment == SetupFragmentsEnum.WIZARD_CONFIRM) {
- finish();
- }
- }
} else if (id == R.id.setup_back) {
onBackPressed();
}
@@ -188,22 +170,14 @@ public class SetupActivity extends Activity implements OnClickListener {
setResult(Activity.RESULT_CANCELED);
finish();
}
- }
- if (currentFragment == SetupFragmentsEnum.MENU) {
- WelcomeFragment fragment = new WelcomeFragment();
- changeFragment(fragment);
- currentFragment = SetupFragmentsEnum.WELCOME;
-
- next.setVisibility(View.VISIBLE);
- back.setVisibility(View.GONE);
- } else if (currentFragment == SetupFragmentsEnum.GENERIC_LOGIN
+ } else if (currentFragment == SetupFragmentsEnum.GENERIC_LOGIN
|| currentFragment == SetupFragmentsEnum.LINPHONE_LOGIN
|| currentFragment == SetupFragmentsEnum.WIZARD
|| currentFragment == SetupFragmentsEnum.REMOTE_PROVISIONING) {
MenuFragment fragment = new MenuFragment();
changeFragment(fragment);
currentFragment = SetupFragmentsEnum.MENU;
- } else if (currentFragment == SetupFragmentsEnum.WELCOME) {
+ } else if (currentFragment == SetupFragmentsEnum.MENU) {
finish();
}
}
@@ -217,8 +191,6 @@ public class SetupActivity extends Activity implements OnClickListener {
changeFragment(fragment);
currentFragment = SetupFragmentsEnum.ECHO_CANCELLER_CALIBRATION;
back.setVisibility(View.VISIBLE);
- next.setVisibility(View.GONE);
- next.setEnabled(false);
cancel.setEnabled(false);
} else {
if (mPrefs.isFirstLaunch()) {
@@ -259,8 +231,8 @@ public class SetupActivity extends Activity implements OnClickListener {
private void display(SetupFragmentsEnum fragment) {
switch (fragment) {
- case WELCOME:
- displayWelcome();
+ case MENU:
+ displayMenu();
break;
case LINPHONE_LOGIN:
displayLoginLinphone();
@@ -270,10 +242,10 @@ public class SetupActivity extends Activity implements OnClickListener {
}
}
- public void displayWelcome() {
- fragment = new WelcomeFragment();
+ public void displayMenu() {
+ fragment = new MenuFragment();
changeFragment(fragment);
- currentFragment = SetupFragmentsEnum.WELCOME;
+ currentFragment = SetupFragmentsEnum.MENU;
}
public void displayLoginGeneric() {
@@ -382,9 +354,6 @@ public class SetupActivity extends Activity implements OnClickListener {
changeFragment(fragment);
currentFragment = SetupFragmentsEnum.WIZARD_CONFIRM;
-
- next.setVisibility(View.VISIBLE);
- next.setEnabled(false);
back.setVisibility(View.GONE);
}
diff --git a/src/org/linphone/setup/SetupFragmentsEnum.java b/src/org/linphone/setup/SetupFragmentsEnum.java
index 9ef733bac..3d0539814 100644
--- a/src/org/linphone/setup/SetupFragmentsEnum.java
+++ b/src/org/linphone/setup/SetupFragmentsEnum.java
@@ -21,7 +21,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
* @author Sylvain Berfini
*/
public enum SetupFragmentsEnum {
- WELCOME,
MENU,
WIZARD,
WIZARD_CONFIRM,
diff --git a/src/org/linphone/setup/WelcomeFragment.java b/src/org/linphone/setup/WelcomeFragment.java
deleted file mode 100644
index 844faee69..000000000
--- a/src/org/linphone/setup/WelcomeFragment.java
+++ /dev/null
@@ -1,38 +0,0 @@
-package org.linphone.setup;
-/*
-WelcomeFragment.java
-Copyright (C) 2012 Belledonne Communications, Grenoble, France
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-*/
-import org.linphone.R;
-
-import android.app.Fragment;
-import android.os.Bundle;
-import android.view.LayoutInflater;
-import android.view.View;
-import android.view.ViewGroup;
-/**
- * @author Sylvain Berfini
- */
-public class WelcomeFragment extends Fragment {
- @Override
- public View onCreateView(LayoutInflater inflater, ViewGroup container,
- Bundle savedInstanceState) {
- View view = inflater.inflate(R.layout.setup_welcome, container, false);
-
- return view;
- }
-}
diff --git a/src/org/linphone/setup/WizardConfirmFragment.java b/src/org/linphone/setup/WizardConfirmFragment.java
index cdf8e3812..02567c1d1 100644
--- a/src/org/linphone/setup/WizardConfirmFragment.java
+++ b/src/org/linphone/setup/WizardConfirmFragment.java
@@ -28,6 +28,7 @@ import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
+import android.widget.Button;
import android.widget.ImageView;
import android.widget.Toast;
import de.timroes.axmlrpc.XMLRPCCallback;
@@ -48,7 +49,7 @@ public class WizardConfirmFragment extends Fragment {
username = getArguments().getString("Username");
- ImageView checkAccount = (ImageView) view.findViewById(R.id.setup_check);
+ Button checkAccount = (Button) view.findViewById(R.id.setup_check);
checkAccount.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
diff --git a/src/org/linphone/setup/WizardFragment.java b/src/org/linphone/setup/WizardFragment.java
index b56cde764..4c2db89b7 100644
--- a/src/org/linphone/setup/WizardFragment.java
+++ b/src/org/linphone/setup/WizardFragment.java
@@ -43,6 +43,7 @@ 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.ImageView;
import android.widget.TextView;
@@ -61,7 +62,7 @@ public class WizardFragment extends Fragment {
private boolean passwordOk = false;
private boolean emailOk = false;
private boolean confirmPasswordOk = false;
- private ImageView createAccount;
+ private Button createAccount;
private TextView errorMessage;
private char[] acceptedChars = new char[]{ 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z',
'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z',
@@ -120,7 +121,7 @@ public class WizardFragment extends Fragment {
errorMessage = (TextView) view.findViewById(R.id.setup_error);
- createAccount = (ImageView) view.findViewById(R.id.setup_create);
+ createAccount = (Button) view.findViewById(R.id.setup_create);
createAccount.setEnabled(false);
createAccount.setOnClickListener(new OnClickListener() {
public void onClick(View v) {