Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CCCT-542 || Connect Common Title Bar #2891

Open
wants to merge 8 commits into
base: connect_qa
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 2 additions & 1 deletion app/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@
<activity
android:name="org.commcare.activities.CrashWarningActivity"
android:label="CommCare Forced Closure"></activity>
<activity android:name="org.commcare.activities.StandardHomeActivity" />
<activity android:name="org.commcare.activities.StandardHomeActivity"/>
<activity android:name="org.commcare.activities.RootMenuHomeActivity" />
<activity android:name="org.commcare.activities.MenuActivity" />

Expand All @@ -175,6 +175,7 @@
android:exported="true" />
<activity
android:name="org.commcare.activities.connect.ConnectActivity"
android:theme="@style/NoAppBarTheme"
android:exported="true" />
<activity android:name="org.commcare.activities.AppSelectActivity" />

Expand Down
13 changes: 13 additions & 0 deletions app/res/drawable/ic_connect_cloud_sync.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<group>
<clip-path
android:pathData="M0,0h24v24h-24z"/>
<path
android:pathData="M4.327,19.673V18.173H7.235C6.212,17.286 5.458,16.332 4.975,15.312C4.492,14.291 4.25,13.2 4.25,12.039C4.25,10.287 4.767,8.73 5.801,7.366C6.835,6.001 8.151,5.078 9.75,4.596V6.177C8.571,6.632 7.609,7.393 6.865,8.46C6.122,9.526 5.75,10.719 5.75,12.039C5.75,12.996 5.947,13.878 6.34,14.685C6.734,15.491 7.358,16.272 8.212,17.027V14.289H9.712V19.673H4.327ZM15,19.75C14.244,19.75 13.596,19.481 13.058,18.942C12.519,18.404 12.25,17.757 12.25,17C12.25,16.264 12.501,15.633 13.003,15.106C13.505,14.579 14.143,14.299 14.917,14.266C15.181,13.672 15.583,13.188 16.122,12.813C16.661,12.438 17.287,12.25 18,12.25C18.851,12.25 19.588,12.53 20.211,13.089C20.833,13.648 21.201,14.368 21.315,15.25H21.469C22.099,15.25 22.636,15.466 23.082,15.898C23.527,16.33 23.75,16.856 23.75,17.475C23.75,18.105 23.532,18.641 23.097,19.085C22.662,19.528 22.129,19.75 21.5,19.75H15ZM18.15,10.865C18.008,10.144 17.755,9.478 17.393,8.869C17.031,8.26 16.496,7.632 15.788,6.983V9.712H14.288V4.327H19.673V5.827H16.765C17.655,6.614 18.324,7.42 18.773,8.244C19.222,9.069 19.519,9.942 19.665,10.865H18.15ZM15,18.25H21.5C21.704,18.25 21.88,18.176 22.028,18.028C22.176,17.88 22.25,17.704 22.25,17.5C22.25,17.296 22.176,17.12 22.028,16.972C21.88,16.824 21.704,16.75 21.5,16.75H20V15.75C20,15.196 19.805,14.724 19.416,14.335C19.026,13.945 18.554,13.75 18,13.75C17.446,13.75 16.979,13.931 16.599,14.291C16.219,14.652 16.022,15.087 16.01,15.596V15.75H15C14.653,15.75 14.357,15.872 14.115,16.115C13.872,16.358 13.75,16.653 13.75,17C13.75,17.348 13.872,17.643 14.115,17.886C14.357,18.129 14.653,18.25 15,18.25Z"
android:fillColor="#ffffff"/>
</group>
</vector>
7 changes: 2 additions & 5 deletions app/res/layout-land/home_screen.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
style="@style/MainPane"
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"
Expand All @@ -12,11 +11,7 @@
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:background="@color/cc_core_bg"
android:paddingLeft="@dimen/content_start"
android:paddingRight="@dimen/content_start"
android:paddingStart="@dimen/content_start"
android:layout_alignParentEnd="true"
android:paddingEnd="@dimen/content_start"
android:layout_alignParentStart="true"
tools:viewBindingIgnore="true">

Expand Down Expand Up @@ -73,6 +68,8 @@

<androidx.core.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_marginStart="10dp"
android:layout_marginEnd="10dp"
android:layout_height="wrap_content">

<RelativeLayout
Expand Down
94 changes: 94 additions & 0 deletions app/res/layout/connect_common_title_bar.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content">

