Skip to content
Open
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
83 changes: 60 additions & 23 deletions app/src/main/res/layout/activity_onboarding.xml
Original file line number Diff line number Diff line change
@@ -1,46 +1,83 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/main"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white"
tools:context=".views.activites.OnboardingActivity">

<androidx.viewpager.widget.ViewPager
android:id="@+id/slider"
android:layout_width="0dp"
android:layout_height="0dp"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toTopOf="@id/titleText"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent" />

<TextView
android:id="@+id/titleText"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="Welcome to UpdateApp"
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Extract hardcoded strings to strings.xml for internationalization.

The title text is hardcoded, which prevents localization for non-English users.

🔎 Proposed fix

In res/values/strings.xml, add:

<string name="onboarding_title">Welcome to UpdateApp</string>

Then update the layout:

-        android:text="Welcome to UpdateApp"
+        android:text="@string/onboarding_title"
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
android:text="Welcome to UpdateApp"
android:text="@string/onboarding_title"
🤖 Prompt for AI Agents
In app/src/main/res/layout/activity_onboarding.xml around line 24 the title text
is hardcoded ("Welcome to UpdateApp"); extract this string into
res/values/strings.xml by adding a string resource named e.g. onboarding_title
with the same text, then replace the hardcoded android:text attribute in the
layout with a reference to that string resource (use @string/onboarding_title)
so the UI uses the string resource for localization.

android:textSize="24sp"
android:textStyle="bold"
android:textColor="#212121"
android:gravity="center"
android:layout_marginTop="12dp"
android:layout_marginHorizontal="24dp"
app:layout_constraintTop_toBottomOf="@id/slider"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent" />

<TextView
android:id="@+id/descText"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="Get the latest updates, features, and improvements all in one place."
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Extract hardcoded description to strings.xml.

The description text is hardcoded, preventing localization.

🔎 Proposed fix

In res/values/strings.xml, add:

<string name="onboarding_description">Get the latest updates, features, and improvements all in one place.</string>

Then update the layout:

-        android:text="Get the latest updates, features, and improvements all in one place."
+        android:text="@string/onboarding_description"
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
android:text="Get the latest updates, features, and improvements all in one place."
android:text="@string/onboarding_description"
🤖 Prompt for AI Agents
In app/src/main/res/layout/activity_onboarding.xml around line 39, the
description text is hardcoded which prevents localization; move the string into
res/values/strings.xml as a new string resource (e.g.,
name="onboarding_description") and then replace the hardcoded android:text value
in the layout with a reference to that string resource (use
@string/onboarding_description).

android:textSize="15sp"
android:textColor="#757575"
android:gravity="center"
android:lineSpacingExtra="4dp"
android:layout_marginTop="8dp"
android:layout_marginHorizontal="32dp"
app:layout_constraintTop_toBottomOf="@id/titleText"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent" />

<LinearLayout
android:id="@+id/dotsLayout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:gravity="center"
android:layout_marginTop="24dp"
app:layout_constraintTop_toBottomOf="@id/descText"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent" />

<androidx.cardview.widget.CardView
android:id="@+id/nextCard"
android:layout_width="56dp"
android:layout_height="56dp"
android:layout_marginEnd="24dp"
android:layout_marginBottom="32dp"
app:cardCornerRadius="28dp"
android:layout_marginEnd="30dp"
android:layout_marginBottom="60dp"
app:cardElevation="8dp"
android:backgroundTint="@color/blue"
android:clickable="true"
android:focusable="true"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent">

<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="17dp"
android:src="@drawable/ic_next"/>
android:padding="16dp"
android:src="@drawable/ic_next"
android:contentDescription="Next" />
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Extract hardcoded contentDescription to strings.xml.

The contentDescription is hardcoded, which should be localized for accessibility.

🔎 Proposed fix

In res/values/strings.xml, add:

<string name="next_button">Next</string>

Then update the layout:

-            android:contentDescription="Next" />
+            android:contentDescription="@string/next_button" />
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
android:contentDescription="Next" />
android:contentDescription="@string/next_button" />
🤖 Prompt for AI Agents
In app/src/main/res/layout/activity_onboarding.xml around line 80 the
contentDescription is hardcoded as "Next"; extract this into
res/values/strings.xml by adding a localized string resource (e.g., name
"next_button") and update the layout to reference it via @string/next_button
instead of the hardcoded literal so the contentDescription is localizable and
accessible.

</androidx.cardview.widget.CardView>

<androidx.viewpager.widget.ViewPager
android:id="@+id/slider"
android:layout_width="match_parent"
android:layout_height="match_parent"/>

<LinearLayout
android:id="@+id/dotsLayout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:orientation="horizontal"
app:layout_constraintBottom_toBottomOf="@+id/nextCard"
app:layout_constraintTop_toTopOf="@+id/nextCard"
app:layout_constraintStart_toStartOf="parent"
android:layout_marginStart="30dp"/>
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>