O’zbekiston respublikasi raqamli texnologiyalar vazirligi muxammad al-xorazmiy nomidagi toshkent axborot texnologiyalari




Download 0,9 Mb.
bet11/11
Sana13.05.2024
Hajmi0,9 Mb.
#229549
1   2   3   4   5   6   7   8   9   10   11
Bog'liq
Individual loyiha 2 Atabayev Anvar 42 (1)

GreatBritan.java
package com.example.alfabet;

import androidx.appcompat.app.AppCompatActivity;


import android.media.MediaPlayer;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;

public class GreatBritan extends AppCompatActivity {

private MediaPlayer english_vois;

@Override


protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_great_britan);

english_vois = MediaPlayer.create(this, R.raw.englishvois);

Button eng = findViewById(R.id.eng_vois);
eng.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Play_sound_eng();
}
});

ImageView back = (ImageView) findViewById(R.id.back_btn);


back.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
finish();
}
});
}

public void Play_sound_eng(){


if (english_vois != null) {
english_vois.start();
}
}

protected void onDestroy() {


super.onDestroy();
if (english_vois != null) {
english_vois.release();
english_vois = null;
}
}
}



Download 0,9 Mb.
1   2   3   4   5   6   7   8   9   10   11




Download 0,9 Mb.

Bosh sahifa
Aloqalar

    Bosh sahifa



O’zbekiston respublikasi raqamli texnologiyalar vazirligi muxammad al-xorazmiy nomidagi toshkent axborot texnologiyalari

Download 0,9 Mb.