/ / Androidのビュー要素が回転していないのはなぜですか - android、xml、android-layout

Androidのビュー要素が回転する理由は何ですか - android、xml、android-layout

相対レイアウトの内側のフレームレイアウトの内側に画像ボタンがあります。画像ボタンに以下を追加します android:rotation="-90" しかし、画像ボタンは変更されていないようです。 階層を表示 ここに画像の説明を入力 XML

<ImageButton
android:id="@+id/profile_pic_btn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:background="@drawable/round_profile_pic_btn"
android:contentDescription="profile picture button"
android:padding="20dp"
android:rotation="-90"
android:layout_gravity="center"
android:src="@drawable/ic_face_black_48dp"/>

<com.github.lzyzsd.circleprogress.DonutProgress
android:id="@+id/donut_progress"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
custom:donut_progress="70"
custom:donut_text_size="0dp"
android:layout_alignTop="@+id/profile_pic_btn"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_above="@+id/textView5"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"
android:layout_gravity="center" />

ここに画像の説明を入力

回答:

回答№1は0

担当者がいないため、コメントとして投稿できませんでしたまだ。エミュレータや実​​際のデバイスで試しましたか?私はあなたのxmlをコピーし(circleprogress.DonutProgressのものを除く)、それはエミュレータとデバイスで動作しました。

ただし、デザインモードでは効果は見えません。