本文整理匯總了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();
}
}
}
示例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();
}
}
}
示例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);
}
}
示例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));
}
}
示例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);
}
示例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);
}
}
示例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);
}
});
}
示例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();
}
}
示例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));
}
}
示例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);
}
示例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);
}
}
示例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);
}
示例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));
}
}
示例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());
}