当前位置: 首页>>代码示例>>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;未经允许,请勿转载。