cashapp / paparazzi

Render your Android screens without a physical device or emulator
https://cashapp.github.io/paparazzi/
Apache License 2.0
2.29k stars 214 forks source link

Device specific Default themes #525

Open yschimke opened 2 years ago

yschimke commented 2 years ago

Description

The theme is device specific, at least for Wear, which should use something like @android:style/Theme.DeviceDefault or @android:style/ThemeOverlay.Material.Dark, but shouldn't have a NavigationBar.

class Paparazzi @JvmOverloads constructor(
  private val environment: Environment = detectEnvironment(),
  private val deviceConfig: DeviceConfig = DeviceConfig.NEXUS_5,
  private val theme: String = "android:Theme.Material.NoActionBar.Fullscreen",

Steps to Reproduce

Make a screenshot test with

  val paparazzi = Paparazzi(
    deviceConfig = DeviceConfig.WEAR_OS_SMALL_ROUND,
  )

Expected behavior

Something closer to results from

val paparazzi = Paparazzi( deviceConfig = DeviceConfig.WEAR_OS_SMALL_ROUND, theme = "android:ThemeOverlay.Material.Dark" )

Although I don't actually know the right value to use here.

Additional information:

Screenshots

image

yschimke commented 2 years ago

@luis-cortes Since my direct need has gone, should I close this off? Or are there reasons we may want to support different per device default themes, to replicate OEM changes? or version changes?