本文整理汇总了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());
}