您好
我尝试了<ListView.itemTemplate>
<GridLayout rows="*" columns="*">
<Label row="0" col="0" text="right aligned text" textAlignment="right" textWrap="true" />
</GridLayout>
</ListView.itemTemplate>
GitHub
(https://github.com/Jawnnypoo/PhysicsLayout/),我遇到了这个问题,
当启用投掷并尝试将ImageView抛出屏幕外时,ImageView会脱离界限
这是我的代码:
PhysicsLayout
XML :
public class Main extends AppCompatActivity {
private ImageView ball;
PhysicsRelativeLayout physicsLayout;
private int ballX;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
setContentView(R.layout.activity_main);
physicsLayout = (PhysicsRelativeLayout)findViewById(R.id.physics_layout);
physicsLayout.getPhysics().enablePhysics();
physicsLayout.getPhysics().enableFling();
ball = (ImageView)findViewById(R.id.ball);
}
导致此问题的原因是什么还是可以修复它?