Skip to content

Commit ce4f369

Browse files
committed
Phase 3: Remove hardcoded strings and dimensions from all layouts
- Updated 6 premium feature layout files to use @string and @Dimen resources: * bottom_sheet_chat_history.xml * item_chat_history.xml * dialog_document_upload.xml * dialog_chat_export.xml * panel_tutoring_mode.xml * activity_chat.xml - Updated existing layouts (activity_grammar.xml, item_grammar_correction.xml) - Created comprehensive XML drawable resources: * 13 vector drawable icons (stars, file, send, arrow, more) * Button backgrounds with ripple effects * Shape drawables for cards and dividers - Expanded strings.xml with 140+ entries for all premium features - Expanded dimens.xml with 70+ dimension definitions - All hardcoded strings and dimensions now use resource references - Improved localization and design consistency
1 parent cf9cffe commit ce4f369

23 files changed

Lines changed: 431 additions & 147 deletions
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<vector xmlns:android="http://schemas.android.com/apk/res/android"
3+
android:width="24dp"
4+
android:height="24dp"
5+
android:viewportWidth="24"
6+
android:viewportHeight="24">
7+
<path
8+
android:fillColor="@color/white"
9+
android:pathData="M19.02,8.05C18.5,7.56 17.66,7.56 17.16,8.05L10.5,14.71L10.5,4C10.5,3.45 10.05,3 9.5,3C8.95,3 8.5,3.45 8.5,4L8.5,14.71L1.84,8.05C1.34,7.55 0.5,7.55 0,8.05C-0.5,8.55 -0.5,9.4 0,9.9L8.54,18.44C9.05,18.95 9.9,18.95 10.41,18.44L18.95,9.9C19.5,9.4 19.5,8.55 19.02,8.05Z" />
10+
</vector>
Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
1-
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="24dp" android:tint="#FFFFFF" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp">
2-
3-
<path android:fillColor="@android:color/white" android:pathData="M9,4c-4.42,0 -8,3.58 -8,8c0,4.42 3.58,8 8,8s8,-3.58 8,-8C17,7.58 13.42,4 9,4zM12,10.5h-2v5H8v-5H6V9h6V10.5zM20.25,3.75L23,5l-2.75,1.25L19,9l-1.25,-2.75L15,5l2.75,-1.25L19,1L20.25,3.75zM20.25,17.75L23,19l-2.75,1.25L19,23l-1.25,-2.75L15,19l2.75,-1.25L19,15L20.25,17.75z"/>
4-
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<vector xmlns:android="http://schemas.android.com/apk/res/android"
3+
android:width="24dp"
4+
android:height="24dp"
5+
android:viewportWidth="24"
6+
android:viewportHeight="24">
7+
<path
8+
android:fillColor="@color/premium_yellow"
9+
android:pathData="M12,2C6.48,2 2,6.48 2,12C2,17.52 6.48,22 12,22C17.52,22 22,17.52 22,12C22,6.48 17.52,2 12,2M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20,12C20,16.41 16.41,20 12,20M15.5,11H13V8.5C13,8.22 12.78,8 12.5,8C12.22,8 12,8.22 12,8.5V11H8.5C8.22,11 8,11.22 8,11.5C8,11.78 8.22,12 8.5,12H12V15.5C12,15.78 12.22,16 12.5,16C12.78,16 13,15.78 13,15.5V12H15.5C15.78,12 16,11.78 16,11.5C16,11.22 15.78,11 15.5,11Z" />
510
</vector>
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<vector xmlns:android="http://schemas.android.com/apk/res/android"
3+
android:width="24dp"
4+
android:height="24dp"
5+
android:viewportWidth="24"
6+
android:viewportHeight="24">
7+
<path
8+
android:fillColor="@color/brown_700"
9+
android:pathData="M12,8C13.1,8 14,7.1 14,6C14,4.9 13.1,4 12,4C10.9,4 10,4.9 10,6C10,7.1 10.9,8 12,8M12,10C10.9,10 10,10.9 10,12C10,13.1 10.9,14 12,14C13.1,14 14,13.1 14,12C14,10.9 13.1,10 12,10M12,16C10.9,16 10,16.9 10,18C10,19.1 10.9,20 12,20C13.1,20 14,19.1 14,18C14,16.9 13.1,16 12,16Z" />
10+
</vector>
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<shape xmlns:android="http://schemas.android.com/apk/res/android"
3+
android:shape="rectangle">
4+
<solid android:color="@color/primary" />
5+
<corners android:radius="24dp" />
6+
</shape>
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<shape xmlns:android="http://schemas.android.com/apk/res/android"
3+
android:shape="rectangle">
4+
<solid android:color="@color/primary_dark" />
5+
<corners android:radius="24dp" />
6+
</shape>
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
3+
android:color="@color/primary_dark">
4+
<item android:drawable="@drawable/btn_primary_bg" />
5+
</ripple>
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<shape xmlns:android="http://schemas.android.com/apk/res/android"
3+
android:shape="rectangle">
4+
<solid android:color="@color/white" />
5+
<corners android:radius="12dp" />
6+
<stroke android:width="1dp" android:color="@color/light_gray" />
7+
</shape>
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<shape xmlns:android="http://schemas.android.com/apk/res/android"
3+
android:shape="rectangle">
4+
<solid android:color="@color/light_gray" />
5+
</shape>
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<vector xmlns:android="http://schemas.android.com/apk/res/android"
3+
android:width="24dp"
4+
android:height="24dp"
5+
android:viewportWidth="24"
6+
android:viewportHeight="24">
7+
<path
8+
android:fillColor="#FFFFFF"
9+
android:pathData="M16.6915026,12.4744748 L3.50612381,13.2599618 C3.19218622,13.2599618 3.03521743,13.4170592 3.03521743,13.5741566 L1.15159189,20.0151496 C0.8376543,20.8006365 0.99,21.89 1.77946707,22.52 C2.41,22.99 3.50612381,23.1 4.13399899,22.8429026 L21.714504,14.0454487 C22.6563168,13.5741566 23.1272231,12.6315722 22.9702544,11.6889879 C22.9702544,11.6889879 22.9702544,11.6889879 22.9702544,11.6889879 L4.13399899,2.8915341 C3.34915502,2.52936873 2.40734225,2.64050633 1.77946707,3.20942529 C0.994623095,3.77834425 0.837654326,4.86772596 1.15159189,5.65321286 L3.03521743,12.0942057 C3.03521743,12.2513032 3.19218622,12.4084005 3.50612381,12.4084005 L16.6915026,13.1938905 C16.6915026,13.1938905 17.1624089,13.1938905 17.1624089,12.5656681 L17.1624089,12.8228697 L17.1624089,11.8802854 C17.1624089,11.6889879 17.1624089,11.5318905 16.6915026,11.5318905 Z" />
10+
</vector>
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<vector xmlns:android="http://schemas.android.com/apk/res/android"
3+
android:width="24dp"
4+
android:height="24dp"
5+
android:viewportWidth="24"
6+
android:viewportHeight="24">
7+
<path
8+
android:fillColor="@color/primary"
9+
android:pathData="M14,2H6A2,2 0 0,0 4,4V20A2,2 0 0,0 6,22H18A2,2 0 0,0 20,20V8L14,2M18,20H6V4H13V9H18V20Z" />
10+
</vector>

0 commit comments

Comments
 (0)