ここで何が起こっているのかを理解するのに本当に苦労しています。レイアウトを記述した次のxmlファイルがあります。
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<SurfaceView android:id="@+id/surface"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center">
</SurfaceView>
<TextView android:id="@+id/text_kb_streamed"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:textStyle="bold"
android:text="Streaming .mp3 Audio Tutorial" />
<ProgressBar android:id="@+id/progress_bar"
android:layout_width="200px"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
style="?android:attr/progressBarStyleHorizontal"/>
<ImageButton android:id="@+id/button_play"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="5px"
style="?android:attr/buttonStyleSmall"
android:src="@drawable/button_pause" />
</LinearLayout>
しかし、描かれることになると、それはただ空の黒い画面を表示します。アクティビティでsetContentViewを呼び出します。実際、SurfaceViewタグを削除すると、正しく描画されることがわかりました。
誰かが私が何が起こっているのかを知るのを手伝ってくれる?ありがとう
編集:回答のおかげで、SurfaceViewがすべてのスペースを使用しているため、ボタンが表示されないことがわかりました。どうすればそれを回避できるかについてのアイデアはありますか?ありがとう