Skip to content

Instantly share code, notes, and snippets.

@steventroughtonsmith
Last active February 12, 2026 23:19
Show Gist options
  • Select an option

  • Save steventroughtonsmith/2b8d1c35d0e1d2fd8a59b956e3c3c1b4 to your computer and use it in GitHub Desktop.

Select an option

Save steventroughtonsmith/2b8d1c35d0e1d2fd8a59b956e3c3c1b4 to your computer and use it in GitHub Desktop.
Lights Off iOS -> Android

User-Side Transcript (This Conversation)

  1. User:

I have this Android project that I last updated in the stone age. I would love to modernize it completely using the latest APIs and with support for modern devices, and fix the bad design patterns. Remain Java/XML. What I do have is the modern iOS version of the app, which I've placed in the 'reference' folder. The iOS app is modern and much better in every way. I would like to replicate the entirety of the iOS app into the Android app, replacing what's there. Including layouts, features, artwork and assets (except app icon). Is this something you can do?

  1. User:

This plan is perfect. What I don't need is any of the in-app purchase stuff or UI or receipt checks. I don't need to monetize the Android version. Thanks

  1. User:

go right ahead

  1. User:

yes do everything, thanks

  1. User:

Unable to find Gradle tasks to build: [:app]. Build mode: ASSEMBLE.

  1. User:

Resource compilation failed (Failed to compile values resource file /Users/steven/Dropbox/Projects/Android/lightsoff/app/build/intermediates/incremental/debug/mergeDebugResources/merged.dir/values/values.xml. Cause: java.lang.IllegalStateException: Can not extract resource from com.android.aaptcompiler.ParsedResource@7b8850bd.). Check logs for more details.

  1. User:

Execution failed for task ':app:mergeDebugResources'. ... (full Gradle/aapt stack trace pasted)

  1. User:

the native UI stuff looks very dated, not using the latest material design adaptive styles

  1. User:

the game board win/reset animations aren't present either

  1. User:

the viewport, especially the part under the game board where the buttons and score area are, doesn't resize at all like the iOS version. It looks very stretched

  1. User:

no there are actual step by step animations happening in the iOS version for the game board, you haven't ported them

  1. User:

please use nice, appropriate material font glyphs for the icons in settings, and make the entire settings and stage select UI use the appropriate Material You APIs to inherit the system theme

  1. User:

the landscape layout is creative, but it doesn't lay out like the iOS version at all. I want it to lay out like on iOS in all shapes and sizes

  1. User:

/Users/steven/Dropbox/Projects/Android/lightsoff/app/src/main/java/com/steventroughtonsmith/lightsoff/app/SettingsActivity.java:53: error: cannot find symbol tabLayout.addTab(tabLayout.newTab().setText(R.string.settings_tab_howto).setIcon(R.drawable.ic_search_black_24)); symbol: variable ic_search_black_24 location: class drawable

  1. User:

/Users/steven/Dropbox/Projects/Android/lightsoff/app/src/main/java/com/steventroughtonsmith/lightsoff/app/SettingsActivity.java:54: error: cannot find symbol tabLayout.addTab(tabLayout.newTab().setText(R.string.settings_tab_themes).setIcon(R.drawable.material_ic_edit_black_24dp)); symbol: variable material_ic_edit_black_24dp location: class drawable

  1. User:

/Users/steven/Dropbox/Projects/Android/lightsoff/app/src/main/java/com/steventroughtonsmith/lightsoff/app/SettingsActivity.java:55: error: cannot find symbol tabLayout.addTab(tabLayout.newTab().setText(R.string.settings_tab_stats).setIcon(R.drawable.ic_clock_black_24dp)); symbol: variable ic_clock_black_24dp location: class drawable

  1. User:

/Users/steven/Dropbox/Projects/Android/lightsoff/app/src/main/java/com/steventroughtonsmith/lightsoff/app/SettingsActivity.java:56: error: cannot find symbol tabLayout.addTab(tabLayout.newTab().setText(R.string.settings_tab_settings).setIcon(R.drawable.ic_keyboard_black_24dp)); symbol: variable ic_keyboard_black_24dp location: class drawable

  1. User:

