Commit bea10f55 authored by Amin's avatar Amin

fix issues withdraw & summary

parent ed28bdd0
package com.example.qms; package com.example.qms;
import android.app.AlertDialog;
import android.os.Bundle; import android.os.Bundle;
import android.widget.Button;
import android.widget.ImageButton; import android.widget.ImageButton;
import android.widget.Toast;
import androidx.activity.EdgeToEdge; import androidx.activity.EdgeToEdge;
import androidx.appcompat.app.AppCompatActivity; import androidx.appcompat.app.AppCompatActivity;
...@@ -13,6 +16,8 @@ public class WithdrawIssueSummary extends AppCompatActivity { ...@@ -13,6 +16,8 @@ public class WithdrawIssueSummary extends AppCompatActivity {
private ImageButton back_button; private ImageButton back_button;
private Button confirmButton, back_button_bot;
@Override @Override
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
...@@ -25,9 +30,39 @@ public class WithdrawIssueSummary extends AppCompatActivity { ...@@ -25,9 +30,39 @@ public class WithdrawIssueSummary extends AppCompatActivity {
}); });
back_button = findViewById(R.id.backButton); back_button = findViewById(R.id.backButton);
confirmButton = findViewById(R.id.confirm_button);
back_button_bot = findViewById(R.id.backButtonBot);
back_button.setOnClickListener(v -> { back_button.setOnClickListener(v -> {
onBackPressed(); onBackPressed();
}); });
back_button_bot.setOnClickListener(v -> {
onBackPressed();
});
confirmButton.setOnClickListener(v -> {
new AlertDialog.Builder(WithdrawIssueSummary.this)
.setTitle("Alert")
.setMessage("Confirm to withdraw issue?")
.setNegativeButton("No", (dialog, which) -> {
dialog.dismiss();
})
.setPositiveButton("Yes", (dialog, which) -> {
dialog.dismiss();
// Second alert: success message
new AlertDialog.Builder(WithdrawIssueSummary.this)
.setTitle("Success")
.setMessage("You have successfully withdrawn 2 issue(s).")
.setPositiveButton("OK", (d, w) -> d.dismiss())
.show();
})
.show();
});
} }
} }
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="@color/light_grey" />
<corners android:radius="21dp" />
</shape>
...@@ -62,16 +62,16 @@ ...@@ -62,16 +62,16 @@
android:layout_width="24dp" android:layout_width="24dp"
android:layout_height="26dp" android:layout_height="26dp"
android:layout_marginEnd="20dp" android:layout_marginEnd="20dp"
android:src="@drawable/check_list"
android:background="@android:color/transparent" android:background="@android:color/transparent"
android:scaleType="centerInside"/> android:scaleType="centerInside"
android:src="@drawable/check_list" />
<ImageButton <ImageButton
android:layout_width="24dp" android:layout_width="24dp"
android:layout_height="24dp" android:layout_height="24dp"
android:src="@drawable/profile_tick"
android:background="@android:color/transparent" android:background="@android:color/transparent"
android:scaleType="centerInside"/> android:scaleType="centerInside"
android:src="@drawable/profile_tick" />
</LinearLayout> </LinearLayout>
...@@ -91,35 +91,79 @@ ...@@ -91,35 +91,79 @@
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="76dp"
android:layout_marginTop="10dp" android:orientation="vertical"
android:background="@drawable/background_border" android:gravity="center_vertical">
android:orientation="horizontal"
android:padding="15dp">
<TextView <LinearLayout
android:layout_width="wrap_content" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginEnd="10dp" android:layout_marginTop="10dp"
android:text="Filter By: " android:background="@drawable/background_border"
android:textColor="@color/black" android:orientation="horizontal"
android:textSize="19sp" /> android:paddingHorizontal="15dp"
android:paddingVertical="10dp">
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" android:layout_marginEnd="10dp"
android:text="All" android:text="Filter By: "
android:textColor="@color/black" android:textColor="@color/black"
android:textSize="19sp" android:textSize="19sp" />
android:textStyle="bold" />
<ImageButton <TextView
android:layout_width="27dp" android:layout_width="wrap_content"
android:layout_height="27dp" android:layout_height="wrap_content"
android:background="@color/white" android:layout_weight="1"
android:src="@drawable/filter" /> android:text="All"
android:textColor="@color/black"
android:textSize="19sp"
android:textStyle="bold" />
<ImageButton
android:layout_width="27dp"
android:layout_height="27dp"
android:background="@color/white"
android:src="@drawable/filter" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="76dp"
android:orientation="vertical"
android:gravity="center_vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="50dp"
android:background="@drawable/search_background"
android:gravity="center_vertical"
android:orientation="horizontal"
android:paddingHorizontal="15dp">
<ImageView
android:layout_width="21dp"
android:layout_height="21dp"
android:contentDescription="Search Icon"
android:src="@drawable/search_grey" />
<EditText
android:id="@+id/search_bar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:background="@null"
android:hint="Search Reference No./Location"
android:inputType="text"
android:padding="0dp"
android:textColorHint="#B0B0B0"
android:textSize="19sp" />
</LinearLayout>
</LinearLayout> </LinearLayout>
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
android:layout_height="32dp" android:layout_height="32dp"
android:layout_marginStart="16dp" android:layout_marginStart="16dp"
android:background="@null" android:background="@null"
android:src="@drawable/arrow_left" android:src="@drawable/cancel"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />
...@@ -55,10 +55,78 @@ ...@@ -55,10 +55,78 @@
android:id="@+id/mid_bar" android:id="@+id/mid_bar"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="149dp" android:layout_height="149dp"
android:background="@color/black"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/top_nav" app:layout_constraintTop_toBottomOf="@+id/top_nav"
android:orientation="vertical"> android:orientation="vertical"
android:paddingHorizontal="21dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="76dp"
android:orientation="horizontal"
android:gravity="center">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="50dp"
android:background="@drawable/search_background"
android:gravity="center_vertical"
android:orientation="horizontal"
android:paddingHorizontal="15dp"
android:layout_weight="1"
android:layout_marginEnd="20dp">
<ImageView
android:layout_width="21dp"
android:layout_height="21dp"
android:contentDescription="Search Icon"
android:src="@drawable/search_grey" />
<EditText
android:id="@+id/search_bar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:background="@null"
android:hint="Search Reference No./Location"
android:inputType="text"
android:padding="0dp"
android:textColorHint="#B0B0B0"
android:textSize="19sp" />
</LinearLayout>
<ImageButton
android:layout_width="27dp"
android:layout_height="27dp"
android:src="@drawable/filter"
android:background="@color/white"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="76dp"
android:orientation="horizontal"
android:gravity="center_vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="All Issues"
android:textStyle="bold"
android:textSize="21sp"
android:layout_weight="1"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Select All"
android:textSize="19sp"
android:textColor="@color/primary"/>
</LinearLayout>
</LinearLayout> </LinearLayout>
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
android:layout_height="32dp" android:layout_height="32dp"
android:layout_marginStart="16dp" android:layout_marginStart="16dp"
android:background="@null" android:background="@null"
android:src="@drawable/arrow_left" android:src="@drawable/cancel"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />
...@@ -224,8 +224,10 @@ ...@@ -224,8 +224,10 @@
app:layout_constraintStart_toStartOf="parent"> app:layout_constraintStart_toStartOf="parent">
<Button <Button
android:layout_width="180dp" android:id="@+id/backButtonBot"
android:layout_width="0dp"
android:layout_height="64dp" android:layout_height="64dp"
android:layout_weight="1"
android:layout_marginEnd="10dp" android:layout_marginEnd="10dp"
android:backgroundTint="@color/white" android:backgroundTint="@color/white"
android:clickable="true" android:clickable="true"
...@@ -239,16 +241,19 @@ ...@@ -239,16 +241,19 @@
app:strokeWidth="1dp" /> app:strokeWidth="1dp" />
<Button <Button
android:layout_width="180dp" android:id="@+id/confirm_button"
android:layout_width="0dp"
android:layout_height="64dp" android:layout_height="64dp"
android:layout_weight="1"
android:backgroundTint="@color/sync_button" android:backgroundTint="@color/sync_button"
android:clickable="true" android:clickable="true"
android:elevation="20dp" android:elevation="20dp"
android:focusable="true" android:focusable="true"
android:text="Comfirm" android:text="Confirm"
android:textColor="@android:color/white" android:textColor="@android:color/white"
android:textSize="17sp" android:textSize="17sp"
app:cornerRadius="21dp" /> app:cornerRadius="21dp"
android:paddingHorizontal="30dp"/>
</LinearLayout> </LinearLayout>
......
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