title: How to make visible ImageView in click EditText
body: <p>I am new for android . I want to make ImageView visible on click of EditText</p>
  
  <pre><code>public void clickHandler(View v) {
      if (v.getId() == R.id.orderQty){
          System.out.println(" edit text click");
          System.out.println(" edit text id    dilshad : "+v.getId());
          int id = v.getId();
          id = R.id.save_on_id;
          System.out.println("save button id on button click     : "+id);
          int rew = id;
          v.setId(id);
          System.out.println("save button set  and get id      : "+ v.getId());
          ImageView imageView = (ImageView)v; 
          imageView.setImageResource(R.drawable.save_on);
          imageView.setVisibility(ImageView.VISIBLE);
      }
  }   
  </code></pre>
  
  <p>This is my xml for Edittext</p>
  
  <pre><code>&lt;EditText
      android:id="@+id/orderQty"
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:clickable="true"
      android:focusable="true"
      android:focusableInTouchMode="false"
      android:onClick="clickHandler" &gt;
  &lt;/EditText&gt;
  </code></pre>
  
  <p>and this ImageView in same xml</p>
  
  <pre><code>&lt;ImageView
      android:id="@+id/save_on_id"
      android:layout_width="50dp"
      android:layout_height="match_parent"
      android:layout_alignParentRight="true"
      android:layout_below="@+id/separator_bottom"
      android:background="#fff"
      android:clickable="true"
      android:visibility="gone"
      android:onClick="clickHandler"
      android:src="@drawable/save_on" /&gt;
  </code></pre>
  
  <p>But i am getting Exception , </p>
  
  <pre><code>02-05 16:01:51.969: W/dalvikvm(10554): threadid=1: thread exiting with uncaught exception (group=0x4001d800)
  02-05 16:01:51.989: E/AndroidRuntime(10554): FATAL EXCEPTION: main
  02-05 16:01:51.989: E/AndroidRuntime(10554): java.lang.IllegalStateException: Could not execute method of the activity
  02-05 16:01:51.989: E/AndroidRuntime(10554):    at android.view.View$1.onClick(View.java:2072)
  02-05 16:01:51.989: E/AndroidRuntime(10554):    at android.view.View.performClick(View.java:2408)
  02-05 16:01:51.989: E/AndroidRuntime(10554):    at android.view.View$PerformClick.run(View.java:8816)
  02-05 16:01:51.989: E/AndroidRuntime(10554):    at android.os.Handler.handleCallback(Handler.java:587)
  02-05 16:01:51.989: E/AndroidRuntime(10554):    at android.os.Handler.dispatchMessage(Handler.java:92)
  02-05 16:01:51.989: E/AndroidRuntime(10554):    at android.os.Looper.loop(Looper.java:123)
  02-05 16:01:51.989: E/AndroidRuntime(10554):    at android.app.ActivityThread.main(ActivityThread.java:4627)
  02-05 16:01:51.989: E/AndroidRuntime(10554):    at java.lang.reflect.Method.invokeNative(Native Method)
  02-05 16:01:51.989: E/AndroidRuntime(10554):    at java.lang.reflect.Method.invoke(Method.java:521)
  02-05 16:01:51.989: E/AndroidRuntime(10554):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
  02-05 16:01:51.989: E/AndroidRuntime(10554):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
  02-05 16:01:51.989: E/AndroidRuntime(10554):    at dalvik.system.NativeStart.main(Native Method)
  02-05 16:01:51.989: E/AndroidRuntime(10554): Caused by: java.lang.reflect.InvocationTargetException
  02-05 16:01:51.989: E/AndroidRuntime(10554):    at com.example.demoekot.MainScreen.clickHandler(MainScreen.java:491)
  02-05 16:01:51.989: E/AndroidRuntime(10554):    at java.lang.reflect.Method.invokeNative(Native Method)
  02-05 16:01:51.989: E/AndroidRuntime(10554):    at java.lang.reflect.Method.invoke(Method.java:521)
  02-05 16:01:51.989: E/AndroidRuntime(10554):    at android.view.View$1.onClick(View.java:2067)
  02-05 16:01:51.989: E/AndroidRuntime(10554):    ... 11 more
  02-05 16:01:51.989: E/AndroidRuntime(10554): Caused by: java.lang.ClassCastException: android.widget.EditText
  02-05 16:01:51.989: E/AndroidRuntime(10554):    ... 15 more
  02-05 16:01:55.189: I/Process(10554): Sending signal. PID: 10554 SIG: 9
  </code></pre>
  
  <p>What is issue please some one help me to get me out of thus problem. Thanks in advance to all. </p>