title: How to reduce delay of the pop up window in android?
body: <p><a href="http://i.stack.imgur.com/ojuMm.jpg" rel="nofollow">This program output picture</a> </p>
  
  <p>You all see the above picture and run the below code.</p>
  
  <pre><code>public class NewClass extends View{
  
      float initialX,initialY;
      View view;
      Paint paint;
      TextView txtView;
      PopupWindow pop;
      public NewClass(Context context)
      {
          super(context);
          paint=new Paint();
          view=new View(context);
  
          txtView = new TextView(getContext());
          pop = new PopupWindow(getContext());
  
          txtView.setTextSize(10);
          txtView.setText("sss");
          txtView.setTypeface(null, Typeface.BOLD);
          txtView.setGravity(Gravity.CENTER);
          txtView.setBackgroundColor(Color.MAGENTA);
  
          pop.setContentView(txtView);
          pop.setHeight(20);
          pop.setWidth(40);
          OnTouchChild();
  
      }
  
      public void OnTouchChild() {
  
          this.setOnTouchListener(new View.OnTouchListener() {
              @Override
              public boolean onTouch(View v, MotionEvent event) {
  
                  switch (event.getAction() &amp; MotionEvent.ACTION_MASK) {
                      case MotionEvent.ACTION_DOWN:
                          initialX = event.getX();
                          initialY = event.getY();
  
                          if (pop.isShowing()) {
                              pop.dismiss();
                          }
                  String s=String.valueOf(initialX);
                  txtView.setText(s);
  
                          pop.showAsDropDown(view,100,100,Gravity.CENTER);
  
                          break;
  
                      case MotionEvent.ACTION_MOVE:
                          initialX = event.getX();
                          initialY = event.getY();
  
                          if (pop.isShowing())
                              pop.dismiss();
  
                          String s1=String.valueOf(initialX);
  
                          txtView.setText(s1);
  
                          pop.showAsDropDown(view,100,100,Gravity.CENTER);
                  }
                  return true;
              }
          });
      }
  }
  </code></pre>
  
  <p>You use both action down and action move options of above coding.</p>
  
  <p>my question is how to reduce the delay of showing Pop Up window?</p>
  
  <p>please who all knows answer me.!</p>