the layout I'm getting on a foldable when expanded it not at all the same as the layout I'm getting on the phone screen. I want it all unified, one layout

  1. User:

I am sitll getting the game view and the buttons side-by-side on the foldable. It's not using the same layout. Also the settings button has gone missing

  1. User:

also there's some kind of introduced background with style and shadow on both the game board and the score/controls area. I want that to match exactly what the iOS version looks like, which is driven by the app theme

  1. User:

I can confirm that the foldable version looks correct now

  1. User:

you've removed something that now means the foldable app is in compatibility mode rather than filling the screen

  1. User:

the tabs in the preferences view don't navigate anymore. And it still looks very ugly — I want it to use the right system theme colors to do a material design elevation-ready ui with multiple shades of the system theme

  1. User:

you need to check the iOS version again; the layer styles for all the UI elements in the game view are wrong, the spacing is incorrect, etc. Everything should be spaced and styled like iOS. background color, opacity, shadow, stroke color. All of it needs to match exactly, and this needs to be true for every theme in the app

  1. User:

the settings view should be an adaptive tab view. That's the modern material tab view that has a sidebar in large layouts, and a tab bar in small layouts (phone). I think it's com.google.android.material.navigationrail.NavigationRailView. It should be presented as a sheet if that's possible

  1. User:

the game view looks much, much closer to iOS now. The shape of the gear button is completely wrong though (check the iOS version), and the button colors are all grey rather than using the current game theme button color as per iOS

  1. User:

there are still opaque borders on the game board and the tiles on the game board that don't match the styling on iOS (which has a nice soft shadow and borders only if supplied by the current game theme)

  1. User:

there is still a square around the game board?

  1. User:

it might be the image view that provides a background for the Classic theme

  1. User:

You've got it so far. So right now the background of the bottom bar in the game view is too opaque and doesn't match the opacity on iOS as set by the app theme. Also those buttons are still using the system color (of grey) instead of the light yellow color on the honeysuckle theme. This issue is present on all the themes, but I'm testing with honeysuckle

  1. User:

that bar color still doesn't match iOS at all. It's now opaque. On iOS, it's a very semitransparent grey, and that color comes from the theme

  1. User:

we're nearly there. The settings gear button it too tall, it should be a little shorter (it fills the 'gap' in the shape underneath, with a few pts of a curved margin)

  1. User:

honeysuckle now looks beautiful. Other themes don't fare so well. Some of them (like Modern) have an extra gradient overlay that doesn't look nice. Others, like Spectral, have an ugly glow effect on the on tiles that shouldn't be there and doesn't match what happens on iOS

  1. User:

there is also a shadow applied to the logo image at the top of the screen that's incorrect. it shouldn't have a shadow — are we using the right logo image based on the iOS code?

  1. User:

the previews of the levels in the stage picker have inverted colors

  1. User:

both the stage picker and the theme selector are much uglier and less graphical than the iOS versions. Can you go back and check what iOS is doing and match it?

  1. User:

almost what I want. The theme thumbnails should have rounded corners and the same soft shadow I use on the iOS cells. They should also be constrained to a vertical height of probably 2/3 of what they are now. Also the grid in the stage select scrolls over some kind of top bar, it should respect its top bar

  1. User:

the cells in the theme picker are a little too small, make them 50% ish bigger

  1. User:

some of the themes look great, but others clearly aren't setting the right font colors in the lcd view (the score view) that their theme provides. Also the score view is missing some inner stroked rectangles that I can see in the iOS version. Please double-check exactly what the iOS version is doing re score text color and lcd view ornamentation

  1. User:

I notice that the logo doesn't always vertically center itself between the top of the game board and the safe area under the statusbar/notch/cutout. It should

  1. User:

still not centered. i'm noticing this on the phone layout

  1. User:

