Q:

Content of Edittext not getting changed

I am using an Edtitext in my code and its declaration inside main is as follows:
<EditText 
    android:layout_width="fill_parent" 
    android:layout_height="wrap_content" 
    android:id="@+id/url" 
    android:text="http://192.168.1.42:8080/NotifyServlet/serv"
    />

as i want one default value for my edittext.
but even after i am changing the value of it at run time and passing it as a parameter to another service its original value which i set in main.xml is getting passed.
Can anyone please suggest how should i handle it.
Thanks!!

A:

I can only assume you execute
String url_server = url.getText().toString();

before actual value is set. This should be run in onClickListener()

