long m = Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory();
DecimalFormat df = new DecimalFormat("#,##0");
Log.v(null, "using mem : "+df.format(m));
long m = Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory();
DecimalFormat df = new DecimalFormat("#,##0");
Log.v(null, "using mem : "+df.format(m));
Button btn = (Button) this.fv.findViewById(R.id.btn1);
int x = btn.getLeft();
int y = btn.getTop();
TranslateAnimation moveAnim = new TranslateAnimation(1000, x, y, y);
//화면밖에서 가로로 이동하여 xml layout의 위치로 이동.
moveAnim.setDuration(1000); //1초간
moveAnim.setFillAfter(true); // 애니메이션이 끝난 후, 타겟오브젝트는 애니메이션이 끝난 자리에
moveAnim.setInterpolator(AnimationUtils.loadInterpolator(this.context, android.R.anim.overshoot_interpolator));
btn.setAnimation(moveAnim);
RelativeLayout fl = new RelatedLayout(this);
fl.setBackgroundColor(Color.BLUE);
TextView tv = new TextView(this);
tv.setText("Set Text");
tv.setBackgroundColor(Color.WHITE);
tv.setHeight(100);
tv.setWidth(100);
tv.setGravity(Gravity.CENTER);
LayoutParams lp2 =
new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);
lp2.addRule(RelativeLayout.CENTER_IN_PARENT);
fl.addView(tv, lp2);