自分のアプリケーション用にFart SoundBoardを作成しました。私は開発に非常に新しいです、これは私の最初のアプリです。 onClick button_sound.startメソッドを使用してクリックしたときにサウンドを再生するボタンがたくさんあります。私のサウンドがxml経由で再生されているときだけ回転プログレスバーを表示するには?ここに私のコードはありますか:音楽の再生中にProgressBarスピナーを表示するにはどうすればよいですか?
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:background="@raw/nuke"
android:padding="8dp">
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:text="Click a button to play a fart!"
android:textColor="#FF0000"
android:textSize="24dp" />
<SeekBar
android:id="@+id/sbVolume1"
android:layout_width="fill_parent"
android:layout_height="wrap_content" />
<Button
android:id="@+id/ranfart"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Random Fart"
android:textColor="#0B0B61"
android:textSize="21dp" />
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<Button
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Fart 1"
android:layout_weight="50"
android:textSize="21dp"
android:id="@+id/fart1"
android:textColor="#0B0B61"/>
<Button
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Fart 2"
android:layout_weight="50"
android:textSize="21dp"
android:id="@+id/fart2"
android:textColor="#0B0B61"
/>
</LinearLayout>
</LinearLayout>
</ScrollView>
サウンド再生中にのみスピンローダーを作成するにはどうすればよいですか? また、ボタンの回転の進行状況をバーONTOPにするにはどうすればよいですか? (ない以上、ではない以下が、岩下?
私は、すでに設定している私のボリュームのためのシークバーです。私は、プログレスバーを回転させる方法を知る必要があります。音楽が再生されています。私は今私のcompjterではないので私はコードを表示することはできませんが、私のJavaはsometに見えますこのようなヒンジ:fart1.setonClickListener(新しいview.onclicklistener)..... bla bla .....そして私はFart1.start()を持っています。 (私はFart1をJavaの以前のサウンドに設定しています) – user1157306