Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.example.dyaktivitete;
- import androidx.appcompat.app.AppCompatActivity;
- import android.content.Intent;
- import android.os.Bundle;
- import android.view.View;
- public class MainActivity extends AppCompatActivity {
- @Override
- protected void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- setContentView(R.layout.activity_main);
- }
- public void dergo(View view){
- Intent intent=new Intent(getApplicationContext(),Main2Activity.class);
- startActivity(intent);
- /*<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- tools:context=".MainActivity">
- <Button
- android:id="@+id/button"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="Dergo"
- tools:layout_editor_absoluteX="151dp"
- tools:layout_editor_absoluteY="264dp"
- android:onClick="dergo"/>
- </RelativeLayout>*/
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement