diff --git a/res/layout/test_layout.xml b/res/layout/test_layout.xml index dd0f0774e37f27ebb3c278f8f35e79cbbda5d1f9..2580aad5f15dca3ce80fb7fc1fc9609dd4edc1ed 100644 --- a/res/layout/test_layout.xml +++ b/res/layout/test_layout.xml @@ -50,44 +50,31 @@ as that of the covered work. android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentLeft="true" + android:layout_alignBottom="@+id/editAccountID" + android:gravity="center_vertical" android:layout_below="@+id/buttonInit" android:text="AccountID" android:ems="10" /> - <EditText + <TextView android:id="@+id/editAccountID" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentRight="true" android:layout_toRightOf="@+id/textAccountID" android:layout_below="@+id/buttonInit" + android:text="IP2IP" android:ems="10" /> - - <TextView - android:id="@+id/textCallID" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_alignParentLeft="true" - android:layout_below="@+id/editAccountID" - android:text="callID" - android:ems="10" /> - - <EditText - android:id="@+id/editCallID" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_alignParentRight="true" - android:layout_toRightOf="@+id/textCallID" - android:layout_below="@+id/editAccountID" - android:ems="10" /> - + <TextView android:id="@+id/textTo" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentLeft="true" - android:layout_below="@+id/editCallID" - android:text="to" + android:layout_alignBottom="@+id/editTo" + android:gravity="center_vertical" + android:layout_below="@+id/editAccountID" + android:text="to IP address" android:ems="10" /> <EditText @@ -96,7 +83,7 @@ as that of the covered work. android:layout_height="wrap_content" android:layout_alignParentRight="true" android:layout_toRightOf="@+id/textTo" - android:layout_below="@+id/editCallID" + android:layout_below="@+id/editAccountID" android:ems="10" /> <Button diff --git a/src/com/savoirfairelinux/sflphone/client/SFLPhoneHome.java b/src/com/savoirfairelinux/sflphone/client/SFLPhoneHome.java index dad5be5d3a91f6e713f213550be39e67ae3cfb74..1cda9153586310b7ddb978ee6e47fc959c9de2c2 100644 --- a/src/com/savoirfairelinux/sflphone/client/SFLPhoneHome.java +++ b/src/com/savoirfairelinux/sflphone/client/SFLPhoneHome.java @@ -279,19 +279,10 @@ public class SFLPhoneHome extends Activity implements ActionBar.TabListener, OnC { switch (view.getId()) { case R.id.buttonCall: - EditText editText = (EditText) findViewById(R.id.editAccountID); - String accountID = editText.getText().toString(); - if (accountID == null) { - Log.e(TAG, "accountID is " + accountID); - break; - } - - editText = (EditText) findViewById(R.id.editCallID); - String callID = editText.getText().toString(); - if (callID == null) { - Log.e(TAG, "callID is " + callID); - break; - } + String callID = "007"; + TextView textView = (TextView) findViewById(R.id.editAccountID); + String accountID = textView.getText().toString(); + EditText editText; editText = (EditText) findViewById(R.id.editTo); String to = editText.getText().toString();