there's no reason to have both a back button and a done button in the stage selector. is there a prettier way to do this using the latest material design specs?

  1. User:

the stage selector also doesn't have the nice sections I have on iOS, which means the pretty infinity cell doesn't look at all like iOS

  1. User:

the logo color doesn't match the iOS version for each theme. That should be tinted as per the theme

  1. User:

we're almost there on all of the colored themes, but the Classic theme looks like hot garbage. Firstly, its background image doesn't fill the window edge to edge. Secondly, there should be a white window background color only for this theme. Thirdly, the three buttons at the bottom don't use the appropriate image assets like the iOS version. Please double and triple-check what the iOS version does, and match every little visual aspect

  1. User:

it's a lot better, but it doesn't match the iOS version. You picked the wrong image assets for all three buttons — use the images that the iOS version uses. The Classic theme is unique, it's very visually rich compared to the others. It also should have much more pronounced shadows on all the game tiles. Please verify against the iOS version

  1. User:

the tile shadows don't look at all like the iOS ones, do you have the color, radius and opacity right?

  1. User:

the color of the text in the lcd is much whiter than the iOS version of Classic; are you making sure they match?

  1. User:

the background image on Classic should ignore the safe insets of the cutout/status bar and the home indicator. It should go edge to edge, underneath those

  1. User:

you got the pressed/unpressed button images on that gear button wrong btw

  1. User:

here is what Classic looks like btw. You can see the top and bottom don't go flush edge to edge under the bars like they should. Also the game board grid itself looks to be clipped so you cant see the tile shadows at the bottom

[Image attached]

  1. User:

I seem to have lost the bottom gradient on the Classic theme. Can you verify it and compare with the iOS version?

  1. User:

almost perfect. so there's a background image view that goes under the game grid, only for Classic. On Android, it looks clipped. On iOS, it extends past the bounds and fades into the background. Can you confirm you're doing all the same layout and things as the iOS code please? thanks

  1. User:

hmm it's not fixed, are we using the same images as the current iOS code?

  1. User:

no it doesn't need any special effects added. but there's something not rendering the same as the iOS version. the image doesn't draw far outside of the game grid like the iPhone version does

  1. User:

now that looks perfect!

  1. User:

there's an extra glow layer on the Classic theme on iOS that I don't see on Android

  1. User:

the glow views seems to be getting clipped by the grid bounds?

  1. User:

when I change from the classic theme to something like honeysuckle, in large layout (foldable), the logo gets clipped. it should scale its contents to aspect fit

  1. User:

no it still clips the top of the logo

  1. User:

[Image attached]

  1. User:

[Image attached]

  1. User:

I attached the image

  1. User:

it's still clipping the top of the logo and it won't let me send you a screenshot

  1. User:

try fixing the clipping

  1. User:

here's the clipping issue

[Image attached]

  1. User:

hello

  1. User:

can you generate a transcript file of my side of this conversation for me? and put it on my desktop. In markdown. Thanks

