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




Download 0,9 Mb.
bet9/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)

MainActiviry.java

public class MainActivity extends AppCompatActivity {


private ImageView closeapp, haqida;
RelativeLayout rus, arm, kaz, isp, kor, kyr, sa, trk, uzb, gb, chin, in, ua, gr, por, indo;
AlertDialog.Builder builder;
RelativeLayout header;
@SuppressLint("MissingInflatedId")
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);

rus = (RelativeLayout) findViewById(R.id.rus);


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

arm = (RelativeLayout) findViewById(R.id.arman);


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

kaz = (RelativeLayout) findViewById(R.id.kz);


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

isp = (RelativeLayout) findViewById(R.id.sp);


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

kor = (RelativeLayout) findViewById(R.id.kor);


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

kyr = (RelativeLayout) findViewById(R.id.kyr);


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

sa = (RelativeLayout) findViewById(R.id.sa);


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

trk = (RelativeLayout) findViewById(R.id.trk);


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

uzb = (RelativeLayout) findViewById(R.id.uz);


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

gb = (RelativeLayout) findViewById(R.id.gb);


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

chin = (RelativeLayout) findViewById(R.id.chin);


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

in = (RelativeLayout) findViewById(R.id.in);


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

ua = (RelativeLayout) findViewById(R.id.ua);


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

gr = (RelativeLayout) findViewById(R.id.gr);


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

por = (RelativeLayout) findViewById(R.id.por);


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

indo = (RelativeLayout) findViewById(R.id.indo);


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

haqida = findViewById(R.id.infog);


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

// if (Build.VERSION.SDK_INT>=Build.VERSION_CODES.S){


// header.setRenderEffect(RenderEffect.createBlurEffect(50, 50, Shader.TileMode.MIRROR));
// }

closeapp = (ImageView) findViewById(R.id.exit_btn);


builder = new AlertDialog.Builder(this);

closeapp.setOnClickListener(new View.OnClickListener() {


@Override
public void onClick(View view) {
builder.setTitle("Chiqish")
.setMessage("Ilovadan chiqishni holaysizmi")
.setCancelable(true)
.setPositiveButton("Ha", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialogInterface, int i) {
finish();
}
})
.setNegativeButton("Yo'q", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialogInterface, int i) {
dialogInterface.cancel();
}
})
.show();
}
});


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.