Android - Rotating an ImageView with finger moves other views around

后端 未结 3 1489
时光取名叫无心
时光取名叫无心 2021-02-03 12:15

I\'ve been learning Android for about two weeks now (expert in as2/3).

I have created a simple LinearLayout1, which contains anImageView`, containing a png

3条回答
  •  自闭症患者
    2021-02-03 12:17

    Actually thats because you try to rotate a view in a linear layout. And this will cause its dedicated space to expand or shrink.

    Idea 1: try using a frame layout have and your view rotate inside there Idea 2: try a custom view subclass and draw your turntable in the onDraw. In the internet look for a compass drawing example for start.

提交回复
热议问题