android3.2

### opdracht 1 ###

### activity_main.xml ###

<androidx.constraintlayout.widget...>
  
  	...

	<Button
	    android:id="@+id/button2"
	    android:layout_width="180dp"
	    android:layout_height="50dp"
	    android:layout_marginTop="60dp"
	    android:text="1-non-responsive"
	    app:layout_constraintTop_toBottomOf="@+id/button1"
	    tools:layout_editor_absoluteX="0dp"
	    android:onClick="start1_non_responsive"/>

  	...

</androidx.constraintlayout.widget.ConstraintLayout>

### MainActivity.java ###

public class MainActivity extends AppCompatActivity {

  	...

	public void start1_non_responsive(View view){

	    Intent browserIntent = new Intent("android.intent.action.VIEW",
	    Uri.parse("https://dequeuniversity.com/library/responsive/1-non-responsive"));
	    startActivity(browserIntent);

	}
  
  	...

}

Download hier het bestand.
### opdracht 2 ###

### activity_main.xml ###

<androidx.constraintlayout.widget...>
  
    ...

    <Button
        android:id="@+id/button3"
        android:layout_width="180dp"
        android:layout_height="50dp"
        android:layout_marginTop="60dp"
        android:text="1-responsive"
        app:layout_constraintTop_toBottomOf="@+id/button2"
        tools:layout_editor_absoluteX="0dp"
        android:onClick="start1_responsive"/>

    ...

</androidx.constraintlayout.widget.ConstraintLayout>

### MainActivity.java ###

public class MainActivity extends AppCompatActivity {

    ...

    public void start1_responsive(View view){

        Intent browserIntent = new Intent("android.intent.action.VIEW",
        Uri.parse("https://dequeuniversity.com/library/responsive/1-responsive"));
        startActivity(browserIntent);

    }
  
    ...

}

Download hier het bestand.
### opdracht 3 ###

### activity_second.xml ###

<androidx.constraintlayout.widget...>

	...

	<Button
	    android:id="@+id/button1"
	    android:layout_width="wrap_content"
	    android:layout_height="wrap_content"
	    android:layout_marginTop="56dp"
	    android:onClick="startMainActivity"
	    android:text="Naar eerste scherm"
	    app:layout_constraintTop_toTopOf="parent"
	    tools:layout_editor_absoluteX="0dp" />

    ...

</androidx.constraintlayout.widget.ConstraintLayout>

### SecondActivity.java ###

public class SecondActivity extends AppCompatActivity {

	...

    public void startMainActivity(View view) {
        Intent intent = new Intent(this, MainActivity.class);
        startActivity(intent);
    }

    ...

}

Download hier het bestand.
### opdracht 4 ###

### activity_main.xml ###

<androidx.constraintlayout.widget...>

	...

    <Button
        android:id="@+id/button4"
        android:layout_width="180dp"
        android:layout_height="50dp"
        android:layout_marginStart="52dp"
        android:onClick="startBellen"
        android:text="bel 123"
        app:layout_constraintStart_toEndOf="@+id/button1"
        tools:layout_editor_absoluteY="0dp" />

    ...

</androidx.constraintlayout.widget.ConstraintLayout>

### MainActivity.java ###

public class MainActivity extends AppCompatActivity {

	...

    public void startBellen (View view){

        Intent intent = new Intent("android.intent.action.DIAL",
        Uri.fromParts("tel", "123", null));
        startActivity(intent);

    }

    ...

}

Download hier het bestand.