0% found this document useful (0 votes)
11 views19 pages

Villarmino

Uploaded by

diannemengote20
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views19 pages

Villarmino

Uploaded by

diannemengote20
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 19

Name: Glory Gene Villarmino

BSIT 3A

Splash.java
package com.example.villarmino;

import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;

import androidx.appcompat.app.AppCompatActivity;

public class SplashActivity extends AppCompatActivity {


private static int SPLASH_TIME_OUT = 3000;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_splash);

new Handler().postDelayed(new Runnable() {


@Override
public void run() {
Intent i = new Intent(SplashActivity.this, login.class);
startActivity(i);

finish();
}
}, 3000);
}
}

Login.java
package com.example.villarmino;

import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;

import androidx.appcompat.app.AppCompatActivity;

public class SplashActivity extends AppCompatActivity {


private static int SPLASH_TIME_OUT = 3000;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_splash);
new Handler().postDelayed(new Runnable() {
@Override
public void run() {
Intent i = new Intent(SplashActivity.this, login.class);
startActivity(i);

finish();
}
}, 3000);
}
}

MainActivity.java
package com.example.villarmino;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

import androidx.appcompat.app.AppCompatActivity;

public class MainActivity extends AppCompatActivity {

Button btnadd,btnlistview,btnabout;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
btnadd = findViewById(R.id.btnadd);
btnlistview = findViewById(R.id.btnlistview);
btnabout = findViewById(R.id.btnabout);

btnadd.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {

Intent intent = new Intent(MainActivity.this, add.class);


startActivity(intent);
}
});
btnlistview.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(MainActivity.this,list.class);
startActivity(intent);
}
});
btnabout.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(MainActivity.this, about.class);
startActivity(intent);
}
});
}
}

Add.java
package com.example.villarmino;

import android.annotation.SuppressLint;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Toast;

import androidx.appcompat.app.AppCompatActivity;

public class add extends AppCompatActivity {


EditText txtidno, txtname;
Button btnsave;
DBOperation dbOperation;
@SuppressLint("MissingInflatedId")
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_add);
dbOperation = new DBOperation(getApplicationContext());
txtidno = findViewById(R.id.txtidno);
txtname = findViewById(R.id.txtname);
btnsave = findViewById(R.id.btnsave);

btnsave.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
String idno = txtidno.getText().toString().trim();
String name = txtname.getText().toString().trim();
dbOperation.insertRecord(idno, name);
Toast.makeText(getApplicationContext(), "Record Successfully
Saved.", Toast.LENGTH_LONG).show();
txtidno.setText("");
txtname.setText("");

Intent intent = new Intent(add.this, list.class);


intent.putExtra("idno", idno);
intent.putExtra("name", name);
startActivity(intent);
}
});
}
}

Listview.java
package com.example.villarmino;

import android.annotation.SuppressLint;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Toast;

import androidx.appcompat.app.AppCompatActivity;

public class add extends AppCompatActivity {


EditText txtidno, txtname;
Button btnsave;
DBOperation dbOperation;
@SuppressLint("MissingInflatedId")
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_add);
dbOperation = new DBOperation(getApplicationContext());
txtidno = findViewById(R.id.txtidno);
txtname = findViewById(R.id.txtname);
btnsave = findViewById(R.id.btnsave);

btnsave.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
String idno = txtidno.getText().toString().trim();
String name = txtname.getText().toString().trim();
dbOperation.insertRecord(idno, name);
Toast.makeText(getApplicationContext(), "Record Successfully
Saved.", Toast.LENGTH_LONG).show();
txtidno.setText("");
txtname.setText("");

Intent intent = new Intent(add.this, list.class);


intent.putExtra("idno", idno);
intent.putExtra("name", name);
startActivity(intent);
}
});
}
}

Update.java
package com.example.villarmino;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Toast;

import androidx.appcompat.app.AppCompatActivity;

public class update extends AppCompatActivity {


EditText txtidno, txtname;
Button btnupdate;
DBOperation dbOperation;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_update);
dbOperation = new DBOperation(getApplicationContext());
txtidno = findViewById(R.id.txtidno);
txtname = findViewById(R.id.txtname);
btnupdate = findViewById(R.id.btnupdate);

Intent intent = getIntent();


String idno = intent.getStringExtra("idno");
String name = intent.getStringExtra("name");

txtidno.setText(idno);
txtname.setText(name);

btnupdate.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
String idno = txtidno.getText().toString().trim();
String name = txtname.getText().toString().trim();
dbOperation.updateRecord(idno, name);
Toast.makeText(getApplicationContext(), "Record Successfully
Updated", Toast.LENGTH_LONG).show();
txtidno.setText("");
txtname.setText("");

Intent intent = new Intent(update.this, list.class);


intent.putExtra("idno", idno);
intent.putExtra("name", name);
startActivity(intent);
}
});
}
}

about.java
package com.example.villarmino;

import android.os.Bundle;

import androidx.appcompat.app.AppCompatActivity;

public class about extends AppCompatActivity {

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_about);
}
}

DBOperation.java
package com.example.villarmino;

import android.content.ContentValues;
import android.content.Context;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;

public class DBOperation extends SQLiteOpenHelper {


public DBOperation(Context context){
super (context, "studentdb",null,1);

}
@Override
public void onCreate(SQLiteDatabase db) {
db.execSQL("CREATE TABLE student (idno varchar(20)PRIMARY KEY, name
TEXT)");
}
@Override
public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
db.execSQL("DROP TABLE IF EXISTS student");
onCreate(db);
}
public void insertRecord(String a, String b){
SQLiteDatabase db=getWritableDatabase();
ContentValues cv=new ContentValues();
cv.put("idno",a);
cv.put("name",b);
db.insert("student",null,cv);
db.close();

}
public Cursor getRecord(){
SQLiteDatabase db=this.getReadableDatabase();
Cursor c=db.rawQuery("SELECT* FROM student",null);
return c;

}
public void updateRecord(String a, String b){
SQLiteDatabase db=getWritableDatabase();
ContentValues cv=new ContentValues();
cv.put("idno",a);
cv.put("name",b);
db.update("student",cv,"idno=?",new String[]{a});
db.close();

}
public boolean deleteRecord(String a){
SQLiteDatabase db=getWritableDatabase();
db.delete("student","idno=?",new String[]{a});
db.close();
return true;
}
}

Adapter.java
package com.example.villarmino;

import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.database.Cursor;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.TextView;

import androidx.annotation.NonNull;
import androidx.appcompat.app.AlertDialog;
import androidx.recyclerview.widget.RecyclerView;

public class CustomAdapter extends


RecyclerView.Adapter<CustomAdapter.ViewHolder> {

private Cursor cursor;


private Context context;
private DBOperation dbOperation;

public CustomAdapter(Context context, Cursor cursor) {


this.context = context;
this.cursor = cursor;
dbOperation = new DBOperation(context);
}

@NonNull
@Override
public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int
viewType) {
View view =
LayoutInflater.from(parent.getContext()).inflate(R.layout.list_item, parent,
false);
return new ViewHolder(view);
}

@Override
public void onBindViewHolder(@NonNull ViewHolder holder, int position) {
if (cursor.moveToPosition(position)) {
String id = cursor.getString(cursor.getColumnIndex("idno"));
String name = cursor.getString(cursor.getColumnIndex("name"));
holder.textViewId.setText("ID: " + id);
holder.textViewName.setText("Name: "+ name);
}
}

@Override
public int getItemCount() {
return cursor != null ? cursor.getCount() : 0;
}

public void swapCursor(Cursor newCursor) {


if (cursor != null) {
cursor.close();
}
cursor = newCursor;
notifyDataSetChanged();
}

public class ViewHolder extends RecyclerView.ViewHolder {

TextView textViewId,textViewName;
Button buttonUpdate, buttonDelete;

public ViewHolder(@NonNull View itemView) {


super(itemView);
textViewId = itemView.findViewById(R.id.textViewId);
textViewName = itemView.findViewById(R.id.textViewName);
buttonUpdate = itemView.findViewById(R.id.buttonUpdate);
buttonDelete = itemView.findViewById(R.id.buttonDelete);

buttonUpdate.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
int position = getAdapterPosition();
if (position != RecyclerView.NO_POSITION &&
cursor.moveToPosition(position)) {
String id =
cursor.getString(cursor.getColumnIndex("idno"));
String name =
cursor.getString(cursor.getColumnIndex("name"));

Intent intent = new Intent(context, update.class);


intent.putExtra("idno", id);
intent.putExtra("name", name);
context.startActivity(intent);
}
}
});
buttonDelete.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
int position = getAdapterPosition();
if (position != RecyclerView.NO_POSITION &&
cursor.moveToPosition(position)) {
String id =
cursor.getString(cursor.getColumnIndex("idno"));
confirmDeleteDialog(id);
}
}
});
}