Lights Off Android: User Transcript

  • Date: 2026-02-11
  • Scope: User messages only
  1. the image is fine, it should match ios. It's the view that's being clipped
  2. no it's still clipped. It wasn't clipped until we added code to center it, I don't think?
  3. ok that fixes the issue in large layouts. But I do need vertical centering, otherwise the logo is at the tippy top of the phone view and it looks bad. In all layouts it should be centered, but never clipped or pushed out of bounds
  4. it looks very cramped on the large tablet/foldable layout now, doesn't look like it's centered there
  5. I can show you what it looks like. as you can see it's really cramped and not centered nicely in the safe space
  6. while we're tweaking things, the settings gear button is the wrong height in all themes. Can we match the height to iOS?
  7. I don't think that geometry is correct, it's much taller on android than it is on iOS. are you missing something?
  8. the LCD theme doesn't match the colors used on iOS. Can you check it for me? And the background image it uses is much too zoomed on Android, by like 8x or something
  9. I imagine the iOS background image tiles?
  10. the tiling is much better, but it needs to fill edge to edge like the Classic theme, not avoid the statusbar/home indicator. Also the colors of the buttons in the LCD theme still don't look anything like the dark opaque they are on iOS
  11. see how the 'on' tiles are so pale? They should be the color of the reset/stage buttons or nearabouts. Please validate against the iOS version
  12. there's a shadow on the gear icon glyph that shouldn't be there
  13. the Seaside theme on/off buttons don't match iOS. The off ones should be a white color. Please verify
  14. there should be a tiny margin between the outlined box that has the numbers, and the outlined box that has 'stage' and 'moves'. It's maybe 2pt
  15. ok I almost love everything. I'm still not happy with the vertical centering of the logo in expanded layouts. It's just not centered like it should be
  16. I'll allow it. So the win flourish animation, it starts before all the board lights are properly off. That's incorrect
  17. when a tile changes between on and off, it should crossfade properly like on iOS. This happens for the choreographed animations too
  18. the crossfade animation is a little long, does it match the iOS timing?
  19. so the glyphs in the settings page are a bit weird. Hot to play has a question mark in a circle on iOS, themes has a color palette, stats has a list of lines, and settings has a gear shape. Can you replicate those glyphs with what you have in material design?
  20. why is the settings sheet a beautiful roundrect when the stages one is an ugly square? can we make both the roundrect?
  21. can you hide the 'Our Apps' section in the settings pane? I'd love to keep it, but it's all links to iOS apps
  22. Email Support should have an email icon, and the stroughtonsmith link should use the mastodon icon same as on iOS. Please validate against the ios app
  23. the How To Play page doesn't use the same animated version of the instrucitonal graphic that's defined in code on iOS. It uses an old image based version that is no longer used. Can you replicate the iOS one exactly into the android on? Also the text in that page needs to be constrained to a max width of like 400pt
  24. when clicking on a theme in settings, I want it to apply immediately to the game view (which can be seen underneath settings)
  25. now I would like to tackle the look of the settings page on the phone layout. It is very weird right now, the content is underneath the tab bar rather than the tab bar being at the bottom. I want to use the latest material design 3 expressive standards to make this settings view look like the best app on android
  26. it's much better. The sheet should extend under the home indicator area where appropriate, using the appropriate safe areas for its content. Also why is there a double top bar in the sheet? That surely isn't the latest design standard. Best app on android, remember
  27. I want to use an AppBarLayout like described in https://github.com/material-components/material-components-android/blob/master/docs/components/TopAppBar.md and https://developer.android.com/reference/com/google/android/material/appbar/package-summary
  28. remember it's the compact layout I want to see changed; I haven't seen any difference onscreen with your last two changes. It also has a black bar where the home indicator should be — the tab view should extend into that area properly
  29. I want to show you that again, you haven't fixed the double top bar. I want that to be a modern app bar with a system-standard large title and a back button. And again, the area under the home indicator is black, which I don't want
  30. see that looks much better. I do want that top app bar to extend up into the statusbar/notch area, too. And I want the same top app bar treatment on the expanded layout too, in a way that's appropriate for a nav rail design
  31. we can rename 'Preferences' to 'Settings' in every case. The expanded mode still has the double-title problem from previously, it needs the same fix as we did for compact. Also the area under the statusbar on compact isn't an extension of the top app bar, and looks wrong. It should be an extension (or the correct way to do this on Android). The status bar item color should adapt too to account for the light/dark background underneath
  32. here's the compact layout. As you can see, the area above the top bar isn't the same color as the top bar
  33. nope, same colored area, screenshot the same as before
  34. my app fonts don't look correct for Material Design 3 Expressive. I want to use the latest recommended styles
  35. I think you're right that the app bar should be the same color as the window background. It should blend in and look seamless
  36. are there no built-in animations for the settings tab bar / rail glyphs? other system apps seem to have animations
  37. this top app bar still doesn't blend in. I need it to blend in
  38. now it's a really dark purple color rather than the background color
  39. the app bar is still a different color to the background. Why is this so difficult
  40. still a different color. We've had like ten iterations that have made no difference. Is it so hard for the background color to match the app bar color?
  41. still looks completely and utterly the same as before, in both light and dark mode
  42. this is now perfect. thank you. the back button in the app bar is just a chevron, but when I check other beautiful android apps like Clock or Recorder, it uses an arrow glyph instead
  43. much better. the list in the Settings tab looks somewhat ugly. I want it to use the latest Expressive List styles as per https://m3.material.io/components/lists/overview
  44. it looks pretty nice now. the spacing is pretty cramped though, rows should be bigger and icons have a little more space. And there's a stroke background around each section that seems unnecessary. it should use expressive styles with rounded corners on each cell
  45. I think the sounds and haptics rows should have an appropriate material design glyph
  46. the subtitle text on each cell should use a secondary label color
  47. this is great. Can we group the cells in each section a little? as appropriate using the proper apis
  48. now can you do the same treatment to the Stats page please? It also has the game preview thumbnails with inverted colors in light mode, not what I was expecting
  49. the secondary color on the Settings page is a shade too dark, I would like it lighter (as appropriate using system colors)
  50. comparing to the iOS version, the endless stages completed should be a separate section frmo the other stage table view, with its own styling. Can you verify what the iOS version is doing, then replicate that as appropriate
  51. the subtitle text 'Play game sound effects' etc is still too strong for my tastes, especially in dark mode
  52. I think I would like the settings sheet/window to always use a dark mode theme. I think it looks better
  53. I think I liked having the level preview in the stats view rows, more than the iOS version styling. Can you put a level preview for each row like you had before, but use the system theme strong colors for the on tiles, and the system theme subtle colors for the off tiles
  54. much, much better. I think I want the same rendering colors for the stages selection view too
  55. it also has an appbar that should blend into the window background
  56. oh I want this sheet to always be dark mode too
  57. I think I want this stage selector to be a bottom sheet, as per https://m3.material.io/components/bottom-sheets/overview. Only on compact/phone layout, though
  58. I'm reverting that change, that didn't work at all and I think asking you to fix it will break things further
  59. a question; in expanded foldable layout, all the colors in the settings view inherit the system theme colors as set by the user. In compact/phone view, I get instead a purple-y theme. I would always like it to inherit the system colors
  60. one tiny bug: the classic theme sets a specific gear image for the gear button. but when I change back to other themes, it doesn't update that image to the right one for all the rest
  61. now the app is basically complete. Thank you for your help. There's one fun feature I would like to try, while we're at it. I would like to create a new theme. That theme should be called 'Material', and it should use the user's theme colors. Strong color for on tiles and title logo, a medium color for off tiles and buttons, a subtle color for the lcd (score view), and a light color for the background. 'Material' should be listed second in the themes list, after classic and before modern. Can you give this a go for me?
  62. swap the background color with the tile off color
  63. the strong color should also be used for the labels in the score view, and the buttons
  64. the score number labels too
  65. we should call this theme 'Dynamic'
  66. this theme preview should use theme_thumb_dynamic.png
  67. the selection highlight in the Themes view should always use the material strong color
  68. there's a stroke border on all of the theme thumbnails that I think we can remove
  69. there's still a hard border on all of the thumbnails. I only need/want a shadow
  70. this is perfect now, thanks
  71. I'm still searing the wrong gearshape icon/image on the gear button on all the non-Classic themes
  72. one last tweak; could we use the same colors as the dynamic theme for the animated How to Play section? i.e. for the tile on and off colors
  73. one last thing, the Stage selector window doesn't seem to have a dynamic theme either. it should
  74. oh it should always use dark mode though, so dynamic dark
  75. it still seems to use light mode for me? the stage selector should be dark mode
  76. can you generate a transcript file of my side of this conversation for me? and put it on my desktop

Comments are disabled for this gist.