Commit 3ab075c8 authored by Amin's avatar Amin

taskbar ui and function in home screen

parent dcff634f
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="GradleMigrationSettings" migrationVersion="1" />
<component name="GradleSettings">
<option name="linkedExternalProjectsSettings">
<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;
import android.os.Bundle;
import android.view.View;
import androidx.activity.EdgeToEdge;
import androidx.appcompat.app.AppCompatActivity;
import androidx.core.graphics.Insets;
import androidx.core.view.ViewCompat;
import androidx.core.view.WindowInsetsCompat;
import androidx.drawerlayout.widget.DrawerLayout;
public class MainActivity extends AppCompatActivity {
private DrawerLayout drawerLayout;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
EdgeToEdge.enable(this);
setContentView(R.layout.activity_main);
// Apply system bar insets
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;
});
// 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);
}
});
}
}
}
\ 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"
<androidx.drawerlayout.widget.DrawerLayout 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:id="@+id/drawerLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">
<FrameLayout
<!-- ========== MAIN CONTENT ========== -->
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/main"
android:layout_width="match_parent"
android:layout_height="300dp"
app:layout_constraintTop_toTopOf="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
android:layout_width="32dp"
android:layout_height="32dp"
android:src="@drawable/arrow_left_no_bg"
android:layout_gravity="top|start"
android:layout_margin="10dp"
android:background="@null"/>
<!-- Top Right Button -->
<ImageButton
android:layout_width="32dp"
android:layout_height="32dp"
android:src="@drawable/burger"
android:layout_gravity="top|end"
android:layout_margin="10dp"
android:background="@null"
/>
<!-- 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>
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="85dp"
android:background="@color/primary"
android:orientation="horizontal"
android:gravity="center"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent">
<!-- Left -->
<!-- TOP BAR -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical"
android:gravity="center"
android:paddingHorizontal="20dp">
android:id="@+id/topBar"
android:layout_width="match_parent"
android:layout_height="59dp"
android:background="@color/primary"
android:orientation="horizontal"
android:gravity="center_vertical"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent">
<ImageView
<ImageButton
android:id="@+id/btnBack"
android:layout_width="32dp"
android:layout_height="32dp"
android:src="@drawable/calendar_icon"
android:layout_marginBottom="5dp"/>
android:layout_marginStart="16dp"
android:background="@android:color/transparent"
android:src="@drawable/arrow_left_no_bg" />
<TextView
android:layout_width="wrap_content"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="Make Appt."
android:layout_weight="1"
android:text=""
android:textColor="@color/white"
android:textSize="16sp"/>
android:textSize="20sp"
android:textStyle="bold"
android:gravity="center" />
<ImageButton
android:id="@+id/hamburger"
android:layout_width="32dp"
android:layout_height="32dp"
android:layout_marginEnd="16dp"
android:background="@android:color/transparent"
android:src="@drawable/burger" />
</LinearLayout>
<!-- Center -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="85dp"
android:background="@color/primary"
android:orientation="horizontal"
android:gravity="center"
android:paddingHorizontal="20dp">
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent">
<ImageView
android:layout_width="32dp"
android:layout_height="32dp"
android:src="@drawable/add_issue_icon"
android:layout_marginBottom="5dp"/>
<!-- Left -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical"
android:gravity="center">
<TextView
android:layout_width="wrap_content"
<ImageView
android:layout_width="32dp"
android:layout_height="32dp"
android:src="@drawable/calendar_icon"
android:layout_marginBottom="5dp"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Make Appt."
android:textColor="@color/white"
android:textSize="16sp"/>
</LinearLayout>
<!-- Center -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="Add Issue"
android:textColor="@color/white"
android:textSize="16sp"/>
android:layout_weight="1"
android:orientation="vertical"
android:gravity="center">
<ImageView
android:layout_width="32dp"
android:layout_height="32dp"
android:src="@drawable/add_issue_icon"
android:layout_marginBottom="5dp"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Add Issue"
android:textColor="@color/white"
android:textSize="16sp"/>
</LinearLayout>
<!-- Right -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical"
android:gravity="center">
<ImageView
android:layout_width="32dp"
android:layout_height="32dp"
android:src="@drawable/access_item_icon"
android:layout_marginBottom="5dp"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="View Access Item"
android:textColor="@color/white"
android:textSize="16sp"
android:textAlignment="center"/>
</LinearLayout>
</LinearLayout>
<!-- Right -->
</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="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_width="match_parent"
android:layout_height="285dp"
android:background="@color/primary"
android:orientation="vertical"
android:gravity="center"
android:paddingHorizontal="20dp">
android:gravity="center_vertical"
android:paddingHorizontal="30dp">
<ImageView
android:layout_width="32dp"
android:layout_height="32dp"
android:src="@drawable/access_item_icon"
android:layout_marginBottom="5dp"/>
<androidx.cardview.widget.CardView
android:layout_width="59dp"
android:layout_height="59dp"
app:cardCornerRadius="59dp">
<TextView
<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:text="View Access Item"
android:textColor="@color/white"
android:textSize="16sp"/>
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>
<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
</androidx.drawerlayout.widget.DrawerLayout>
<?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 @@
//qms
<color name="primary">#0E7392</color>
<color name="secondary">#00526B</color>
<color name="dark_grey">#000000</color>
<color name="tertiary">#DCF7FF</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