Example #1
0
 @Override
 public boolean onSingleTapConfirmed(MotionEvent e) {
   LogUtil.logAnyTime(TAG, "onSingleTapConfirmed");
   Object id = getTag() == null ? "" : getTag();
   mPage.interpreter("ShowBox::" + id.toString(), (itemExps.get(currentIndex)).toString());
   return true;
 }
Example #2
0
  @Override
  public String doX() {
    String url = Constant.getAlipayServer(mContext);
    url = url + "/mobileFile.htm";
    APHttpClient aPHttpClient = new APHttpClient(url, mContext);
    ArrayList<BasicNameValuePair> pairs = new ArrayList<BasicNameValuePair>();
    pairs.add(new BasicNameValuePair("requestData", buildRequestAsString()));
    pairs.add(new BasicNameValuePair(ServiceBeanConstants.FILECONTENT, fileContent));

    LogUtil.logOnlyDebuggable(
        "HttpClient", "Request" + buildRequestAsString() + ";fileContent:" + fileContent);
    String response = aPHttpClient.sendSynchronousRequestAsHttpResponse(pairs);
    extractBasicResponse(response);
    return response;
  }
Example #3
0
 @Override
 public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX, float velocityY) {
   LogUtil.logAnyTime(TAG, "onFling");
   if (showBox_Type == UISHOWBOX_H) {
     if (e1.getX() > e2.getX()) { // move to left
       flipper.showNext();
       currentIndex += 1;
       if (currentIndex == uris.size()) {
         currentIndex = 0;
       }
     } else if (e1.getX() < e2.getX()) {
       flipper.setInAnimation(mPage.getRawContext(), R.anim.push_right_in);
       flipper.setOutAnimation(mPage.getRawContext(), R.anim.push_right_out);
       flipper.showPrevious();
       flipper.setInAnimation(mPage.getRawContext(), R.anim.push_left_in);
       flipper.setOutAnimation(mPage.getRawContext(), R.anim.push_left_out);
       currentIndex -= 1;
       if (currentIndex == -1) {
         currentIndex = uris.size() - 1;
       }
     } else {
       return false;
     }
   } else {
     if (e1.getY() < e2.getY()) { // move to bottom
       System.out.println("onFling" + "1");
       flipper.showNext();
     } else if (e1.getY() > e2.getY()) {
       flipper.setInAnimation(mPage.getRawContext(), R.anim.push_bottom_in);
       flipper.setOutAnimation(mPage.getRawContext(), R.anim.push_bottom_out);
       flipper.showPrevious();
       flipper.setInAnimation(mPage.getRawContext(), R.anim.push_top_in);
       flipper.setOutAnimation(mPage.getRawContext(), R.anim.push_top_out);
     } else {
       return false;
     }
   }
   return true;
 }
Example #4
0
 // OnTouchListener实现的接口
 @Override
 public boolean onTouch(View v, MotionEvent event) {
   LogUtil.logAnyTime(TAG, "onTouch");
   return mGestureDetector.onTouchEvent(event);
 }
Example #5
0
 @Override
 public boolean onSingleTapUp(MotionEvent e) {
   LogUtil.logAnyTime(TAG, "onSingleTapUp");
   return false;
 }
Example #6
0
 @Override
 public void onShowPress(MotionEvent e) {
   LogUtil.logAnyTime(TAG, "onShowPress");
 }
Example #7
0
 @Override
 public boolean onScroll(MotionEvent e1, MotionEvent e2, float distanceX, float distanceY) {
   LogUtil.logAnyTime(TAG, "onScroll");
   return false;
 }
Example #8
0
 // OnGestureListener实现的接口
 @Override
 public boolean onDown(MotionEvent e) {
   LogUtil.logAnyTime(TAG, "onDown");
   return true;
 }
Example #9
0
 @Override
 public boolean onDoubleTapEvent(MotionEvent e) {
   LogUtil.logAnyTime(TAG, "onDoubleTapEvent");
   return false;
 }