disabled button
<p>My problem: I wanna make an activity contains spinner and editBox &amp; button I wanna make the button disabled until the user fill the box and choose an item from spinner. 
I wrote it check the if empty it disable the button but when i fill the box the button still disabled..!!the second problem : when I put hint into edite box it read it when check if the box is empty!! 
and how can I check the spinner if selected or not ??
*value is the name of editText
*enterBtn is the name of button.</p>

<pre><code>    if(x.matches("")){
                enterBtn.setEnabled(false);
                 onStart();
            }else {
                enterBtn.setEnabled(true);
            }
            enterBtn.setOnClickListener(new OnClickListener(){

                public void onClick(View arg0) {
                    // TODO Auto-generated method stub


                if(Integer.valueOf(x)&gt;(70)){
                Value.setText("plz dont enter more than 500");
                    }else{
........
...}
</code></pre>
