Viewflipper mit Soundeffect

programm2008

programm2008

Ambitioniertes Mitglied
0
Hallo meine Freunde :D

Ich code gerade eine app und komme an einer Stelle nicht weiter ich hoffe ihr könnt mir weiterhelfen... Ich habe ein Layout erstellt , mit dem man zwischen verschiedenen Bildern hin- und her switchen kann (mit ViewFlipper). Nun möchte ich das bei bestimmten Views sound effekte wiedergegeben werden. Hier mal ein Bild...xD





Layout-Datei:
PHP:
<ViewFlipper
        android:id="@+id/viewflipper"
        android:layout_width="fill_parent"
        android:layout_height="188dp"
        android:layout_weight="0.44" >



     <LinearLayout
         android:layout_width="wrap_content"
         android:layout_height="fill_parent" >


        <ImageView
            android:id="@+id/imageView3"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center"
            android:src="@drawable/resim1" />
	 </LinearLayout>
	 


     <LinearLayout
         android:layout_width="wrap_content"
         android:layout_height="fill_parent" >

        <ImageView
            android:id="@+id/imageView4"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center"
            android:src="@drawable/resim2" />
	 </LinearLayout>
	 
      <LinearLayout
         android:layout_width="wrap_content"
         android:layout_height="fill_parent" >

        <ImageView
            android:id="@+id/imageView5"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center"
            android:src="@drawable/resim3" />
	 </LinearLayout>

<RelativeLayout
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_gravity="bottom"
        android:gravity="bottom" >

        <ImageView
            android:id="@+id/imageView2"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentRight="true"
            android:layout_marginRight="45dp"
            android:src="@drawable/pfeil_rechts" 
            android:onClick="weiter"/>

        <ImageView
            android:id="@+id/imageView1"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentLeft="true"
            android:layout_alignParentTop="true"
            android:layout_marginLeft="45dp"
            android:src="@drawable/pfeil_links"
            android:onClick="zurück" />
    </RelativeLayout>

Der Java-COde:

PHP:
ViewFlipper flippy;

	
	@Override
	protected void onCreate(Bundle savedInstanceState){
		super.onCreate(savedInstanceState);
		setContentView(R.layout.lernspiel);
		
		
		flippy = (ViewFlipper) findViewById(R.id.viewflipper);}
		
		
		
	
		public void weiter (View view){
			flippy.showNext();
		}
		
		public void zurück (View view){
			flippy.showPrevious();	}

Wie löse ich das Problem am besten? Sagen wir mal bei einem ABC-Spiel wär das so das beim Buchstaben ein eine Stimme "A" sagt und beim nächsten Buchstaben "B" usw. Ich hoffe ihr habt mich verstanden. Helft mir bitte weiß echt nicht weiter
 

Ähnliche Themen

B
Antworten
4
Aufrufe
491
bb321
B
FabianDev
Antworten
5
Aufrufe
557
swa00
swa00
MES
Antworten
10
Aufrufe
819
MES
MES
Zurück
Oben Unten