|
|
səhifə | 4/5 | tarix | 06.05.2023 | ölçüsü | 0,85 Mb. | | #108573 |
| 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">
android:id="@+id/btnback"
android:layout_width="200dp"
android:layout_height="wrap_content"
android:text="@string/btnback"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true" />
Dostları ilə paylaş: |
|
|