private void confirmDeleteDialog(final String id) {


AlertDialog.Builder builder = new AlertDialog.Builder(context);
builder.setTitle("Confirm Delete");
builder.setMessage("Are you sure you want to delete this
record?");
builder.setPositiveButton("Yes", new
DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
dbOperation.deleteRecord(id);
swapCursor(dbOperation.getRecord());
}
});
builder.setNegativeButton("No", new
DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {

}
});
builder.show();
}
}
}

XML
ActivitySplash.xml
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/splash"
android:textAlignment="center"/>
ActivityLogin.xml
<?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"
android:backgroundTint="#EFEAEA"
tools:context=".login">

<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/login"
android:orientation="vertical"
tools:layout_editor_absoluteX="1dp"
tools:layout_editor_absoluteY="1dp">

<TextView
android:id="@+id/textView2"
android:layout_width="match_parent"
android:layout_height="97dp"
android:fontFamily="serif"
android:gravity="center"
android:text="LOGIN FORM"
android:textColor="@color/white"
android:textSize="34sp"
android:textStyle="bold" />

<TextView
android:id="@+id/textView4"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Username"
android:textColor="@color/white"
android:textSize="24sp" />

<EditText
android:id="@+id/txtuser"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:backgroundTint="#EFE8E8"
android:ems="10"
android:inputType="text"
android:textSize="24sp" />

<TextView
android:id="@+id/textView5"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Password"
android:textColor="@color/white"
android:textSize="24sp" />
<EditText
android:id="@+id/txtpass"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:backgroundTint="#F8EBEB"
android:ems="10"
android:inputType="text" />

<Button
android:id="@+id/btnlogin"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Login "
android:textColorLink="#2D98ED"
android:textSize="34sp" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

ActivityMain.xml
<?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"
android:backgroundTint="#E6DADA"
tools:context=".MainActivity">

<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/main"
android:orientation="vertical"
tools:layout_editor_absoluteX="1dp"
tools:layout_editor_absoluteY="1dp">

<TextView
android:id="@+id/textView7"
android:layout_width="match_parent"
android:layout_height="106dp"
android:gravity="center"
android:text="My Dashboard"
android:textAlignment="center"
android:textColor="#00C853"
android:textSize="48sp" />

<TextView
android:id="@+id/textView16"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Welcome! Let my dashboard be the guiding star on
your journey to greatness."
android:textAlignment="center"
android:textColor="#E1C6C6"
android:textSize="24sp" />

<Button
android:id="@+id/btnadd"
android:layout_width="match_parent"
android:layout_height="140dp"
android:background="@android:color/transparent"
android:text="ADD ENTRY"
android:textAlignment="center"
android:textColor="#FFD600"
android:textSize="34sp" />

<Button
android:id="@+id/btnlistview"
android:layout_width="match_parent"
android:layout_height="119dp"
android:background="@android:color/transparent"
android:text="LIST VIEW"
android:textAlignment="center"
android:textColor="#FFD600"
android:textSize="34sp" />

<Button
android:id="@+id/btnabout"
android:layout_width="match_parent"
android:layout_height="160dp"
android:background="@android:color/transparent"
android:text="ABOUT ME"
android:textAlignment="center"
android:textColor="#FFD600"
android:textSize="34sp" />

</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

Activityadd.xml
<?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"
android:background="@drawable/about"
android:backgroundTint="#E6DADA"
tools:context=".MainActivity">

<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/about"
android:orientation="vertical"
android:padding="10dp"
tools:layout_editor_absoluteX="8dp"
tools:layout_editor_absoluteY="8dp">

<TextView
android:id="@+id/textView9"
android:layout_width="match_parent"
android:layout_height="94dp"
android:fontFamily="serif-monospace"
android:gravity="center"
android:text="Entry Area"
android:textAlignment="center"
android:textColor="#68ECE0"
android:textSize="60sp"
android:textStyle="bold" />

<TextView
android:id="@+id/textView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Id Number"
android:textColor="#FAF1F1"
android:textSize="24sp"
android:textStyle="bold" />

<EditText
android:id="@+id/txtidno"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:backgroundTint="#F4E6E6"
android:ems="10"
android:inputType="textPersonName"
android:textColor="#F8EDED"
android:textSize="24sp" />

<TextView
android:id="@+id/textView3"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Your Name"
android:textColor="#EAD9D9"
android:textSize="24sp"
android:textStyle="bold" />

<EditText
android:id="@+id/txtname"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:backgroundTint="#EFE6E6"
android:ems="10"
android:inputType="textPersonName"
android:textColor="#F4E7E7"
android:textSize="24sp" />

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">

<Button
android:id="@+id/btnsave"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="Save"
android:textSize="20sp" />

</LinearLayout>

</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

Activitylist.xml
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">

<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recyclerView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/listview" />

</RelativeLayout>

Activityupdate.xml
<?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:id="@+id/main"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".update">

<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/update"
android:orientation="vertical"
tools:layout_editor_absoluteX="2dp"
tools:layout_editor_absoluteY="-2dp">

<TextView
android:id="@+id/textView6"
android:layout_width="match_parent"
android:layout_height="116dp"
android:layout_gravity="center"
android:fontFamily="monospace"
android:gravity="center"
android:text="Update Entry"
android:textColor="#EFE2E2"
android:textSize="48sp" />

<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="ID Number"
android:textColor="#EFECEC"
android:textSize="30sp"
android:textStyle="bold" />

<EditText
android:id="@+id/txtidno"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:backgroundTint="#F1E6E6"
android:ems="10"
android:inputType="text" />

<TextView
android:id="@+id/textView8"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Your Name"
android:textColor="#F8F1F1"
android:textSize="30sp"
android:textStyle="bold" />

<EditText
android:id="@+id/txtname"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:backgroundTint="#F4E7E7"
android:ems="10"
android:inputType="text" />

<Button
android:id="@+id/btnupdate"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="UPDATE"
android:textSize="24sp" />

</LinearLayout>

</androidx.constraintlayout.widget.ConstraintLayout>

ActivityAbout.xml
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/about"
android:padding="16dp">

<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">

<ImageView
android:id="@+id/imageView2"
android:layout_width="match_parent"
android:layout_height="136dp"
app:srcCompat="@drawable/profile_logo" />

<TextView
android:id="@+id/textView11"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Jem Villarmino"
android:textAlignment="center"
android:textColor="#EDDDDD"
android:textSize="34sp" />

<TextView
android:id="@+id/textView14"
android:layout_width="match_parent"
android:layout_height="48dp" />

<TextView
android:id="@+id/textView12"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Name : Jem"
android:textColor="#EDD3D3"
android:textSize="20sp" />

<TextView
android:id="@+id/textView13"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Lastname: Villarmino"
android:textColor="#F4EFEF"
android:textSize="20sp" />

<TextView
android:id="@+id/textView15"
android:layout_width="match_parent"
android:layout_height="62dp"
android:text="Gender: Female"
android:textColor="#F4EDED"
android:textSize="20sp" />
<TextView
android:id="@+id/textView10"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="About Myself : I'm a dedicated girl student
committed to academic success and personal development. I embrace challenges,
manage my time efficiently, and actively participate in class discussions.
Beyond academics, I prioritize kindness and community service to make a
positive impact. With determination and compassion, I aim for excellence."
android:textAlignment="viewStart"
android:textColor="#ECDBDB"
android:textSize="20sp" />
</LinearLayout>
</RelativeLayout>

List_layout.xml
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="16dp">

<LinearLayout
android:id="@+id/linear_layout_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">

<TextView
android:id="@+id/textViewId"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="ID: "
android:textSize="18sp" />

<TextView
android:id="@+id/textViewIdValue"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:textSize="18sp" />

<TextView
android:id="@+id/textViewName"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:textSize="18sp" />

</LinearLayout>

<Button
android:id="@+id/buttonUpdate"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Update"
android:layout_below="@id/linear_layout_text"
android:layout_alignParentStart="true"/>

<Button
android:id="@+id/buttonDelete"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Delete"
android:layout_below="@id/linear_layout_text"
android:layout_alignParentEnd="true"/>

</RelativeLayout>

AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">

<application
android:allowBackup="true"
android:dataExtractionRules="@xml/data_extraction_rules"
android:fullBackupContent="@xml/backup_rules"
android:icon="@drawable/logo"
android:label="@string/app_name"
android:roundIcon="@drawable/logo"
android:supportsRtl="true"
android:theme="@style/Theme.Villarmino"
tools:targetApi="31">
<activity
android:name=".update"
android:exported="false" />
<activity
android:name=".add"
android:exported="false" /> <!-- SplashActivity -->
<activity
android:name=".SplashActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />


</intent-filter>
</activity>
<activity
android:name=".login"
android:exported="true" />
<activity
android:name=".list"
android:exported="false" />
<activity
android:name=".about"
android:exported="false" />
<activity
android:name=".MainActivity"
android:exported="false" />
</application>

</manifest>

You might also like