Skip to content

Commit

Permalink
Merge pull request #2893 from dimagi/jp/CCCT-544-connectid-common-tit…
Browse files Browse the repository at this point in the history
…le-bar

CCCT-544 || ConnectId Common Title Bar
  • Loading branch information
OrangeAndGreen authored Nov 15, 2024
2 parents 019ba02 + 0bf4edd commit c525f6c
Show file tree
Hide file tree
Showing 26 changed files with 594 additions and 194 deletions.
1 change: 1 addition & 0 deletions app/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@

<activity
android:name="org.commcare.activities.connect.ConnectIdActivity"
android:theme="@style/NoAppBarTheme"
android:exported="true" />
<activity
android:name="org.commcare.activities.connect.ConnectActivity"
Expand Down
11 changes: 11 additions & 0 deletions app/res/drawable/bottom_shadow.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!-- bottom_shadow.xml -->
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape android:shape="rectangle">
<gradient
android:startColor="@color/connect_blue_color_50"
android:endColor="@android:color/transparent"
android:angle="270" />
</shape>
</item>
</layer-list>
13 changes: 13 additions & 0 deletions app/res/drawable/ic_connect_action_overflow.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="M12,19.269C11.587,19.269 11.234,19.122 10.941,18.828C10.647,18.535 10.5,18.181 10.5,17.769C10.5,17.357 10.647,17.003 10.941,16.709C11.234,16.416 11.587,16.269 12,16.269C12.413,16.269 12.766,16.416 13.059,16.709C13.353,17.003 13.5,17.357 13.5,17.769C13.5,18.181 13.353,18.535 13.059,18.828C12.766,19.122 12.413,19.269 12,19.269ZM12,13.5C11.587,13.5 11.234,13.353 10.941,13.059C10.647,12.765 10.5,12.412 10.5,12C10.5,11.587 10.647,11.234 10.941,10.941C11.234,10.647 11.587,10.5 12,10.5C12.413,10.5 12.766,10.647 13.059,10.941C13.353,11.234 13.5,11.587 13.5,12C13.5,12.412 13.353,12.765 13.059,13.059C12.766,13.353 12.413,13.5 12,13.5ZM12,7.73C11.587,7.73 11.234,7.584 10.941,7.29C10.647,6.996 10.5,6.643 10.5,6.23C10.5,5.818 10.647,5.465 10.941,5.171C11.234,4.877 11.587,4.73 12,4.73C12.413,4.73 12.766,4.877 13.059,5.171C13.353,5.465 13.5,5.818 13.5,6.23C13.5,6.643 13.353,6.996 13.059,7.29C12.766,7.584 12.413,7.73 12,7.73Z"
android:fillColor="#ffffff"/>
</group>
</vector>
13 changes: 13 additions & 0 deletions app/res/drawable/ic_connect_arrow_back.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="M7.373,12.75L13.069,18.446L12,19.5L4.5,12L12,4.5L13.069,5.554L7.373,11.25H19.5V12.75H7.373Z"
android:fillColor="#ffffff"/>
</group>
</vector>
72 changes: 72 additions & 0 deletions app/res/layout/connectid_common_title_bar.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
<?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/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>
18 changes: 17 additions & 1 deletion app/res/layout/fragment_recovery_code.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,28 @@
android:background="@color/white"
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/connectid_common_title_bar"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</LinearLayout>

<ImageView
android:id="@+id/company_logo"
android:layout_width="wrap_content"
android:layout_height="40dp"
android:layout_marginTop="60dp"
android:layout_marginTop="40dp"
android:layout_below="@+id/llTopBar"
android:layout_centerHorizontal="true"
android:contentDescription="@null"
android:src="@drawable/ic_dimagi_logo" />

<View
Expand Down
Loading

0 comments on commit c525f6c

Please sign in to comment.