當前位置: 首頁>>代碼示例>>Java>>正文


Java ImageView.post方法代碼示例

本文整理匯總了Java中android.widget.ImageView.post方法的典型用法代碼示例。如果您正苦於以下問題:Java ImageView.post方法的具體用法?Java ImageView.post怎麽用?Java ImageView.post使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在android.widget.ImageView的用法示例。


在下文中一共展示了ImageView.post方法的14個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: setScale

import android.widget.ImageView; //導入方法依賴的package包/類
@Override
public void setScale(float scale, float focalX, float focalY,
                     boolean animate) {
    ImageView imageView = getImageView();

    if (null != imageView) {
        if (scale < mMinScale || scale > mMaxScale) {
            return;
        }

        if (animate) {
            imageView.post(new AnimatedZoomRunnable(getScale(), scale,
                    focalX, focalY));
        } else {
            mSuppMatrix.setScale(scale, scale, focalX, focalY);
            checkAndDisplayMatrix();
        }
    }
}
 
開發者ID:WeiXinqiao,項目名稱:Recognize-it,代碼行數:20,代碼來源:PhotoViewAttacher.java

示例2: setScale

import android.widget.ImageView; //導入方法依賴的package包/類
@Override
public void setScale(float scale, float focalX, float focalY,
                     boolean animate) {
    ImageView imageView = getImageView();

    if (null != imageView) {
        // Check to see if the scale is within bounds
        if (scale < mMinScale || scale > mMaxScale) {
            LogManager
                    .getLogger()
                    .i(LOG_TAG,
                            "Scale must be within the range of minScale and maxScale");
            return;
        }

        if (animate) {
            imageView.post(new AnimatedZoomRunnable(getScale(), scale,
                    focalX, focalY));
        } else {
            mSuppMatrix.setScale(scale, scale, focalX, focalY);
            checkAndDisplayMatrix();
        }
    }
}
 
開發者ID:wuhighway,項目名稱:DailyStudy,代碼行數:25,代碼來源:PhotoViewAttacher.java

示例3: onFling

import android.widget.ImageView; //導入方法依賴的package包/類
@Override
public final void onFling(float startX, float startY, float velocityX,
		float velocityY) {
	if (DEBUG) {
		Log.d(LOG_TAG, "onFling. sX: " + startX + " sY: " + startY
				+ " Vx: " + velocityX + " Vy: " + velocityY);
	}

	ImageView imageView = getImageView();
	if (hasDrawable(imageView)) {
		mCurrentFlingRunnable = new FlingRunnable(imageView.getContext());
		mCurrentFlingRunnable.fling(imageView.getWidth(),
				imageView.getHeight(), (int) velocityX, (int) velocityY);
		imageView.post(mCurrentFlingRunnable);
	}
}
 
開發者ID:fengdongfei,項目名稱:CXJPadProject,代碼行數:17,代碼來源:PhotoViewAttacher.java

示例4: zoomTo

import android.widget.ImageView; //導入方法依賴的package包/類
@Override
public final void zoomTo(float scale, float focalX, float focalY) {
	ImageView imageView = getImageView();

	if (null != imageView) {
		imageView.post(new AnimatedZoomRunnable(getScale(), scale, focalX, focalY));
	}
}
 
開發者ID:mangestudio,項目名稱:GCSApp,代碼行數:9,代碼來源:PhotoViewAttacher.java

示例5: onFling

import android.widget.ImageView; //導入方法依賴的package包/類
@Override
public void onFling(float startX, float startY, float velocityX,
                    float velocityY) {
    if (DEBUG) {
        LogManager.getLogger().d(
                LOG_TAG,
                "onFling. sX: " + startX + " sY: " + startY + " Vx: "
                        + velocityX + " Vy: " + velocityY);
    }
    ImageView imageView = getImageView();
    mCurrentFlingRunnable = new FlingRunnable(imageView.getContext());
    mCurrentFlingRunnable.fling(getImageViewWidth(imageView),
            getImageViewHeight(imageView), (int) velocityX, (int) velocityY);
    imageView.post(mCurrentFlingRunnable);
}
 
