Commit d233b972 authored by Amin's avatar Amin

create full screen view on issue details screen

parent 26098f97
......@@ -12,6 +12,9 @@
android:supportsRtl="true"
android:theme="@style/Theme.Qms">
<activity
android:name=".UnitLayoutFullscreen"
android:exported="false" />
<activity
android:name=".OwnerAcceptanceFormDetail"
android:exported="false" />
<activity
......
......@@ -2,6 +2,7 @@ package com.example.qms;
import android.content.Intent;
import android.os.Bundle;
import android.widget.FrameLayout;
import android.widget.ImageButton;
import androidx.activity.EdgeToEdge;
......@@ -25,6 +26,12 @@ public class IssueDetails extends AppCompatActivity {
ImageButton backButton = findViewById(R.id.backButton);
ImageButton historyButton = findViewById(R.id.history_button);
FrameLayout imageFullscreen = findViewById(R.id.image_fullscreen);
imageFullscreen.setOnClickListener(v -> {
Intent intent = new Intent(IssueDetails.this, UnitLayoutFullscreen.class);
startActivity(intent);
});
historyButton.setOnClickListener(v -> {
Intent intent = new Intent(IssueDetails.this, History.class);
......
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 UnitLayoutFullscreen extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
EdgeToEdge.enable(this);
setContentView(R.layout.activity_unit_layout_fullscreen);
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 cancelButton = findViewById(R.id.cancel_button);
cancelButton.setOnClickListener(v -> {
onBackPressed();
});
}
}
\ No newline at end of file
......@@ -123,6 +123,7 @@
</LinearLayout>
<FrameLayout
android:id="@+id/image_fullscreen"
android:layout_width="85dp"
android:layout_height="85dp"
android:background="@drawable/background_border">
......
<?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=".UnitLayoutFullscreen">
<LinearLayout
android:id="@+id/top_nav"
android:layout_width="match_parent"
android:layout_height="117dp"
android:background="@color/black"
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/cancel_button"
android:layout_width="32dp"
android:layout_height="32dp"
android:layout_marginStart="16dp"
android:background="@null"
android:src="@drawable/cancel"
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="L-01-1"
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>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/top_nav"
app:layout_constraintBottom_toBottomOf="parent"
android:orientation="vertical"
android:background="@color/black"
android:gravity="center">
<ImageView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:src="@drawable/faciity_layout_big"
android:scaleType="centerCrop"/>
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
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