private void movePlane() {
// TODO Auto-generated method stub
spielbereich = (FrameLayout) findViewById(R.id.spielbereich);
int nummer = 0;
while (nummer<spielbereich.getChildCount()) {
ImageView muecke = (ImageView) spielbereich.getChildAt(nummer);
if (muecke.getTag() == AIRPLANE ){
FrameLayout.LayoutParams params = (android.widget.FrameLayout.LayoutParams) muecke.getLayoutParams();
params.leftMargin -= 10;
muecke.setLayoutParams(params);
nummer ++;}
}
}
Hello, I want to just move the ImageView with the specific tag, but when I do it like this the app would crash. In the layout there is one permanent ImageView. The others are created within the Activity. Can anyone help with that?