本文整理了Java中android.widget.ImageButton.setScaleX()
方法的一些代码示例,展示了ImageButton.setScaleX()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ImageButton.setScaleX()
方法的具体详情如下:
包路径:android.widget.ImageButton
类名称:ImageButton
方法名:setScaleX
暂无
代码示例来源:origin: nickbutcher/plaid
private void showFab() {
fab.setAlpha(0f);
fab.setScaleX(0f);
fab.setScaleY(0f);
fab.setTranslationY(fab.getHeight() / 2);
fab.animate()
.alpha(1f)
.scaleX(1f)
.scaleY(1f)
.translationY(0f)
.setDuration(300L)
.setInterpolator(AnimUtils.getLinearOutSlowInInterpolator(this))
.start();
}
代码示例来源:origin: 6ag/BaoKanAndroid
@Override
public void onSpringUpdate(Spring spring) {
float value = (float) spring.getCurrentValue();
float scale = value * 2f;
mCollectionButton.setScaleX(scale);
mCollectionButton.setScaleY(scale);
}
});
代码示例来源:origin: 6ag/BaoKanAndroid
@Override
public void onSpringUpdate(Spring spring) {
float value = (float) spring.getCurrentValue();
float scale = value * 2f;
mCollectionButton.setScaleX(scale);
mCollectionButton.setScaleY(scale);
}
});
代码示例来源:origin: stackoverflow.com
private void setupBalloon(ImageButton b, int i) {
int imageId = (int)(Math.random() * images.length);
LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.WRAP_CONTENT,
LinearLayout.LayoutParams.WRAP_CONTENT);
b.setLayoutParams(params);
b.setImageResource(images[imageId]);
b.setBackgroundColor(Color.TRANSPARENT);
b.setScaleX(0.4f);
b.setScaleY(0.4f);
b.setX((float) (Math.random() * (width - b.getWidth())));
b.setY((float) (Math.random() * (height - b.getHeight())));
b.setVisibility(View.VISIBLE);
}
代码示例来源:origin: WangDaYeeeeee/Mysplash
@Override
protected void applyTransformation(float interpolatedTime, Transformation t) {
super.applyTransformation(interpolatedTime, t);
float scale = fromScale + (toScale - fromScale) * interpolatedTime;
float alpha = fromAlpha + (0 - fromAlpha) * interpolatedTime;
bellBtn.setScaleX(scale);
bellBtn.setScaleY(scale);
bellBtn.setAlpha(alpha);
dot.setAlpha(alpha);
}
}
代码示例来源:origin: WangDaYeeeeee/Mysplash
@Override
protected void applyTransformation(float interpolatedTime, Transformation t) {
super.applyTransformation(interpolatedTime, t);
float scale = (float) (0.5 + 0.5 * interpolatedTime);
float alpha = 0 + 1 * interpolatedTime;
bellBtn.setScaleX(scale);
bellBtn.setScaleY(scale);
bellBtn.setAlpha(alpha);
dot.setAlpha(alpha);
}
}
代码示例来源:origin: NightscoutFoundation/xDrip
((ViewGroup.MarginLayoutParams) btnApprove.getLayoutParams()).rightMargin = 0;
((ViewGroup.MarginLayoutParams) btnCancel.getLayoutParams()).rightMargin = 0;
btnApprove.setScaleX(button_scale_factor);
btnApprove.setScaleY(button_scale_factor);
btnCancel.setScaleX(button_scale_factor);
btnCancel.setScaleY(button_scale_factor);
btnInsulinDose.setScaleX(button_scale_factor);
btnCarbohydrates.setScaleX(button_scale_factor);
btnCarbohydrates.setScaleY(button_scale_factor);
btnBloodGlucose.setScaleX(button_scale_factor);
btnBloodGlucose.setScaleY(button_scale_factor);
btnInsulinDose.setScaleY(button_scale_factor);
btnTime.setScaleX(button_scale_factor);
btnTime.setScaleY(button_scale_factor);
代码示例来源:origin: marzika/Snapprefs
upload.setScaleX((float) 0.65);
upload.setScaleY((float) 0.65);
upload.setOnClickListener(new View.OnClickListener() {
代码示例来源:origin: jamorham/xDrip-plus
((ViewGroup.MarginLayoutParams) btnApprove.getLayoutParams()).rightMargin = 0;
((ViewGroup.MarginLayoutParams) btnCancel.getLayoutParams()).rightMargin = 0;
btnApprove.setScaleX(button_scale_factor);
btnApprove.setScaleY(button_scale_factor);
btnCancel.setScaleX(button_scale_factor);
btnCancel.setScaleY(button_scale_factor);
btnInsulinDose.setScaleX(button_scale_factor);
btnCarbohydrates.setScaleX(button_scale_factor);
btnCarbohydrates.setScaleY(button_scale_factor);
btnBloodGlucose.setScaleX(button_scale_factor);
btnBloodGlucose.setScaleY(button_scale_factor);
btnInsulinDose.setScaleY(button_scale_factor);
btnTime.setScaleX(button_scale_factor);
btnTime.setScaleY(button_scale_factor);
代码示例来源:origin: appnexus/mobile-sdk-android
if (sdk >= android.os.Build.VERSION_CODES.JELLY_BEAN_MR1) {
Drawable play = adActivity.getResources().getDrawable(android.R.drawable.ic_media_play).mutate();
back.setScaleX(-1);
back.setLayoutDirection(ImageButton.LAYOUT_DIRECTION_RTL);
back.setImageDrawable(play);
代码示例来源:origin: AppLozic/Applozic-Android-SDK
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {
if (config.getLayoutDirection() == View.LAYOUT_DIRECTION_RTL) {
sendButton.setScaleX(-1);
mainEditTextLinearLayout.setBackgroundResource(R.drawable.applozic_chat_left_icon);
audioRecordFrameLayout.setBackgroundResource(R.drawable.applozic_chat_left_icon);
代码示例来源:origin: marzika/Snapprefs
textButton.setBackgroundColor(0);
textButton.setImageDrawable(mResources.getDrawable(R.drawable.triangle));
textButton.setScaleX((float) 0.4);
textButton.setScaleY((float) 0.4);
textButton.setOnClickListener(new View.OnClickListener() {
speed.setBackgroundColor(0);
speed.setImageDrawable(mResources.getDrawable(R.drawable.speed));
speed.setScaleX((float) 0.4);
speed.setScaleY((float) 0.4);
speed.setOnClickListener(new View.OnClickListener() {
weather.setBackgroundColor(0);
weather.setImageDrawable(mResources.getDrawable(R.drawable.weather));
weather.setScaleX((float) 0.4);
weather.setScaleY((float) 0.4);
weather.setOnClickListener(new View.OnClickListener() {
location.setBackgroundColor(0);
location.setImageDrawable(mResources.getDrawable(R.drawable.location));
location.setScaleX((float) 0.4);
location.setScaleY((float) 0.4);
location.setOnClickListener(new View.OnClickListener() {
内容来源于网络,如有侵权,请联系作者删除!