Android
Android
Android
mainActivity.java-
package com.example.implicitintent;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.view.View;
import androidx.appcompat.app.AppCompatActivity;
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
public void clk(View v) {
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("http://www.google.com"));
startActivity(intent);
}
}
2.Explicit intent:-
Coding Phase: Pseudo code/ Flow Chart / Algorithm
Activity_main.xml file-2
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
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=".Second">
<ImageView
android:id="@+id/imageView2"
android:layout_width="612dp"
android:layout_height="860dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.361"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.0"
app:srcCompat="@drawable/img_1" />
<TextView
android:id="@+id/textView2"
android:layout_width="313dp"
android:layout_height="73dp"
android:text="Thanku Krishna"
android:textColor="#F4F4F4"
android:textColorLink="#FFFFFF"
android:textSize="40sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.591"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.957" />
</androidx.constraintlayout.widget.ConstraintLayout>
mainActivity.java-1
package com.example.explicittext;
import androidx.appcompat.app.AppCompatActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
public class MainActivity<find> extends AppCompatActivity {
private Button button;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
onClickButtonListener();
}
public void onClickButtonListener()
{
button=(Button)findViewById(R.id.button);
button.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent intent=new Intent(MainActivity.this,MainActivity2.class);
startActivity(intent);}
});
}
}
mainActivity.java-2
package com.example.explicittext;
import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;
public class MainActivity2 extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main2);
}
}
Output
CONCLIUSION:-
successfully completed the Receive data from the user by Edit Text and pass the data to another activity
using intent.
ASSESSMENT
Rubrics Full Mark Marks Obtained Remarks
Concepts 10
Planning and Execution/ 10
Practical Simulation/Programming
Result and Interpretation 10
Record of Applied and Action Learning 10
Viva 10
Total 50