@@ -711,6 +711,7 @@ class MainActivity : AppCompatActivity() {
711711 ReorderItem (" show_weather_condition" , getString(R .string.section_weather_condition), prefs.getBoolean(" show_weather_condition" , false )),
712712 ReorderItem (" show_data_usage" , getString(R .string.section_data_usage), prefs.getBoolean(" show_data_usage" , false )),
713713 ReorderItem (" show_storage" , getString(R .string.section_storage), prefs.getBoolean(" show_storage" , false )),
714+ ReorderItem (" show_ram" , getString(R .string.section_ram), prefs.getBoolean(" show_ram" , false )),
714715 ReorderItem (" show_steps" , getString(R .string.section_steps), prefs.getBoolean(" show_steps" , false )),
715716 ReorderItem (" show_screen_time" , getString(R .string.section_screen_time), prefs.getBoolean(" show_screen_time" , false ))
716717 )
@@ -853,6 +854,7 @@ class MainActivity : AppCompatActivity() {
853854 setupWeatherSection()
854855 setupDataUsageSection()
855856 setupStorageSection()
857+ setupRamSection()
856858 setupStepsSection()
857859 setupScreenTimeSection()
858860 setupKeepAliveSection()
@@ -1024,6 +1026,18 @@ class MainActivity : AppCompatActivity() {
10241026 checkAllPermissions()
10251027 }
10261028 }
1029+ private fun setupRamSection () {
1030+ // RAM
1031+ bindFoldedSection(
1032+ R .id.header_ram, R .drawable.ic_storage, getString(R .string.section_ram),
1033+ R .id.content_ram, R .id.row_ram_toggle,
1034+ " show_ram" , false ,
1035+ sizeRowId = R .id.row_ram_size, prefSizeKey = " size_ram" , defSize = 14f , minSize = 10f , maxSize = 74f ,
1036+ isContent = true
1037+ ).also { it.tag = " ram" }
1038+ bindToggle(R .id.row_ram_bold, " Bold Text" , " bold_ram" , false )
1039+ }
1040+
10271041 private fun setupStorageSection () {
10281042 // Storage
10291043 bindFoldedSection(
@@ -1394,7 +1408,7 @@ class MainActivity : AppCompatActivity() {
13941408 " show_time" to true , " size_time" to 58f ,
13951409 " show_date" to true , " size_date" to 16f ,
13961410 " show_battery" to false , " show_temp" to false ,
1397- " show_storage" to false , " show_data_usage" to false ,
1411+ " show_storage" to false , " show_ram " to false , " show_data_usage" to false ,
13981412 " show_steps" to false , " show_screen_time" to false ,
13991413 " show_next_alarm" to false , " show_world_clock" to false ,
14001414 " show_events" to false , " show_tasks" to false ,
@@ -1412,7 +1426,7 @@ class MainActivity : AppCompatActivity() {
14121426 " show_date" to true , " size_date" to 14f ,
14131427 " show_battery" to true , " size_battery" to 28f , " bold_battery" to true ,
14141428 " show_temp" to true , " size_temp" to 18f , " bold_temp" to true ,
1415- " show_storage" to false , " show_data_usage" to false ,
1429+ " show_storage" to false , " show_ram " to false , " show_data_usage" to false ,
14161430 " show_steps" to false , " show_screen_time" to false ,
14171431 " show_next_alarm" to true , " size_next_alarm" to 12f ,
14181432 " show_world_clock" to false ,
@@ -1425,15 +1439,15 @@ class MainActivity : AppCompatActivity() {
14251439 " date_color_idx" to 2 , " date_color_r" to 255 , " date_color_g" to 0 , " date_color_b" to 180 ,
14261440 " outline_color_idx" to 2 , " outline_color_r" to 0 , " outline_color_g" to 200 , " outline_color_b" to 255 ,
14271441 " bg_color_idx" to 2 , " bg_color_r" to 10 , " bg_color_g" to 10 , " bg_color_b" to 20 ,
1428- " widget_right_column_order" to " show_battery,show_temp,show_weather_condition,show_data_usage,show_storage,show_steps,show_screen_time"
1442+ " widget_right_column_order" to " show_battery,show_temp,show_weather_condition,show_data_usage,show_storage,show_ram, show_steps,show_screen_time"
14291443 )),
14301444 // Cockpit: green on dark, monospace, info-heavy, terminal look
14311445 Preset (" cockpit" , " Cockpit" , mapOf (
14321446 " show_time" to true , " size_time" to 42f ,
14331447 " show_date" to true , " size_date" to 14f ,
14341448 " show_battery" to true , " size_battery" to 18f , " bold_battery" to false ,
14351449 " show_temp" to true , " size_temp" to 16f , " bold_temp" to false ,
1436- " show_storage" to true , " size_storage" to 14f , " bold_storage" to false ,
1450+ " show_storage" to true , " size_storage" to 14f , " bold_storage" to false , " show_ram " to false , " size_ram " to 14f , " bold_ram " to false ,
14371451 " show_data_usage" to true , " size_data" to 14f , " bold_data_usage" to false ,
14381452 " show_steps" to false , " show_screen_time" to false ,
14391453 " show_next_alarm" to true , " size_next_alarm" to 14f ,
@@ -1447,14 +1461,14 @@ class MainActivity : AppCompatActivity() {
14471461 " date_color_idx" to 2 , " date_color_r" to 0 , " date_color_g" to 200 , " date_color_b" to 80 ,
14481462 " outline_color_idx" to 2 , " outline_color_r" to 0 , " outline_color_g" to 120 , " outline_color_b" to 40 ,
14491463 " bg_color_idx" to 2 , " bg_color_r" to 5 , " bg_color_g" to 15 , " bg_color_b" to 5 ,
1450- " widget_right_column_order" to " show_battery,show_storage,show_data_usage,show_temp,show_weather_condition,show_steps,show_screen_time"
1464+ " widget_right_column_order" to " show_battery,show_storage,show_ram, show_data_usage,show_temp,show_weather_condition,show_steps,show_screen_time"
14511465 )),
14521466 // Sunset: warm oranges/gold, serif font, elegant minimal
14531467 Preset (" sunset" , " Sunset" , mapOf (
14541468 " show_time" to true , " size_time" to 54f ,
14551469 " show_date" to true , " size_date" to 18f ,
14561470 " show_battery" to true , " size_battery" to 24f , " bold_battery" to true ,
1457- " show_temp" to false , " show_storage" to false ,
1471+ " show_temp" to false , " show_storage" to false , " show_ram " to false ,
14581472 " show_data_usage" to false , " show_steps" to false ,
14591473 " show_screen_time" to false ,
14601474 " show_next_alarm" to true , " size_next_alarm" to 14f ,
@@ -1467,14 +1481,14 @@ class MainActivity : AppCompatActivity() {
14671481 " text_color_secondary_idx" to 2 , " text_color_secondary_r" to 230 , " text_color_secondary_g" to 140 , " text_color_secondary_b" to 60 ,
14681482 " date_color_idx" to 2 , " date_color_r" to 255 , " date_color_g" to 120 , " date_color_b" to 50 ,
14691483 " bg_color_idx" to 2 , " bg_color_r" to 30 , " bg_color_g" to 15 , " bg_color_b" to 8 ,
1470- " widget_right_column_order" to " show_battery,show_temp,show_weather_condition,show_data_usage,show_storage,show_steps,show_screen_time"
1484+ " widget_right_column_order" to " show_battery,show_temp,show_weather_condition,show_data_usage,show_storage,show_ram, show_steps,show_screen_time"
14711485 )),
14721486 // Monochrome: white outline, all white text, medium font, classic layout
14731487 Preset (" monochrome" , " Monochrome" , mapOf (
14741488 " show_time" to true , " size_time" to 48f ,
14751489 " show_date" to true , " size_date" to 14f ,
14761490 " show_battery" to true , " size_battery" to 22f , " bold_battery" to false ,
1477- " show_temp" to false , " show_storage" to true , " size_storage" to 14f ,
1491+ " show_temp" to false , " show_storage" to true , " size_storage" to 14f , " show_ram " to false , " size_ram " to 14f ,
14781492 " show_data_usage" to false , " show_steps" to false ,
14791493 " show_screen_time" to false ,
14801494 " show_next_alarm" to true , " size_next_alarm" to 14f ,
@@ -1488,14 +1502,14 @@ class MainActivity : AppCompatActivity() {
14881502 " date_color_idx" to 2 , " date_color_r" to 200 , " date_color_g" to 200 , " date_color_b" to 200 ,
14891503 " outline_color_idx" to 2 , " outline_color_r" to 100 , " outline_color_g" to 100 , " outline_color_b" to 100 ,
14901504 " bg_color_idx" to 2 , " bg_color_r" to 25 , " bg_color_g" to 25 , " bg_color_b" to 25 ,
1491- " widget_right_column_order" to " show_battery,show_storage,show_temp,show_weather_condition,show_data_usage,show_steps,show_screen_time"
1505+ " widget_right_column_order" to " show_battery,show_storage,show_ram, show_temp,show_weather_condition,show_data_usage,show_steps,show_screen_time"
14921506 )),
14931507 // Snowfall: icy blues, light font, airy feel
14941508 Preset (" snowfall" , " Snowfall" , mapOf (
14951509 " show_time" to true , " size_time" to 60f ,
14961510 " show_date" to true , " size_date" to 16f ,
14971511 " show_battery" to false , " show_temp" to true , " size_temp" to 20f , " bold_temp" to false ,
1498- " show_storage" to false , " show_data_usage" to false ,
1512+ " show_storage" to false , " show_ram " to false , " show_data_usage" to false ,
14991513 " show_steps" to false , " show_screen_time" to false ,
15001514 " show_next_alarm" to false ,
15011515 " show_world_clock" to false ,
@@ -1507,7 +1521,7 @@ class MainActivity : AppCompatActivity() {
15071521 " text_color_secondary_idx" to 2 , " text_color_secondary_r" to 130 , " text_color_secondary_g" to 180 , " text_color_secondary_b" to 230 ,
15081522 " date_color_idx" to 2 , " date_color_r" to 100 , " date_color_g" to 170 , " date_color_b" to 255 ,
15091523 " bg_color_idx" to 2 , " bg_color_r" to 10 , " bg_color_g" to 20 , " bg_color_b" to 40 ,
1510- " widget_right_column_order" to " show_temp,show_battery,show_weather_condition,show_data_usage,show_storage,show_steps,show_screen_time"
1524+ " widget_right_column_order" to " show_temp,show_battery,show_weather_condition,show_data_usage,show_storage,show_ram, show_steps,show_screen_time"
15111525 ))
15121526 )
15131527
@@ -1704,10 +1718,10 @@ class MainActivity : AppCompatActivity() {
17041718
17051719 // Subset Limit: Battery, Weather, Temp, Data, Storage (Max 5 allowed now to fit stack)
17061720 val subsetCount = contentSwitches.count {
1707- it.isChecked && (it.tag == " battery" || it.tag == " weather_condition" || it.tag == " temp" || it.tag == " data" || it.tag == " storage" )
1721+ it.isChecked && (it.tag == " battery" || it.tag == " weather_condition" || it.tag == " temp" || it.tag == " data" || it.tag == " storage" || it.tag == " ram " )
17081722 }
17091723
1710- if (subsetCount > 5 ) {
1724+ if (subsetCount > 6 ) {
17111725 com.google.android.material.snackbar.Snackbar .make(
17121726 findViewById(R .id.fab_update),
17131727 getString(R .string.error_max_subset_items),
0 commit comments