<LinearLayout
android:id="@+id/appBar"
android:layout_width="match_parent"
android:layout_height="60dp"
android:paddingVertical="18dp"
android:paddingStart="16dp"
android:background="@color/connect_blue_color"
android:gravity="start"
tools:ignore="RtlSymmetry">

<ImageButton
android:id="@+id/menu_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="?attr/selectableItemBackground"
android:contentDescription="@null"
android:src="@drawable/ic_menu_bar"
android:tint="@color/white"
android:visibility="invisible" />

<org.commcare.views.connect.connecttextview.ConnectMediumTextView
android:id="@+id/title"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="1"
android:layout_marginStart="10dp"
android:fontFamily="@font/roboto_medium"
android:text=""
android:textColor="#FFFFFF"
android:textSize="18sp" />

<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:gravity="center">

<ImageButton
android:id="@+id/list_icon"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="center"
android:background="?attr/selectableItemBackground"
android:contentDescription="@null"
android:src="@drawable/ic_list_alt"
android:paddingHorizontal="8dp"
android:visibility="gone" />

<ImageButton
android:id="@+id/cloud_sync"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="center"
android:background="?attr/selectableItemBackground"
android:contentDescription="@null"
android:paddingHorizontal="8dp"
android:src="@drawable/ic_connect_cloud_sync"
android:visibility="gone" />

<ImageButton
android:id="@+id/notification_icon"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="center"
android:background="?attr/selectableItemBackground"
android:contentDescription="@null"
android:paddingHorizontal="8dp"
android:src="@drawable/ic_notifications_24"
android:visibility="gone" />

<ImageButton
android:id="@+id/menu_icon"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:background="?attr/selectableItemBackground"
android:contentDescription="@null"
android:paddingHorizontal="8dp"
android:visibility="gone"
android:src="@drawable/ic_connect_action_overflow" />
</LinearLayout>
</LinearLayout>

<View
android:layout_width="match_parent"
android:layout_height="10dp"
android:layout_below="@+id/appBar"
android:background="@drawable/bottom_shadow" />
</RelativeLayout>
64 changes: 0 additions & 64 deletions app/res/layout/connectid_title_bar.xml

This file was deleted.

16 changes: 15 additions & 1 deletion app/res/layout/fragment_connect_delivery_details.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,26 @@
android:layout_height="wrap_content"
android:orientation="vertical">

<LinearLayout
android:id="@+id/llTopBar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">

<include
android:id="@+id/commonAppBar"
layout="@layout/connect_common_title_bar"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</LinearLayout>

<androidx.cardview.widget.CardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="20dp"
android:layout_marginEnd="20dp"
android:layout_marginTop="20dp"
android:layout_marginEnd="20dp"
android:paddingBottom="20dp"
app:cardCornerRadius="10dp"
app:cardElevation="5dp">
Expand Down
16 changes: 15 additions & 1 deletion app/res/layout/fragment_connect_delivery_list.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,28 @@
android:layout_height="match_parent"
android:background="@color/connect_background_color">

<LinearLayout
android:id="@+id/llTopBar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">

<include
android:id="@+id/commonAppBar"
layout="@layout/connect_common_title_bar"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</LinearLayout>

<androidx.recyclerview.widget.RecyclerView
android:id="@+id/delivery_list"
android:layout_width="match_parent"
android:layout_height="0dp"
app:layout_constraintBottom_toTopOf="@+id/llFilterByStatus"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
app:layout_constraintTop_toBottomOf="@+id/llTopBar" />

<androidx.cardview.widget.CardView
android:id="@+id/llFilterByStatus"
Expand Down
14 changes: 14 additions & 0 deletions app/res/layout/fragment_connect_delivery_progress.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,20 @@
android:fitsSystemWindows="true"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar">

<LinearLayout
android:id="@+id/llTopBar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">

<include
android:id="@+id/commonAppBar"
layout="@layout/connect_common_title_bar"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</LinearLayout>

<com.google.android.material.appbar.CollapsingToolbarLayout
android:id="@+id/collapsing_toolbar"
android:layout_width="match_parent"
Expand Down
14 changes: 14 additions & 0 deletions app/res/layout/fragment_connect_job_intro.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,20 @@
android:layout_height="wrap_content"
android:orientation="vertical">

<LinearLayout
android:id="@+id/llTopBar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">

<include
layout="@layout/connect_common_title_bar"
android:id="@+id/commonAppBar"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</LinearLayout>

<include
android:id="@+id/viewJobCard"
layout="@layout/view_job_card"
Expand Down
Loading