Coding Help | Android/Eclipes

DragonD

Well-known member
  • Nov 26, 2008
    3,508
    1,537
    113
    37.235065, -115.811117
    Code:
    import android.app.Activity;
    import android.media.MediaPlayer;
    import android.os.Bundle;
    import android.view.View;
    import android.widget.Button;
    
    public class KaputaActivity extends Activity {
        /** Called when the activity is first created. */
    	
    	Button soundgive;
    	MediaPlayer KAAK;
    	
        @Override
        public void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.main);
            soundgive = (Button) findViewById(R.id.button1);
            
            soundgive.setOnClickListener(new View.OnClickListener() {
    			
    			public void onClick(View v) {
    				// TODO Auto-generated method stub
    				
    				
    				KAAK = MediaPlayer.create(KaputaActivity.this, R.raw.kaak);
    				
    				KAAK.start();
    				
    			}
    		}); 
            
            
        }
    
    	
    }



    මම මේ පොඩි ඇප් එකක් හදනවා
    ලොකුවට නම් දන්නෙ නෑ මම
    බොත්තම එබුවම සද්දයක් එන කෝඩින් එකක් මේ
    ඒත් බොත්තම 20 පාරක් විතර එක ඩිගට එබුවම සද්දෙ ඇහෙන්නෙ නෙතුව යනව
    ඇයි කියල තේරෙන්නෙ නෑ
    මම මේක ඉක්ලිප්ස් එකෙ කලේ
    දනන් කෙනෙක් කියල දෙන්නකො
    මට වෙන්නෙ ඔනි මේ බොත්තම 1000 පරක් එබුවත් පොඩි සවුන්ඩ් ක්ලිප් එක ප්ලේ වෙන්න ඕනි​