Вы можете использовать ObjectAnimator
для анимации хода ProgressBar
:
ObjectAnimator animation = ObjectAnimator.ofInt(pb, "progress", 0, 100);
animation.setDuration(5000);
animation.setInterpolator(new DecelerateInterpolator());
animation.addListener(new Animator.AnimatorListener() {
@Override
public void onAnimationStart(Animator animator) { }
@Override
public void onAnimationEnd(Animator animator) {
//do something when the countdown is complete
}
@Override
public void onAnimationCancel(Animator animator) { }
@Override
public void onAnimationRepeat(Animator animator) { }
});
animation.start();
Существует недокументированная, но хорошо известная хранимая процедура sp_msforeachtable:
exec sp_msforeachtable 'alter table ? add flag bit not null default 0';
Нет, это ручной цикл.
Или вы, конечно, можете создать один оператор SQL ...
SELECT
'ALTER TABLE ' + T.name + ' ADD foo int NULL'
FROM
sys.tables AS T
WHERE
T.is_ms_shipped = 0
Или недокументированный
EXEC sys.sp_MSforeachtable 'ALTER TABLE ? ADD foo int NULL'