Skip to content

Commit

Permalink
Extract string resources
Browse files Browse the repository at this point in the history
  • Loading branch information
Mahmud0808 committed Sep 7, 2023
1 parent 7166f7b commit 3ab3044
Show file tree
Hide file tree
Showing 38 changed files with 140 additions and 78 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ protected void onCreate(Bundle savedInstanceState) {

// RecyclerView
binding.brightnessBarContainer.setLayoutManager(new LinearLayoutManager(this));
ConcatAdapter adapter = new ConcatAdapter(initActivityItems(), new SectionTitleAdapter(this, R.layout.view_section_title, R.string.activity_title_brightness_bar), initBrightnessBarItems());
ConcatAdapter adapter = new ConcatAdapter(initActivityItems(), new SectionTitleAdapter(this, R.layout.view_section_title, R.string.brightness_bar_styles), initBrightnessBarItems());
binding.brightnessBarContainer.setAdapter(adapter);
binding.brightnessBarContainer.setHasFixedSize(true);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ protected void onCreate(Bundle savedInstanceState) {

// RecyclerView
binding.iconPackContainer.setLayoutManager(new LinearLayoutManager(this));
ConcatAdapter adapter = new ConcatAdapter(initActivityItems(), new SectionTitleAdapter(this, R.layout.view_section_title, R.string.activity_title_icon_pack), initIconPackItems());
ConcatAdapter adapter = new ConcatAdapter(initActivityItems(), new SectionTitleAdapter(this, R.layout.view_section_title, R.string.icon_pack_styles), initIconPackItems());
binding.iconPackContainer.setAdapter(adapter);
binding.iconPackContainer.setHasFixedSize(true);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ protected void onCreate(Bundle savedInstanceState) {

// RecyclerView
binding.notificationsContainer.setLayoutManager(new LinearLayoutManager(this));
ConcatAdapter adapter = new ConcatAdapter(initActivityItems(), new SectionTitleAdapter(this, R.layout.view_section_title_notif, R.string.activity_title_notification), initNotifItems());
ConcatAdapter adapter = new ConcatAdapter(initActivityItems(), new SectionTitleAdapter(this, R.layout.view_section_title_notif, R.string.notification_styles), initNotifItems());
binding.notificationsContainer.setAdapter(adapter);
binding.notificationsContainer.setHasFixedSize(true);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ protected void onCreate(Bundle savedInstanceState) {

// RecyclerView
binding.qsShapesContainer.setLayoutManager(new LinearLayoutManager(this));
adapter = new ConcatAdapter(initActivityItems(), new SectionTitleAdapter(this, R.layout.view_section_title, R.string.activity_title_qs_shape), initQsShapeItems());
adapter = new ConcatAdapter(initActivityItems(), new SectionTitleAdapter(this, R.layout.view_section_title, R.string.qspanel_tile_styles), initQsShapeItems());
binding.qsShapesContainer.setAdapter(adapter);
binding.qsShapesContainer.setHasFixedSize(true);
}
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/activity_app_updates.xml
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@
android:layout_marginHorizontal="24dp"
android:layout_marginTop="20dp"
android:layout_marginBottom="8dp"
android:text="Schedule"
android:text="@string/schedule"
android:textColor="?attr/colorPrimary" />

<RelativeLayout
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/layout/activity_colored_battery.xml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
android:layout_marginVertical="22dp"
android:layout_marginStart="24dp"
android:layout_marginEnd="10dp"
android:layout_toStartOf="@id/preview_color_picker_clocktext"
android:layout_toStartOf="@id/preview_color_picker_background"
android:orientation="vertical">

<TextView
Expand Down Expand Up @@ -121,7 +121,7 @@
android:layout_marginVertical="22dp"
android:layout_marginStart="24dp"
android:layout_marginEnd="10dp"
android:layout_toStartOf="@id/preview_color_picker_clocktext"
android:layout_toStartOf="@id/preview_color_picker_fill"
android:orientation="vertical">

<TextView
Expand Down
8 changes: 4 additions & 4 deletions app/src/main/res/layout/activity_media_player.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
android:layout_marginHorizontal="24dp"
android:layout_marginTop="20dp"
android:layout_marginBottom="8dp"
android:text="Background Color"
android:text="@string/media_player_background_color"
android:textColor="?attr/colorPrimary" />

<RelativeLayout
Expand Down Expand Up @@ -76,7 +76,7 @@
style="@style/TextAppearance.Material3.BodyMedium"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Make background follow accent"
android:text="@string/mp_accent_background_desc"
android:textColor="@color/text_color_secondary" />

</LinearLayout>
Expand Down Expand Up @@ -119,7 +119,7 @@
style="@style/TextAppearance.Material3.BodyMedium"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Make background follow system"
android:text="@string/mp_system_background_desc"
android:textColor="@color/text_color_secondary" />

</LinearLayout>
Expand Down Expand Up @@ -162,7 +162,7 @@
style="@style/TextAppearance.Material3.BodyMedium"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Make background pitch black"
android:text="@string/mp_pb_background_desc"
android:textColor="@color/text_color_secondary" />

</LinearLayout>
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/layout/activity_miscellaneous.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
android:layout_marginHorizontal="24dp"
android:layout_marginTop="20dp"
android:layout_marginBottom="8dp"
android:text="Tablet Mode"
android:text="@string/tablet_mode"
android:textColor="?attr/colorPrimary" />

<RelativeLayout
Expand Down Expand Up @@ -167,7 +167,7 @@
android:layout_marginHorizontal="24dp"
android:layout_marginTop="20dp"
android:layout_marginBottom="8dp"
android:text="Privacy Chip"
android:text="@string/privacy_chip"
android:textColor="?attr/colorPrimary" />

<RelativeLayout
Expand Down
8 changes: 4 additions & 4 deletions app/src/main/res/layout/activity_navigation_bar.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
android:layout_marginHorizontal="24dp"
android:layout_marginTop="20dp"
android:layout_marginBottom="8dp"
android:text="Display Mode"
android:text="@string/display_mode"
android:textColor="?attr/colorPrimary" />

<RelativeLayout
Expand Down Expand Up @@ -210,7 +210,7 @@
android:layout_marginHorizontal="24dp"
android:layout_marginTop="20dp"
android:layout_marginBottom="8dp"
android:text="Buttons"
android:text="@string/buttons"
android:textColor="?attr/colorPrimary" />

<RelativeLayout
Expand Down Expand Up @@ -263,7 +263,7 @@
android:layout_marginHorizontal="24dp"
android:layout_marginTop="20dp"
android:layout_marginBottom="8dp"
android:text="Gesture"
android:text="@string/gesture"
android:textColor="?attr/colorPrimary" />

<RelativeLayout
Expand Down Expand Up @@ -402,7 +402,7 @@
android:layout_marginHorizontal="24dp"
android:layout_marginTop="20dp"
android:layout_marginBottom="8dp"
android:text="Pill Navigation"
android:text="@string/pill_navigation"
android:textColor="?attr/colorPrimary" />

<RelativeLayout
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/activity_qs_icon_label.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
android:layout_marginHorizontal="24dp"
android:layout_marginTop="20dp"
android:layout_marginBottom="8dp"
android:text="Size and Position"
android:text="@string/size_and_position"
android:textColor="?attr/colorPrimary" />

<RelativeLayout
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/layout/activity_qs_panel_margin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
android:layout_marginHorizontal="24dp"
android:layout_marginTop="20dp"
android:layout_marginBottom="8dp"
android:text="Portrait Mode"
android:text="@string/portrait_mode"
android:textColor="?attr/colorPrimary" />

<LinearLayout
Expand Down Expand Up @@ -111,7 +111,7 @@
android:layout_marginHorizontal="24dp"
android:layout_marginTop="20dp"
android:layout_marginBottom="8dp"
android:text="Landscape Mode"
android:text="@string/landscape_mode"
android:textColor="?attr/colorPrimary" />

<LinearLayout
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/layout/activity_qs_tile_size.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
android:layout_marginHorizontal="24dp"
android:layout_marginTop="20dp"
android:layout_marginBottom="8dp"
android:text="Portrait Mode"
android:text="@string/portrait_mode"
android:textColor="?attr/colorPrimary" />

<LinearLayout
Expand Down Expand Up @@ -151,7 +151,7 @@
android:layout_marginHorizontal="24dp"
android:layout_marginTop="20dp"
android:layout_marginBottom="8dp"
android:text="Landscape Mode"
android:text="@string/landscape_mode"
android:textColor="?attr/colorPrimary" />

<LinearLayout
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/layout/activity_statusbar.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
android:layout_marginHorizontal="24dp"
android:layout_marginTop="20dp"
android:layout_marginBottom="8dp"
android:text="Spacing"
android:text="@string/spacing"
android:textColor="?attr/colorPrimary" />

<LinearLayout
Expand Down Expand Up @@ -208,7 +208,7 @@
android:layout_marginHorizontal="24dp"
android:layout_marginTop="20dp"
android:layout_marginBottom="8dp"
android:text="Color"
android:text="@string/color"
android:textColor="?attr/colorPrimary" />

<LinearLayout
Expand Down
8 changes: 4 additions & 4 deletions app/src/main/res/layout/activity_volume_panel.xml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
android:layout_marginHorizontal="24dp"
android:layout_marginTop="20dp"
android:layout_marginBottom="8dp"
android:text="Volume Slider Track"
android:text="@string/volume_slider_track"
android:textColor="?attr/colorPrimary" />

<RelativeLayout
Expand Down Expand Up @@ -101,7 +101,7 @@
style="@style/TextAppearance.Material3.BodyMedium"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Make track of volume slider thin"
android:text="@string/vp_thin_background_desc"
android:textColor="@color/text_color_secondary" />

</LinearLayout>
Expand Down Expand Up @@ -144,7 +144,7 @@
style="@style/TextAppearance.Material3.BodyMedium"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Make track of volume slider thick"
android:text="@string/vp_thick_background_desc"
android:textColor="@color/text_color_secondary" />

</LinearLayout>
Expand Down Expand Up @@ -187,7 +187,7 @@
style="@style/TextAppearance.Material3.BodyMedium"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Remove track of volume slider"
android:text="@string/vp_no_background_desc"
android:textColor="@color/text_color_secondary" />

</LinearLayout>
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/layout/activity_xposed_background_chip.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
android:layout_marginHorizontal="24dp"
android:layout_marginTop="20dp"
android:layout_marginBottom="8dp"
android:text="Status Bar"
android:text="@string/status_bar"
android:textColor="?attr/colorPrimary" />

<RelativeLayout
Expand Down Expand Up @@ -194,7 +194,7 @@
android:layout_marginHorizontal="24dp"
android:layout_marginTop="20dp"
android:layout_marginBottom="8dp"
android:text="Status Icons"
android:text="@string/status_icons"
android:textColor="?attr/colorPrimary" />

<RelativeLayout
Expand Down
6 changes: 3 additions & 3 deletions app/src/main/res/layout/activity_xposed_others.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
android:layout_marginHorizontal="24dp"
android:layout_marginTop="20dp"
android:layout_marginBottom="8dp"
android:text="QS Header"
android:text="@string/qs_header"
android:textColor="?attr/colorPrimary" />

<RelativeLayout
Expand Down Expand Up @@ -124,7 +124,7 @@
android:layout_marginHorizontal="24dp"
android:layout_marginTop="20dp"
android:layout_marginBottom="8dp"
android:text="Lock Screen"
android:text="@string/lock_screen"
android:textColor="?attr/colorPrimary" />

<RelativeLayout
Expand Down Expand Up @@ -226,7 +226,7 @@
android:layout_marginHorizontal="24dp"
android:layout_marginTop="20dp"
android:layout_marginBottom="8dp"
android:text="Status Icons"
android:text="@string/status_icons"
android:textColor="?attr/colorPrimary" />

<RelativeLayout
Expand Down
10 changes: 5 additions & 5 deletions app/src/main/res/layout/activity_xposed_quick_settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
android:layout_marginHorizontal="24dp"
android:layout_marginTop="20dp"
android:layout_marginBottom="8dp"
android:text="QS Tile"
android:text="@string/qs_tile"
android:textColor="?attr/colorPrimary" />

<RelativeLayout
Expand Down Expand Up @@ -124,7 +124,7 @@
android:layout_marginHorizontal="24dp"
android:layout_marginTop="20dp"
android:layout_marginBottom="8dp"
android:text="For Pixel Roms"
android:text="@string/for_pixel_roms"
android:textColor="?attr/colorPrimary" />

<RelativeLayout
Expand Down Expand Up @@ -220,7 +220,7 @@
android:layout_marginHorizontal="24dp"
android:layout_marginTop="20dp"
android:layout_marginBottom="8dp"
android:text="For Custom Roms"
android:text="@string/for_custom_roms"
android:textColor="?attr/colorPrimary" />

<RelativeLayout
Expand Down Expand Up @@ -273,7 +273,7 @@
android:layout_marginHorizontal="24dp"
android:layout_marginTop="20dp"
android:layout_marginBottom="8dp"
android:text="Translucent Theme"
android:text="@string/translucent_theme"
android:textColor="?attr/colorPrimary" />

<RelativeLayout
Expand Down Expand Up @@ -411,7 +411,7 @@
android:layout_marginHorizontal="24dp"
android:layout_marginTop="20dp"
android:layout_marginBottom="8dp"
android:text="QS Margin"
android:text="@string/qs_margin"
android:textColor="?attr/colorPrimary" />

<LinearLayout
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/layout/activity_xposed_transparency_blur.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
android:layout_marginHorizontal="24dp"
android:layout_marginTop="20dp"
android:layout_marginBottom="8dp"
android:text="Transparency"
android:text="@string/transparency"
android:textColor="?attr/colorPrimary" />

<RelativeLayout
Expand Down Expand Up @@ -161,7 +161,7 @@
android:layout_marginHorizontal="24dp"
android:layout_marginTop="20dp"
android:layout_marginBottom="8dp"
android:text="Blur"
android:text="@string/blur"
android:textColor="?attr/colorPrimary" />

<RelativeLayout
Expand Down
6 changes: 3 additions & 3 deletions app/src/main/res/layout/fragment_color_engine.xml
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@
android:layout_marginHorizontal="24dp"
android:layout_marginTop="20dp"
android:layout_marginBottom="8dp"
android:text="Stock Colors"
android:text="@string/stock_colors"
android:textColor="?attr/colorPrimary" />

<RelativeLayout
Expand Down Expand Up @@ -241,7 +241,7 @@
android:layout_marginHorizontal="24dp"
android:layout_marginTop="20dp"
android:layout_marginBottom="8dp"
android:text="Dark Theme"
android:text="@string/dark_theme"
android:textColor="?attr/colorPrimary" />

<RelativeLayout
Expand Down Expand Up @@ -337,7 +337,7 @@
android:layout_marginHorizontal="24dp"
android:layout_marginTop="20dp"
android:layout_marginBottom="8dp"
android:text="Misc"
android:text="@string/misc"
android:textColor="?attr/colorPrimary" />

<RelativeLayout
Expand Down
Loading

0 comments on commit 3ab3044

Please sign in to comment.