Advertisement
delvinkrasniqi

2 Aktivitete

Nov 28th, 2019
161
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.18 KB | None | 0 0
  1. package com.example.dyaktivitete;
  2.  
  3. import androidx.appcompat.app.AppCompatActivity;
  4.  
  5. import android.content.Intent;
  6. import android.os.Bundle;
  7. import android.view.View;
  8.  
  9. public class MainActivity extends AppCompatActivity {
  10.  
  11. @Override
  12. protected void onCreate(Bundle savedInstanceState) {
  13. super.onCreate(savedInstanceState);
  14. setContentView(R.layout.activity_main);
  15. }
  16.  
  17. public void dergo(View view){
  18.  
  19. Intent intent=new Intent(getApplicationContext(),Main2Activity.class);
  20. startActivity(intent);
  21.  
  22. /*<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
  23. xmlns:app="http://schemas.android.com/apk/res-auto"
  24. xmlns:tools="http://schemas.android.com/tools"
  25. android:layout_width="match_parent"
  26. android:layout_height="match_parent"
  27. tools:context=".MainActivity">
  28.  
  29. <Button
  30. android:id="@+id/button"
  31. android:layout_width="wrap_content"
  32. android:layout_height="wrap_content"
  33. android:text="Dergo"
  34. tools:layout_editor_absoluteX="151dp"
  35. tools:layout_editor_absoluteY="264dp"
  36. android:onClick="dergo"/>
  37.  
  38.  
  39. </RelativeLayout>*/
  40. }
  41. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement