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);
}
});
}
}
}
This diff is collapsed.
<?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