我希望我的圆圈运行图形缠绕。我该怎么办? 这段代码对角运行。
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_move);
final MyCustomPanel view = new MyCustomPanel(this);
ViewGroup.LayoutParams params =
new ViewGroup.LayoutParams(LinearLayout.LayoutParams.FILL_PARENT,
LinearLayout.LayoutParams.FILL_PARENT);
addContentView(view, params);
findViewById(R.id.btB).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
for (int i=1;i<=1000;i++){
x = i;
y = i;
view.animate().x(x).y(y).setDuration(5000).start();
}
}
});
答案 0 :(得分:0)