0
我在Android Studio中製作一個音樂播放器,我想這樣做如何設置ImageView的尺寸
Here's an ugly draw of what I'm attempting to do
黑色矩形是手機。我已經制作了黃色部分,現在我必須將imageview設置爲draw中的一個,但我不明白我必須輸入哪種屬性。
這是我所做的代碼:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<include
android:layout_width="match_parent"
android:layout_height="wrap_content"
layout="@layout/song"
android:layout_gravity="top" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/img_album_cover"
android:layout_gravity="center" />
<include
android:layout_width="match_parent"
android:layout_height="wrap_content"
layout="@layout/song_playback_buttons"
android:layout_gravity="bottom"/>
</LinearLayout>
預先感謝您爲我的英語不好(我是意大利人)對不起。
哇謝謝你,這是非常有用的! 現在它似乎很好! –
很高興能幫到你! – Guardanis