【发布时间】:2013-12-11 16:12:40
【问题描述】:
我在 XML 中有相对布局。按下按钮后,我正在添加视图:
LayoutInflater inflater =
(LayoutInflater)this.getSystemService( Context.LAYOUT_INFLATER_SERVICE );
View iv = inflater.inflate( R.layout.motor_block, null );
//LinearLayout iv = (LinearLayout) findViewById(R.id.motor_block);
RelativeLayout rl = (RelativeLayout) findViewById(R.id.layout);
rl.addView(iv);
然后我使用 OnTouch 单独拖动每个视图。是否可以将所有视图作为一个组添加平移和缩放?
【问题讨论】: