Commit 9b8b9679 authored by Amin's avatar Amin

create add owner acceptance form screen

parent ea4c7911
......@@ -12,6 +12,9 @@
android:supportsRtl="true"
android:theme="@style/Theme.Qms">
<activity
android:name=".OwnerAcceptanceForm"
android:exported="false" />
<activity
android:name=".AddInfo"
android:exported="false" />
<activity
......
......@@ -13,7 +13,7 @@ import androidx.core.view.WindowInsetsCompat;
public class Issues extends AppCompatActivity {
private ImageButton withdrawIssueIcon, back_button, filter_issue;
private ImageButton withdrawIssueIcon, back_button, filter_issue, ownerAcceptanceFormIcon;
private LinearLayout issueClick;
......@@ -33,6 +33,7 @@ public class Issues extends AppCompatActivity {
withdrawIssueIcon = findViewById(R.id.withdraw_issue_icon);
back_button = findViewById(R.id.backButton);
filter_issue = findViewById(R.id.filterIssue);
ownerAcceptanceFormIcon = findViewById(R.id.owner_acceptance_form_icon);
issueClick = findViewById(R.id.issues_click);
......@@ -52,6 +53,11 @@ public class Issues extends AppCompatActivity {
startActivity(intent);
});
ownerAcceptanceFormIcon.setOnClickListener(v -> {
Intent intent = new Intent(Issues.this, OwnerAcceptanceForm.class);
startActivity(intent);
});
back_button.setOnClickListener(v -> {
onBackPressed();
});
......
package com.example.qms;
import android.os.Bundle;
import android.widget.ImageButton;
import androidx.activity.EdgeToEdge;
import androidx.appcompat.app.AppCompatActivity;
import androidx.core.graphics.Insets;
import androidx.core.view.ViewCompat;
import androidx.core.view.WindowInsetsCompat;
public class OwnerAcceptanceForm extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
EdgeToEdge.enable(this);
setContentView(R.layout.activity_owner_acceptance_form);
ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.main), (v, insets) -> {
Insets systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars());
v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom);
return insets;
});
ImageButton backButton = findViewById(R.id.back_button);
backButton.setOnClickListener(v -> {
onBackPressed();
});
}
}
\ No newline at end of file
......@@ -67,6 +67,7 @@
android:src="@drawable/check_list" />
<ImageButton
android:id="@+id/owner_acceptance_form_icon"
android:layout_width="24dp"
android:layout_height="24dp"
android:background="@android:color/transparent"
......
<?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=".OwnerAcceptanceForm">
<LinearLayout
android:id="@+id/top_nav"
android:layout_width="match_parent"
android:layout_height="117dp"
android:background="@color/primary"
android:orientation="vertical"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<View
android:layout_width="match_parent"
android:layout_height="59dp" />
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="59dp">
<ImageButton
android:id="@+id/back_button"
android:layout_width="32dp"
android:layout_height="32dp"
android:layout_marginStart="16dp"
android:background="@null"
android:src="@drawable/arrow_left"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/titleText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Owner Acceptance Form"
android:textColor="@color/white"
android:textSize="20sp"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
</LinearLayout>
<ScrollView
android:layout_width="match_parent"
android:layout_height="0dp"
android:background="@color/light_grey"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/top_nav">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="21dp"
android:orientation="vertical"
android:paddingVertical="21dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="15dp"
android:text="Submitted on 02 Jan 2025"
android:textSize="19sp" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/card_border_issue"
android:orientation="vertical"
android:padding="15dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="10dp"
android:gravity="center_vertical"
android:orientation="horizontal">
<ImageView
android:layout_width="23dp"
android:layout_height="27dp"
android:layout_marginEnd="15dp"
android:src="@drawable/file" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="ASH1-L011-N826"
android:textColor="@color/primary"
android:textSize="20sp"
android:textStyle="bold" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="10dp"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="10dp"
android:text="Total Issue(s):"
android:textColor="@color/grey"
android:textSize="20sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="5"
android:textSize="19sp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<Button
android:layout_width="139dp"
android:layout_height="wrap_content"
android:layout_marginEnd="10dp"
android:backgroundTint="@color/green"
android:clickable="true"
android:elevation="20dp"
android:focusable="true"
android:text="2 Accepted"
android:textColor="@android:color/white"
android:textSize="17sp"
app:cornerRadius="40dp" />
<Button
android:layout_width="139dp"
android:layout_height="wrap_content"
android:backgroundTint="@color/red"
android:clickable="true"
android:elevation="20dp"
android:focusable="true"
android:text="2 Rejected"
android:textColor="@android:color/white"
android:textSize="17sp"
app:cornerRadius="40dp" />
</LinearLayout>
</LinearLayout>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="15dp"
android:text="Submitted on 03 Jan 2025"
android:textSize="19sp"
android:layout_marginTop="20dp"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/card_border_issue"
android:orientation="vertical"
android:padding="15dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="10dp"
android:gravity="center_vertical"
android:orientation="horizontal">
<ImageView
android:layout_width="23dp"
android:layout_height="27dp"
android:layout_marginEnd="15dp"
android:src="@drawable/file" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="ASH1-L011-N826"
android:textColor="@color/primary"
android:textSize="20sp"
android:textStyle="bold" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="10dp"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="10dp"
android:text="Total Issue(s):"
android:textColor="@color/grey"
android:textSize="20sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="5"
android:textSize="19sp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<Button
android:layout_width="139dp"
android:layout_height="wrap_content"
android:layout_marginEnd="10dp"
android:backgroundTint="@color/green"
android:clickable="true"
android:elevation="20dp"
android:focusable="true"
android:text="9 Accepted"
android:textColor="@android:color/white"
android:textSize="17sp"
app:cornerRadius="40dp" />
<Button
android:layout_width="139dp"
android:layout_height="wrap_content"
android:backgroundTint="@color/red"
android:clickable="true"
android:elevation="20dp"
android:focusable="true"
android:text="3 Rejected"
android:textColor="@android:color/white"
android:textSize="17sp"
app:cornerRadius="40dp" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
</ScrollView>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
......@@ -16,6 +16,7 @@
<color name="blue">#2952D6</color>
<color name="red">#F14915</color>
<color name="green">#008000</color>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment