Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
80 commits
Select commit Hold shift + click to select a range
c070581
- xml files for the design of the left hand nav
pm-dimagi Jul 23, 2025
6399a2b
-added string files
pm-dimagi Jul 23, 2025
51334c2
-logout avtar
pm-dimagi Jul 23, 2025
8db967e
-code rabbit comments
pm-dimagi Jul 23, 2025
a6be717
-language support
pm-dimagi Jul 23, 2025
35fbc60
-icon with common prefix
pm-dimagi Jul 23, 2025
a2fd28c
- class for sub child item
pm-dimagi Jul 23, 2025
e040482
Merge branch 'commcare_2.58' of https://github.com/dimagi/commcare-an…
pm-dimagi Jul 26, 2025
1bfe751
Set up the ui changes for the left hand drawer
pm-dimagi Jul 30, 2025
867a330
removed extra class
pm-dimagi Jul 30, 2025
0e505cf
formatted screen_login class with only change required
pm-dimagi Jul 30, 2025
3304d08
created basedraweractivity and it related class
pm-dimagi Jul 30, 2025
bd82ba4
added string
pm-dimagi Jul 30, 2025
02ce415
added drawer to login activity
pm-dimagi Jul 30, 2025
0216162
Merge pull request #3278 from dimagi/pm_ccct_1514
pm-dimagi Jul 30, 2025
40f5e64
Merge branch 'master' of https://github.com/dimagi/commcare-android i…
pm-dimagi Jul 30, 2025
a0a3c1f
just putting id on the right text view
pm-dimagi Jul 30, 2025
f53ca46
putting updates on basedrawer
pm-dimagi Jul 30, 2025
fe411c0
- catured analytics event
pm-dimagi Jul 30, 2025
5a14c18
- renaming values
pm-dimagi Jul 30, 2025
8fc8b7a
-resolved coderabbit comments
pm-dimagi Jul 31, 2025
e37c1b2
-base drawer landscape mode
pm-dimagi Jul 31, 2025
cd1d5d6
- set text appearence
pm-dimagi Jul 31, 2025
d15c9c5
- set text appearence on disable state
pm-dimagi Jul 31, 2025
aaace5d
- set about commcare at bottom
pm-dimagi Jul 31, 2025
60558f3
- hide the disabled items
pm-dimagi Jul 31, 2025
c9d78ef
- hide the manage profile
pm-dimagi Jul 31, 2025
dee14de
- update the drawer before it get opened
pm-dimagi Jul 31, 2025
5d4c7c0
- hide keyboard function in the base class
pm-dimagi Jul 31, 2025
2a91927
- make return item type when child is selected
pm-dimagi Jul 31, 2025
ad71007
- make adapter initilize once
pm-dimagi Jul 31, 2025
7cd539d
- make size 24 for the icon
pm-dimagi Aug 1, 2025
0fa1c60
- hide footer
pm-dimagi Aug 1, 2025
ddc8579
- removed elevation from the card
pm-dimagi Aug 1, 2025
321c886
- remove hide keyboard and used from pre existing function
pm-dimagi Aug 1, 2025
1dc415d
- used general item id for analytics
pm-dimagi Aug 1, 2025
07f1696
- hide footer
pm-dimagi Aug 1, 2025
a4aa6e7
- moved visibility to xml, support action enforce non-nullability
pm-dimagi Aug 1, 2025
a913845
- removed the unecessry comment and marked function ope
pm-dimagi Aug 1, 2025
6b3d877
- abstracted togglesignisstae method
pm-dimagi Aug 1, 2025
997e02b
- abstracted method to show dialog
pm-dimagi Aug 1, 2025
b2f8920
- used glide to show user image
pm-dimagi Aug 1, 2025
3095556
- used glide to show user image
pm-dimagi Aug 1, 2025
14ac894
function rename and removed unused imports
pm-dimagi Aug 1, 2025
54330fc
used data binding
pm-dimagi Aug 1, 2025
d3c947c
refresh list on the click of parent item to get expand
pm-dimagi Aug 1, 2025
30db5f9
width in dimen , and footer back in code
pm-dimagi Aug 1, 2025
10ee421
- extending nav drawer to setup page
pm-dimagi Aug 4, 2025
92618b8
- set version name in drawer
pm-dimagi Aug 4, 2025
e97a35c
expanded view wen lengthis less than 2
pm-dimagi Aug 4, 2025
385841d
replacing the arrow
pm-dimagi Aug 4, 2025
13e240c
to show commcare apps when it is login activity
pm-dimagi Aug 4, 2025
f573dec
logic on the click of appid
pm-dimagi Aug 4, 2025
e763d59
removed close icon inside the drawer
pm-dimagi Aug 4, 2025
8e87bd3
provided dimens value for different screen size, remove unused import
pm-dimagi Aug 5, 2025
e0759c5
mad app version small and disable
pm-dimagi Aug 5, 2025
349c5bc
renamed variables
pm-dimagi Aug 5, 2025
14636fc
- updated dimen values
pm-dimagi Aug 5, 2025
0fe024e
- added translations
pm-dimagi Aug 5, 2025
3c6174f
- removed drawer menu from switch case
pm-dimagi Aug 5, 2025
00e9b9c
- remove unecessary variable
pm-dimagi Aug 5, 2025
1781cb4
Merge pull request #3283 from dimagi/pm_setup_page
pm-dimagi Aug 5, 2025
f778f6d
Merge branch 'master' of https://github.com/dimagi/commcare-android i…
pm-dimagi Aug 5, 2025
1f07fba
- implement the nav drawer based on Controller
pm-dimagi Aug 6, 2025
6bbc9a2
- Basedrawercontroller file
pm-dimagi Aug 6, 2025
fbab02b
- used the drawer design in the main layout only
pm-dimagi Aug 6, 2025
f9f0193
- setup for commcare activity
pm-dimagi Aug 6, 2025
2eb1574
- setup for standardhomeactivity
pm-dimagi Aug 6, 2025
686c7ab
- put check for personal id logged in
pm-dimagi Aug 7, 2025
3abb51b
- design for landscape mode
pm-dimagi Aug 7, 2025
0476c20
- make the function as a part of commcare activity
pm-dimagi Aug 7, 2025
7135d58
- removed the logic from onoptionselected
pm-dimagi Aug 7, 2025
748a421
- removed the logic from CommCareActivity and moved to basedraweracti…
pm-dimagi Aug 7, 2025
e6f3f2a
- base drawer activity
pm-dimagi Aug 7, 2025
d18fe32
- removed biolerplate code
pm-dimagi Aug 8, 2025
19174b2
Merge branch 'master' of https://github.com/dimagi/commcare-android i…
pm-dimagi Aug 8, 2025
381cbb2
Merge branch 'master' of https://github.com/dimagi/commcare-android i…
pm-dimagi Aug 8, 2025
0e4a0ed
Merge branch 'pm_CCCT-1515' of https://github.com/dimagi/commcare-and…
pm-dimagi Aug 8, 2025
eb3085c
Merge pull request #3287 from dimagi/pm_nav_design_change
pm-dimagi Aug 8, 2025
2497591
merged code from master
pm-dimagi Aug 8, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions app/res/color/nav_drawer_text.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:color="@color/nav_drawer_disable_color" android:state_enabled="false"/>
<item android:color="@color/white" android:state_enabled="true"/>
</selector>
6 changes: 6 additions & 0 deletions app/res/drawable/nav_drawer_app_icon.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<vector android:height="24dp" android:tint="#FFFFFF"
android:viewportHeight="24" android:viewportWidth="24"
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="@android:color/white"
android:fillType="evenOdd" android:pathData="M3,3v8h8L11,3L3,3zM9,9L5,9L5,5h4v4zM3,13v8h8v-8L3,13zM9,19L5,19v-4h4v4zM13,3v8h8L21,3h-8zM19,9h-4L15,5h4v4zM13,13v8h8v-8h-8zM19,19h-4v-4h4v4z"/>
</vector>
11 changes: 11 additions & 0 deletions app/res/drawable/nav_drawer_arrow_down.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:height="24dp"
android:viewportHeight="24"
android:viewportWidth="24"
android:width="24dp">

<path
android:fillColor="@android:color/white"
android:pathData="M7.41,8.59L12,13.17l4.59,-4.58L18,10l-6,6 -6,-6 1.41,-1.41z" />

</vector>
10 changes: 10 additions & 0 deletions app/res/drawable/nav_drawer_help_icon.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:autoMirrored="true"
android:height="24dp"
android:viewportHeight="24"
android:viewportWidth="24"
android:width="24dp">
<path
android:fillColor="@android:color/white"
android:pathData="M11,18h2v-2h-2v2zM12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM12,20c-4.41,0 -8,-3.59 -8,-8s3.59,-8 8,-8 8,3.59 8,8 -3.59,8 -8,8zM12,6c-2.21,0 -4,1.79 -4,4h2c0,-1.1 0.9,-2 2,-2s2,0.9 2,2c0,2 -3,1.75 -3,5h2c0,-2.25 3,-2.5 3,-5 0,-2.21 -1.79,-4 -4,-4z" />
</vector>
19 changes: 19 additions & 0 deletions app/res/drawable/nav_drawer_logged_out_avatar.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android" xmlns:aapt="http://schemas.android.com/aapt"
android:viewportWidth="135"
android:viewportHeight="135"
android:width="135dp"
android:height="135dp">
<path
android:pathData="M135 67.5A67.5 67.5 0 0 1 0 67.5A67.5 67.5 0 0 1 135 67.5Z"
android:fillColor="#DDDDDD"
android:fillAlpha="0.8" />
<path
android:pathData="M130 67.5A62.5 62.5 0 0 1 5 67.5A62.5 62.5 0 0 1 130 67.5Z"
android:fillColor="#F6F6F6" />
<path
android:pathData="M96.3333 97V89.6667C96.3333 85.7768 94.7881 82.0463 92.0376 79.2958C89.287 76.5452 85.5565 75 81.6667 75H52.3333C48.4435 75 44.713 76.5452 41.9624 79.2958C39.2119 82.0463 37.6667 85.7768 37.6667 89.6667V97M81.6667 45.6667C81.6667 53.7668 75.1002 60.3333 67 60.3333C58.8998 60.3333 52.3333 53.7668 52.3333 45.6667C52.3333 37.5665 58.8998 31 67 31C75.1002 31 81.6667 37.5665 81.6667 45.6667Z"
android:strokeColor="#A1A1A1"
android:strokeWidth="1.5"
android:strokeLineCap="round"
android:strokeLineJoin="round" />
</vector>
9 changes: 9 additions & 0 deletions app/res/drawable/nav_drawer_message_icon.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:height="24dp"
android:viewportHeight="24"
android:viewportWidth="24"
android:width="24dp">
<path
android:fillColor="@android:color/white"
android:pathData="M20,2L4,2c-1.1,0 -2,0.9 -2,2v18l4,-4h14c1.1,0 2,-0.9 2,-2L22,4c0,-1.1 -0.9,-2 -2,-2zM20,16L6,16l-2,2L4,4h16v12z" />
</vector>
14 changes: 14 additions & 0 deletions app/res/drawable/nav_drawer_opportunity_icon.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="25"
android:viewportHeight="24">
<path
android:fillColor="@color/transparent"
android:strokeColor="#ffffff"
android:strokeWidth="1.5"
android:strokeLineJoin="round"
android:strokeLineCap="round"
android:pathData="M11.0927 13.6631C11.5567 14.2372 12.1487 14.7122 12.8285 15.056C13.5083 15.3997 14.2601 15.6042 15.0328 15.6554C15.8055 15.7066 16.5811 15.6034 17.3069 15.3528C18.0327 15.1022 18.6918 14.7101 19.2395 14.2031L22.481 11.2031C23.465 10.26 24.0096 8.99703 23.9973 7.68605C23.985 6.37506 23.4168 5.121 22.4151 4.19396C21.4135 3.26692 20.0585 2.74107 18.642 2.72968C17.2255 2.71829 15.8608 3.22226 14.8419 4.13305L12.9835 5.84305M15.4146 11.6631C14.9506 11.0889 14.3586 10.6139 13.6787 10.2701C12.9989 9.92635 12.2471 9.72193 11.4744 9.67072C10.7017 9.6195 9.92618 9.72268 9.20035 9.97327C8.47453 10.2239 7.81542 10.616 7.26774 11.1231L4.02629 14.1231C3.04219 15.0661 2.49766 16.3291 2.50997 17.6401C2.52228 18.951 3.09045 20.2051 4.0921 21.1321C5.09375 22.0592 6.44874 22.585 7.86524 22.5964C9.28174 22.6078 10.6464 22.1038 11.6653 21.1931L13.5129 19.4831" />
</vector>
9 changes: 9 additions & 0 deletions app/res/drawable/nav_drawer_payments_icon.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:height="24dp"
android:viewportHeight="24"
android:viewportWidth="24"
android:width="24dp">
<path
android:fillColor="@android:color/white"
android:pathData="M20,4L4,4c-1.11,0 -1.99,0.89 -1.99,2L2,18c0,1.11 0.89,2 2,2h16c1.11,0 2,-0.89 2,-2L22,6c0,-1.11 -0.89,-2 -2,-2zM20,18L4,18v-6h16v6zM20,8L4,8L4,6h16v2z" />
</vector>
Binary file added app/res/drawable/nav_drawer_person_avatar.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions app/res/drawable/nav_drawer_worker_history_icon.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:height="24dp"
android:viewportHeight="24"
android:viewportWidth="24"
android:width="24dp">
<path
android:fillColor="@android:color/white"
android:pathData="M11.99,2C6.47,2 2,6.48 2,12s4.47,10 9.99,10C17.52,22 22,17.52 22,12S17.52,2 11.99,2zM12,20c-4.42,0 -8,-3.58 -8,-8s3.58,-8 8,-8 8,3.58 8,8 -3.58,8 -8,8z" />
<path
android:fillColor="@android:color/white"
android:pathData="M12.5,7H11v6l5.25,3.15 0.75,-1.23 -4.5,-2.67z" />
</vector>
19 changes: 17 additions & 2 deletions app/res/layout-land/home_screen.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
<androidx.drawerlayout.widget.DrawerLayout
android:id="@+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:tag="layout/activity_login_0"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto">

<FrameLayout
android:id="@+id/nav_drawer_frame"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white">
<LinearLayout
style="@style/MainPane"
android:layout_width="match_parent"
android:layout_height="wrap_content"
Expand Down Expand Up @@ -81,3 +93,6 @@
</RelativeLayout>
</androidx.core.widget.NestedScrollView>
</LinearLayout>
</FrameLayout>
<include layout="@layout/nav_drawer_base"/>
</androidx.drawerlayout.widget.DrawerLayout>
14 changes: 11 additions & 3 deletions app/res/layout/first_start_screen_modern.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout
<androidx.drawerlayout.widget.DrawerLayout android:id="@+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:tag="layout/activity_login_0"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:tools="http://schemas.android.com/tools">
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/cc_core_bg"
tools:viewBindingIgnore="true">
tools:viewBindingIgnore="true"
android:id="@+id/nav_drawer_frame">
<!-- Fragment container, will hold the actual setup app screen here -->
<FrameLayout
android:id="@+id/setup_fragment_container"
Expand All @@ -16,3 +21,6 @@


</FrameLayout>
<include layout="@layout/nav_drawer_base"/>

</androidx.drawerlayout.widget.DrawerLayout>
19 changes: 17 additions & 2 deletions app/res/layout/home_screen.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
<androidx.drawerlayout.widget.DrawerLayout
android:id="@+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:tag="layout/activity_login_0"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto">

<FrameLayout
android:id="@+id/nav_drawer_frame"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/cc_core_bg"
Expand Down Expand Up @@ -76,3 +88,6 @@
</RelativeLayout>
</androidx.core.widget.NestedScrollView>
</LinearLayout>
</FrameLayout>
<include layout="@layout/nav_drawer_base"/>
</androidx.drawerlayout.widget.DrawerLayout>
70 changes: 70 additions & 0 deletions app/res/layout/nav_drawer_base.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
<LinearLayout android:layout_width="@dimen/nav_drawer_width"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="@color/cc_brand_color"
android:layout_gravity="start"
xmlns:android="http://schemas.android.com/apk/res/android">

<androidx.core.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fillViewport="true"
android:background="@color/cc_brand_color">

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">

<include
android:id="@+id/nav_drawer_header"
layout="@layout/nav_drawer_header"/>

<LinearLayout
android:id="@+id/signout_view"
android:layout_width="match_parent"
android:layout_height="0dp"
android:orientation="vertical"
android:visibility="gone"
android:paddingTop="92dp"
android:layout_weight="1">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:src="@drawable/nav_drawer_logged_out_avatar"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:focusable="true"
android:layout_gravity="center"
android:textAlignment="center"
android:paddingTop="16dp"
android:clickable="true"
android:textAppearance="@style/TextAppearance.NavDrawerItem"
android:text="@string/nav_drawer_not_signed_in_to_personal_id"/>
<TextView
android:id="@+id/nav_drawer_sign_in_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:paddingTop="16dp"
android:text="@string/nav_drawer_signin_register"
android:textAppearance="@style/TextAppearance.NavDrawerItem"/>
</LinearLayout>

