Tajriba ishi №5 Android ilovalarida jarayonlar


Download 0.85 Mb.
bet4/5
Sana11.05.2023
Hajmi0.85 Mb.
#1450266
1   2   3   4   5
Bog'liq
5-Tajriba ishi

Main.Activity.java
package com.example.intent;
import androidx.appcompat.app.AppCompatActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

public class MainActivity extends AppCompatActivity {


@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
Button btnnext = (Button) findViewById(R.id.btnnext);
btnnext.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent intent=new Intent(getApplicationContext(), Saxifa2.class);
startActivity(intent); } }); }}

AndroidManifiest.xml
xml version="1.0" encoding="utf-8"?>
xmlns:tools="http://schemas.android.com/tools"
package="com.example.intent">
android:allowBackup="true"
android:dataExtractionRules="@xml/data_extraction_rules"
android:fullBackupContent="@xml/backup_rules"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.Intent"
tools:targetApi="31">
android:name=".MainActivity"
android:exported="true">








saxifa2.xml
xml version="1.0" encoding="utf-8"?>
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">

Download 0.85 Mb.

Do'stlaringiz bilan baham:
1   2   3   4   5




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling