Commit 3ab075c8 authored by Amin's avatar Amin

taskbar ui and function in home screen

parent dcff634f
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project version="4"> <project version="4">
<component name="GradleMigrationSettings" migrationVersion="1" />
<component name="GradleSettings"> <component name="GradleSettings">
<option name="linkedExternalProjectsSettings"> <option name="linkedExternalProjectsSettings">
<GradleProjectSettings> <GradleProjectSettings>
......
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>
\ No newline at end of file
package com.example.qms; package com.example.qms;
import android.os.Bundle; import android.os.Bundle;
import android.view.View;
import androidx.activity.EdgeToEdge; import androidx.activity.EdgeToEdge;
import androidx.appcompat.app.AppCompatActivity; import androidx.appcompat.app.AppCompatActivity;
import androidx.core.graphics.Insets; import androidx.core.graphics.Insets;
import androidx.core.view.ViewCompat; import androidx.core.view.ViewCompat;
import androidx.core.view.WindowInsetsCompat; import androidx.core.view.WindowInsetsCompat;
import androidx.drawerlayout.widget.DrawerLayout;
public class MainActivity extends AppCompatActivity { public class MainActivity extends AppCompatActivity {
private DrawerLayout drawerLayout;
@Override @Override
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
EdgeToEdge.enable(this); EdgeToEdge.enable(this);
setContentView(R.layout.activity_main); setContentView(R.layout.activity_main);
// Apply system bar insets
ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.main), (v, insets) -> { ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.main), (v, insets) -> {
Insets systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars()); Insets systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars());
v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom); v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom);
return insets; return insets;
}); });
// Initialize DrawerLayout
drawerLayout = findViewById(R.id.drawerLayout);
// Handle hamburger click
View hamburgerButton = findViewById(R.id.hamburger);
View rightDrawer = findViewById(R.id.rightDrawer);
if (hamburgerButton != null && drawerLayout != null && rightDrawer != null) {
hamburgerButton.setOnClickListener(v -> {
if (drawerLayout.isDrawerOpen(rightDrawer)) {
drawerLayout.closeDrawer(rightDrawer);
} else {
drawerLayout.openDrawer(rightDrawer);
}
});
}
} }
} }
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" <androidx.drawerlayout.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/main" android:id="@+id/drawerLayout"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
tools:context=".MainActivity"> tools:context=".MainActivity">
<!-- ========== MAIN CONTENT ========== -->
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/main"
android:layout_width="match_parent"
android:layout_height="match_parent">
<FrameLayout <!-- TOP BAR -->
<LinearLayout
android:id="@+id/topBar"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="300dp" android:layout_height="59dp"
android:background="@color/primary"
android:orientation="horizontal"
android:gravity="center_vertical"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"> app:layout_constraintStart_toStartOf="parent">
<!-- Background Image -->
<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="centerCrop"
android:src="@drawable/cover_image" />
<!-- Top Left Button -->
<ImageButton <ImageButton
android:id="@+id/btnBack"
android:layout_width="32dp" android:layout_width="32dp"
android:layout_height="32dp" android:layout_height="32dp"
android:src="@drawable/arrow_left_no_bg" android:layout_marginStart="16dp"
android:layout_gravity="top|start" android:background="@android:color/transparent"
android:layout_margin="10dp" android:src="@drawable/arrow_left_no_bg" />
android:background="@null"/>
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text=""
android:textColor="@color/white"
android:textSize="20sp"
android:textStyle="bold"
android:gravity="center" />
<!-- Top Right Button -->
<ImageButton <ImageButton
android:id="@+id/hamburger"
android:layout_width="32dp" android:layout_width="32dp"
android:layout_height="32dp" android:layout_height="32dp"
android:src="@drawable/burger" android:layout_marginEnd="16dp"
android:layout_gravity="top|end" android:background="@android:color/transparent"
android:layout_margin="10dp" android:src="@drawable/burger" />
android:background="@null" </LinearLayout>
/>
<!-- Bottom Left Button -->
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="BL"
android:layout_gravity="bottom|start"
android:layout_margin="10dp"/>
<!-- Bottom Right Button -->
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="BR"
android:layout_gravity="bottom|end"
android:layout_margin="10dp"/>
</FrameLayout>
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
...@@ -72,8 +66,7 @@ ...@@ -72,8 +66,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" android:layout_weight="1"
android:orientation="vertical" android:orientation="vertical"
android:gravity="center" android:gravity="center">
android:paddingHorizontal="20dp">
<ImageView <ImageView
android:layout_width="32dp" android:layout_width="32dp"
...@@ -95,8 +88,7 @@ ...@@ -95,8 +88,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" android:layout_weight="1"
android:orientation="vertical" android:orientation="vertical"
android:gravity="center" android:gravity="center">
android:paddingHorizontal="20dp">
<ImageView <ImageView
android:layout_width="32dp" android:layout_width="32dp"
...@@ -118,8 +110,7 @@ ...@@ -118,8 +110,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" android:layout_weight="1"
android:orientation="vertical" android:orientation="vertical"
android:gravity="center" android:gravity="center">
android:paddingHorizontal="20dp">
<ImageView <ImageView
android:layout_width="32dp" android:layout_width="32dp"
...@@ -132,13 +123,218 @@ ...@@ -132,13 +123,218 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="View Access Item" android:text="View Access Item"
android:textColor="@color/white" android:textColor="@color/white"
android:textSize="16sp"/> android:textSize="16sp"
android:textAlignment="center"/>
</LinearLayout>
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
<LinearLayout
android:id="@+id/rightDrawer"
android:layout_width="400dp"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="@color/white"
android:layout_gravity="end">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="285dp"
android:background="@color/primary"
android:orientation="vertical"
android:gravity="center_vertical"
android:paddingHorizontal="30dp">
<androidx.cardview.widget.CardView
android:layout_width="59dp"
android:layout_height="59dp"
app:cardCornerRadius="59dp">
<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:src="@drawable/no_profile" />
</androidx.cardview.widget.CardView>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_marginTop="20dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="John Anthony Snow"
android:textColor="@color/white"
android:textSize="21sp"
android:textStyle="bold" />
</LinearLayout>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:backgroundTint="@color/secondary"
android:clickable="true"
android:elevation="20dp"
android:text="JohnSnow132"
android:textColor="@android:color/white"
android:textSize="17sp"
app:cornerRadius="27dp"
android:layout_marginTop="15dp"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/secondary"
android:orientation="vertical"
android:paddingHorizontal="30dp"
android:paddingTop="20dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingVertical="15dp">
<ImageView
android:layout_width="32dp"
android:layout_height="32dp"
android:src="@drawable/house_nav_icon"
android:layout_marginEnd="25dp"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Project List"
android:textColor="@color/white"
android:textSize="20sp"/>
</LinearLayout> </LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingVertical="15dp">
<ImageView
android:layout_width="32dp"
android:layout_height="32dp"
android:src="@drawable/notifications_nav_icon"
android:layout_marginEnd="25dp"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Notifications"
android:textColor="@color/white"
android:textSize="20sp"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingVertical="15dp">
<ImageView
android:layout_width="32dp"
android:layout_height="32dp"
android:src="@drawable/announcement_nav_icon"
android:layout_marginEnd="25dp"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Announcement"
android:textColor="@color/white"
android:textSize="20sp"/>
</LinearLayout> </LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingVertical="15dp">
<ImageView
android:layout_width="32dp"
android:layout_height="32dp"
android:src="@drawable/help_nav_icon"
android:layout_marginEnd="25dp"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Help"
android:textColor="@color/white"
android:textSize="20sp"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingVertical="15dp">
<ImageView
android:layout_width="32dp"
android:layout_height="32dp"
android:src="@drawable/sync_nav_icon"
android:layout_marginEnd="25dp"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Sync"
android:textColor="@color/white"
android:textSize="20sp"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingVertical="15dp">
<ImageView
android:layout_width="32dp"
android:layout_height="32dp"
android:src="@drawable/logout_nav_icon"
android:layout_marginEnd="25dp"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Log Out"
android:textColor="@color/white"
android:textSize="20sp"/>
</LinearLayout>
</LinearLayout>
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.drawerlayout.widget.DrawerLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto">
<LinearLayout
android:id="@+id/rightDrawer"
android:layout_width="400dp"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="@color/white"
android:layout_gravity="end">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="285dp"
android:background="@color/primary"
android:orientation="vertical"
android:gravity="center_vertical"
android:paddingHorizontal="30dp">
<androidx.cardview.widget.CardView
android:layout_width="59dp"
android:layout_height="59dp"
app:cardCornerRadius="59dp">
<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:src="@drawable/no_profile" />
</androidx.cardview.widget.CardView>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_marginTop="20dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="John Anthony Snow"
android:textColor="@color/white"
android:textSize="21sp"
android:textStyle="bold" />
</LinearLayout>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:backgroundTint="@color/secondary"
android:clickable="true"
android:elevation="20dp"
android:text="JohnSnow132"
android:textColor="@android:color/white"
android:textSize="17sp"
app:cornerRadius="27dp"
android:layout_marginTop="15dp"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/secondary"
android:orientation="vertical"
android:paddingHorizontal="30dp"
android:paddingTop="20dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingVertical="15dp">
<ImageView
android:layout_width="32dp"
android:layout_height="32dp"
android:src="@drawable/house_nav_icon"
android:layout_marginEnd="25dp"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Project List"
android:textColor="@color/white"
android:textSize="20sp"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingVertical="15dp">
<ImageView
android:layout_width="32dp"
android:layout_height="32dp"
android:src="@drawable/notifications_nav_icon"
android:layout_marginEnd="25dp"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Notifications"
android:textColor="@color/white"
android:textSize="20sp"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingVertical="15dp">
<ImageView
android:layout_width="32dp"
android:layout_height="32dp"
android:src="@drawable/announcement_nav_icon"
android:layout_marginEnd="25dp"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Announcement"
android:textColor="@color/white"
android:textSize="20sp"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingVertical="15dp">
<ImageView
android:layout_width="32dp"
android:layout_height="32dp"
android:src="@drawable/help_nav_icon"
android:layout_marginEnd="25dp"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Help"
android:textColor="@color/white"
android:textSize="20sp"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingVertical="15dp">
<ImageView
android:layout_width="32dp"
android:layout_height="32dp"
android:src="@drawable/sync_nav_icon"
android:layout_marginEnd="25dp"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Sync"
android:textColor="@color/white"
android:textSize="20sp"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingVertical="15dp">
<ImageView
android:layout_width="32dp"
android:layout_height="32dp"
android:src="@drawable/logout_nav_icon"
android:layout_marginEnd="25dp"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Log Out"
android:textColor="@color/white"
android:textSize="20sp"/>
</LinearLayout>
</LinearLayout>
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
//qms //qms
<color name="primary">#0E7392</color> <color name="primary">#0E7392</color>
<color name="secondary">#00526B</color>
<color name="dark_grey">#000000</color> <color name="dark_grey">#000000</color>
<color name="tertiary">#DCF7FF</color> <color name="tertiary">#DCF7FF</color>
<color name="grey">#6D6D6D</color> <color name="grey">#6D6D6D</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