<androidx.recyclerview.widget.RecyclerView
android:id="@+id/nav_drawer_recycler"
android:layout_width="match_parent"
android:layout_weight="1"
android:layout_height="wrap_content"
android:nestedScrollingEnabled="false"
android:background="@color/cc_brand_color" />

<include
android:id="@+id/nav_drawer_footer"
layout="@layout/nav_drawer_footer" />
</LinearLayout>
</androidx.core.widget.NestedScrollView>

</LinearLayout>
81 changes: 81 additions & 0 deletions app/res/layout/nav_drawer_footer.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
<layout
xmlns:android="http://schemas.android.com/apk/res/android">
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="16dp"
android:layout_gravity="bottom"
android:background="@color/cc_brand_color">
<View
android:layout_marginTop="16dp"
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/darker_grey"/>

<LinearLayout
android:id="@+id/about_view"
android:layout_width="match_parent"
android:layout_height="48dp"
android:paddingStart="16dp"
android:clickable="true"
android:focusable="true"
android:foreground="?attr/selectableItemBackground"
android:paddingEnd="16dp"
android:orientation="horizontal"
android:gravity="center_vertical">

<ImageView
android:id="@+id/icon"
android:layout_width="24dp"
android:layout_height="24dp"
android:src="@drawable/commcare_actionbar_logo"/>

<TextView
android:id="@+id/title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/about_cc"
android:textAppearance="@style/TextAppearance.NavDrawerItem"
android:layout_marginStart="8dp"
android:fontFamily="sans-serif-medium" />
</LinearLayout>

<LinearLayout
android:id="@+id/help_view"
android:layout_width="match_parent"
android:layout_height="48dp"
android:paddingStart="16dp"
android:clickable="true"
android:focusable="true"
android:foreground="?attr/selectableItemBackground"
android:paddingEnd="16dp"
android:orientation="horizontal"
android:gravity="center_vertical"
android:visibility="gone">

<ImageView
android:layout_width="24dp"
android:layout_height="24dp"
android:src="@drawable/nav_drawer_help_icon"
android:contentDescription="@null"/>

<TextView
android:id="@+id/nav_help"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/nav_drawer_help"
android:textAppearance="@style/TextAppearance.NavDrawerItem"
android:layout_marginStart="8dp"/>
</LinearLayout>
<TextView
android:id="@+id/app_version"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="@style/TextAppearance.NavDrawerItem.SubTitle"
android:enabled="false"
android:layout_marginTop="8dp"
android:layout_marginStart="16dp"/>

</LinearLayout>
</layout>
Loading
Loading