Commit b4ee0f71 authored by Amin's avatar Amin

add history activity and ui

parent 39d90132
...@@ -12,6 +12,12 @@ ...@@ -12,6 +12,12 @@
android:supportsRtl="true" android:supportsRtl="true"
android:theme="@style/Theme.Qms"> android:theme="@style/Theme.Qms">
<activity <activity
android:name=".AddInfo"
android:exported="false" />
<activity
android:name=".History"
android:exported="false" />
<activity
android:name=".IssueDetails" android:name=".IssueDetails"
android:exported="false" /> android:exported="false" />
<activity <activity
......
package com.example.qms;
import android.os.Bundle;
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 AddInfo extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
EdgeToEdge.enable(this);
setContentView(R.layout.activity_add_info);
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;
});
}
}
\ No newline at end of file
package com.example.qms;
import android.content.Intent;
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 History extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
EdgeToEdge.enable(this);
setContentView(R.layout.activity_history);
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 addInfo = findViewById(R.id.add_info_icon);
addInfo.setOnClickListener(v -> {
Intent intent = new Intent(History.this, AddInfo.class);
startActivity(intent);
});
}
}
\ No newline at end of file
package com.example.qms; package com.example.qms;
import android.content.Intent;
import android.os.Bundle; import android.os.Bundle;
import android.widget.ImageButton; import android.widget.ImageButton;
...@@ -23,6 +24,12 @@ public class IssueDetails extends AppCompatActivity { ...@@ -23,6 +24,12 @@ public class IssueDetails extends AppCompatActivity {
}); });
ImageButton backButton = findViewById(R.id.backButton); ImageButton backButton = findViewById(R.id.backButton);
ImageButton historyButton = findViewById(R.id.history_button);
historyButton.setOnClickListener(v -> {
Intent intent = new Intent(IssueDetails.this, History.class);
startActivity(intent);
});
backButton.setOnClickListener(v -> { backButton.setOnClickListener(v -> {
onBackPressed(); onBackPressed();
......
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="@color/black" />
<stroke android:width="1dp" android:color="@color/black" />
<corners android:radius="40dp" />
</shape>
<?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=".AddInfo">
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
This diff is collapsed.
...@@ -2,6 +2,8 @@ ...@@ -2,6 +2,8 @@
<resources> <resources>
<color name="black">#FF000000</color> <color name="black">#FF000000</color>
<color name="white">#FFFFFFFF</color> <color name="white">#FFFFFFFF</color>
<color name="timeline_grey">#999999</color>
//qms //qms
<color name="primary">#0E7392</color> <color name="primary">#0E7392</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