開發者ID:weiwenqiang,項目名稱:GitHub,代碼行數:16,代碼來源:PhotoViewAttacher.java

示例6: onFling

import android.widget.ImageView; //導入方法依賴的package包/類
@Override
public final void onFling(float startX, float startY, float velocityX, float velocityY) {
	if (DEBUG) {
		Log.d(LOG_TAG, "onFling. sX: " + startX + " sY: " + startY + " Vx: " + velocityX
				+ " Vy: " + velocityY);
	}

	ImageView imageView = getImageView();
	if (hasDrawable(imageView)) {
		mCurrentFlingRunnable = new FlingRunnable(imageView.getContext());
		mCurrentFlingRunnable.fling(imageView.getWidth(), imageView.getHeight(),
				(int) velocityX, (int) velocityY);
		imageView.post(mCurrentFlingRunnable);
	}
}
 
開發者ID:mangestudio,項目名稱:GCSApp,代碼行數:16,代碼來源:PhotoViewAttacher.java

示例7: initViews

import android.widget.ImageView; //導入方法依賴的package包/類
@Override
protected void initViews(){
    super.initViews();
    facebookLogin.setCompoundDrawablesWithIntrinsicBounds(0,0,0,0);
    facebookLogin.setBackgroundResource(R.drawable.ic_facebook);

    if (integratedWithFacebook)
    {

        facebookLogin.setReadPermissions(Arrays.asList("email", "user_friends"));
    }

    btnLogin = (Button) findViewById(R.id.chat_sdk_btn_login);
    btnAnon = (Button) findViewById(R.id.chat_sdk_btn_anon_login);
    btnTwitter = (Button) findViewById(R.id.chat_sdk_btn_twitter_login);
    btnReg = (Button) findViewById(R.id.chat_sdk_btn_register);
    etEmail = (EditText) findViewById(R.id.chat_sdk_et_mail);
    etPass = (EditText) findViewById(R.id.chat_sdk_et_password);

    appIconImage = (ImageView) findViewById(R.id.app_icon);

    appIconImage.post(new Runnable() {
        @Override
        public void run() {
            appIconImage.setVisibility(View.VISIBLE);
        }
    });
}
 
開發者ID:MobileDev418,項目名稱:AndroidBackendlessChat,代碼行數:29,代碼來源:ChatSDKLoginActivity.java

示例8: setScale

import android.widget.ImageView; //導入方法依賴的package包/類
public void setScale(float scale, float focalX, float focalY, boolean animate) {
    ImageView imageView = getImageView();
    if (imageView == null) {
        return;
    }
    if (scale < this.mMinScale || scale > this.mMaxScale) {
        LogManager.getLogger().i(LOG_TAG, "Scale must be within the range of minScale and maxScale");
    } else if (animate) {
        imageView.post(new AnimatedZoomRunnable(this, getScale(), scale, focalX, focalY));
    } else {
        this.mSuppMatrix.setScale(scale, scale, focalX, focalY);
        checkAndDisplayMatrix();
    }
}
 
開發者ID:JackChan1999,項目名稱:boohee_v5.6,代碼行數:15,代碼來源:PhotoViewAttacher.java

示例9: zoomTo

import android.widget.ImageView; //導入方法依賴的package包/類
@Override
public final void zoomTo(float scale, float focalX, float focalY) {
    ImageView imageView = getImageView();

    if (null != imageView) {
        imageView.post(new AnimatedZoomRunnable(getScale(), scale, focalX, focalY));
    }
}
 
開發者ID:liuke2016,項目名稱:filepicker,代碼行數:9,代碼來源:PhotoViewAttacher.java

示例10: onFling

import android.widget.ImageView; //導入方法依賴的package包/類
public void onFling(float startX, float startY, float velocityX, float velocityY) {
    if (DEBUG) {
        LogManager.getLogger().d(LOG_TAG, "onFling. sX: " + startX + " sY: " + startY + " Vx: " + velocityX + " Vy: " + velocityY);
    }
    ImageView imageView = getImageView();
    this.mCurrentFlingRunnable = new FlingRunnable(this, imageView.getContext());
    this.mCurrentFlingRunnable.fling(getImageViewWidth(imageView), getImageViewHeight(imageView), (int) velocityX, (int) velocityY);
    imageView.post(this.mCurrentFlingRunnable);
}
 
開發者ID:JackChan1999,項目名稱:boohee_v5.6,代碼行數:10,代碼來源:PhotoViewAttacher.java

示例11: onFling

import android.widget.ImageView; //導入方法依賴的package包/類
@Override
public final void onFling(float startX, float startY, float velocityX, float velocityY) {
	if (DEBUG) {
		Log.d(LOG_TAG, "onFling. sX: " + startX + " sY: " + startY + " Vx: " + velocityX + " Vy: " + velocityY);
	}

	ImageView imageView = getImageView();
	if (hasDrawable(imageView)) {
		mCurrentFlingRunnable = new FlingRunnable(imageView.getContext());
		mCurrentFlingRunnable.fling(imageView.getWidth(), imageView.getHeight(), (int) velocityX, (int) velocityY);
		imageView.post(mCurrentFlingRunnable);
	}
}
 
開發者ID:starn,項目名稱:encdroidMC,代碼行數:14,代碼來源:PhotoViewAttacher.java

示例12: onFling

import android.widget.ImageView; //導入方法依賴的package包/類
@Override
public void onFling(float startX, float startY, float velocityX,
                    float velocityY) {
    ImageView imageView = getImageView();
    mCurrentFlingRunnable = new FlingRunnable(imageView.getContext());
    mCurrentFlingRunnable.fling(getImageViewWidth(imageView),
            getImageViewHeight(imageView), (int) velocityX, (int) velocityY);
    imageView.post(mCurrentFlingRunnable);
}
 
開發者ID:Loofer,項目名稱:Watermark,代碼行數:10,代碼來源:PhotoViewAttacher.java

示例13: zoomTo

import android.widget.ImageView; //導入方法依賴的package包/類
@Override
public final void zoomTo(float scale, float focalX, float focalY) {
	ImageView imageView = getImageView();

	if (null != imageView) {
		imageView.post(new AnimatedZoomRunnable(getScale(), scale, focalX,
				focalY));
	}
}
 
開發者ID:fengdongfei,項目名稱:CXJPadProject,代碼行數:10,代碼來源:PhotoViewAttacher.java

示例14: getLiveView

import android.widget.ImageView; //導入方法依賴的package包/類
public void getLiveView(final ImageView imageView)
{
	Command command = new Command(Command.EOS_OC_GetLiveViewPicture, session,0x00100000);
	write(command.data, command.length, DEFAULT_TIMEOUT);				
	byte buf[] = read(DEFAULT_TIMEOUT);
	Data item = new Data(true, buf, this); 

	int totalLength = item.getLength();
	int left = totalLength - buf.length;

	int needToRead = (left/inMaxPS);
	
	if((left%inMaxPS) != 0)
		needToRead++;
	
	byte imageBuf[] = new byte[inMaxPS*(needToRead+1)];
	
	System.arraycopy(buf,0,imageBuf,0,512);
	
	for (int i=0; i<(needToRead); i++)
	{

		buf = read(DEFAULT_TIMEOUT);
		System.arraycopy(buf,0,imageBuf,512*(i+1),512);


	}
	Data completedData = new Data(true, imageBuf, this); 	
	
	final Bitmap bMap = BitmapFactory.decodeByteArray(completedData.data, 20, completedData.getLength()-20);
	Bitmap scaled = Bitmap.createScaledBitmap(bMap, bMap.getWidth()/10, bMap.getHeight()/10, false);
	
	imageView.post(new Runnable(){

		@Override
		public void run() {
			imageView.setImageBitmap(bMap); 
			imageView.invalidate(); 
			
		}
		
	});
	/*
	tv6.setText(" Height:"+bMap.getHeight());
	tv6.append(" Width:"+bMap.getWidth());
	*/
	byte buf1[] = read(DEFAULT_TIMEOUT);

	Response response = new Response (buf1, inMaxPS, this);
	//tv6.append(response.toString());

	
}
 
開發者ID:iyundong,項目名稱:InstantUpload,代碼行數:54,代碼來源:EosInitiator.java


注:本文中的android.widget.ImageView.post方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。