Skip to content
Merged
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
37 changes: 18 additions & 19 deletions app/res/layout/fragment_connect_delivery_details.xml
Original file line number Diff line number Diff line change
Expand Up @@ -160,16 +160,16 @@
android:background="@color/connect_darker_blue_color"
android:padding="16dp">

<androidx.constraintlayout.widget.ConstraintLayout
<LinearLayout
android:id="@+id/linearLayout"
android:layout_width="0dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
android:layout_marginEnd="2dp"
app:layout_constraintEnd_toStartOf="@+id/connect_delivery_button"
app:layout_constraintTop_toTopOf="parent">
android:background="@color/connect_darker_blue_color">
Comment on lines +163 to +172
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Flatten redundant wrappers
You’ve introduced a LinearLayout inside a ConstraintLayout and duplicated the same background on both. Consider making the LinearLayout the direct child of the CardView (removing the inner ConstraintLayout) and drop the extra background on one of them to simplify the view hierarchy.

🤖 Prompt for AI Agents
In app/res/layout/fragment_connect_delivery_details.xml around lines 163 to 172,
there is a redundant nested layout where a LinearLayout is inside a
ConstraintLayout with duplicated background attributes. To fix this, remove the
inner ConstraintLayout and make the LinearLayout the direct child of the
CardView, then remove the duplicate background attribute from one of the layouts
to simplify the view hierarchy and avoid unnecessary nesting.


<TextView
android:id="@+id/connect_delivery_action_title"
Expand All @@ -192,21 +192,20 @@
android:textColor="@color/grey"
android:textSize="14sp" />

</androidx.constraintlayout.widget.ConstraintLayout>

<com.google.android.material.button.MaterialButton
android:id="@+id/connect_delivery_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/connect_job_info_download"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:backgroundTint= "@color/white"
android:drawableEnd= "@drawable/ic_connect_arrow_forward_20px"
android:textColor= "@color/cc_brand_color"
app:iconTint="@color/cc_brand_color"
/>
<com.google.android.material.button.MaterialButton
android:id="@+id/connect_delivery_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/connect_job_info_download"
app:layout_constraintTop_toBottomOf="@id/connect_delivery_action_details"
app:layout_constraintEnd_toEndOf="parent"
android:layout_gravity="end"
android:backgroundTint= "@color/white"
android:drawableEnd= "@drawable/ic_connect_arrow_forward_20px"
android:textColor= "@color/cc_brand_color"
app:iconTint="@color/cc_brand_color"
/>
Comment on lines +195 to +207
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Clean up misplaced constraint attributes
The MaterialButton is now inside a vertical LinearLayout, so the app:layout_constraint* attributes have no effect and should be removed. Also adjust margins—use android:layout_marginEnd for end-side spacing—and drop any unused android:gravity on the button.

🤖 Prompt for AI Agents
In app/res/layout/fragment_connect_delivery_details.xml between lines 195 and
207, remove the constraint layout attributes app:layout_constraintTop_toBottomOf
and app:layout_constraintEnd_toEndOf from the MaterialButton since it is inside
a LinearLayout where constraints do not apply. Replace any spacing adjustments
with android:layout_marginEnd for proper end margin. Also, remove the
android:layout_gravity attribute from the button as it is unnecessary inside the
LinearLayout.

</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.cardview.widget.CardView>
</androidx.constraintlayout.widget.ConstraintLayout>
Expand Down
37 changes: 15 additions & 22 deletions app/res/layout/fragment_connect_job_intro.xml
Original file line number Diff line number Diff line change
Expand Up @@ -73,37 +73,30 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:orientation="vertical"
android:padding="16dp">

<LinearLayout
android:layout_width="match_parent"
<TextView
android:id="@+id/connect_job_intro_start_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical">

<TextView
android:id="@+id/connect_job_intro_start_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/connect_learn_start"
android:textColor="@color/white"
android:textSize="14sp" />
android:text="@string/connect_learn_start"
android:textColor="@color/white"
android:textSize="14sp" />

<TextView
android:id="@+id/connect_job_intro_learning_summary"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:textColor="@color/white"
android:textSize="12sp" />
</LinearLayout>
<TextView
android:id="@+id/connect_job_intro_learning_summary"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:textColor="@color/white"
android:textSize="12sp" />

<com.google.android.material.button.MaterialButton
android:id="@+id/connect_job_intro_start_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_gravity="end"
android:layout_marginStart="20dp"
android:gravity="center"
android:text="@string/connect_recovery_button_phone"
Expand Down
3 changes: 1 addition & 2 deletions app/res/layout/fragment_connect_learning_progress.xml
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,6 @@
android:text="@string/connect_click_to_sync_progress"
android:textColor="@color/black"
android:textSize="15sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

Expand All @@ -173,7 +172,7 @@
android:text="@string/sync"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintTop_toBottomOf="@id/connectRegularTextView"
app:iconSize="24dp"
app:icon="@drawable/ic_connect_directory_sync"
app:iconGravity="end"
Expand Down
3 changes: 1 addition & 2 deletions app/res/layout/fragment_connect_progress_delivery.xml
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,6 @@
android:text="@string/connect_click_to_sync_progress"
android:textColor="@color/black"
android:textSize="15sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

Expand All @@ -161,7 +160,7 @@
android:text="@string/sync"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintTop_toBottomOf="@id/connectRegularTextView"
android:drawableRight= "@drawable/ic_connect_directory_sync"
android:drawablePadding="5dp" />

Expand Down
47 changes: 18 additions & 29 deletions app/res/layout/screen_personalid_phone_verify.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,38 +31,27 @@
android:textColor="@color/connect_dark_blue_color"
android:textSize="16sp" />

<LinearLayout
<TextView
android:id="@+id/connect_phone_verify_label"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:layout_gravity="end"
android:layout_marginStart="16dp"
android:gravity="center"
android:layout_marginEnd="16dp"
android:orientation="horizontal">
android:layout_marginStart="10dp"
android:textColor="@color/connect_secondary_text"
android:textSize="16sp"
tools:text="+91 7748962888"
android:textStyle="normal"/>

<TextView
android:id="@+id/connect_phone_verify_label"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:textColor="@color/connect_secondary_text"
android:textSize="16sp"
tools:text="+91 7748962888"
android:textStyle="normal"/>

<TextView
android:id="@+id/connect_phone_verify_change"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:gravity="end"
android:text="@string/connect_verify_phone_change"
android:textColor="@color/connect_blue_color"
android:textSize="16sp"
android:visibility="visible"
android:textStyle="bold"/>
</LinearLayout>
<TextView
android:id="@+id/connect_phone_verify_change"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:gravity="end"
android:text="@string/connect_verify_phone_change"
android:textColor="@color/connect_blue_color"
android:textSize="16sp"
android:visibility="visible"
android:textStyle="bold"/>

<LinearLayout
android:id="@+id/otp_layout"
Expand Down