airbnb / mavericks

Mavericks: Android on Autopilot
https://airbnb.io/mavericks/
Apache License 2.0
5.83k stars 500 forks source link

Customize theme for MavericksLauncherMockActivity #564

Open Dwite opened 3 years ago

Dwite commented 3 years ago

Hey, I'm recently started to use Mavericks mocking system, but some views are showing differently from regular app flow, I assume thats because difference in theme?

I've tried to set it via

<activity android:name="com.airbnb.mvrx.launcher.MavericksLauncherActivity" android:theme="@style/AppTheme"/>
        <activity android:name="com.airbnb.mvrx.launcher.MavericksLauncherMockActivity" android:theme="@style/AppTheme"/>

But that didn't work, specifically the ripple effects on buttons missing, the stroke color is not applied.

I'm launching it via adb adb shell am start -n mypackage/com.airbnb.mvrx.launcher.MavericksLauncherActivity

It seems I see changes because Button is not replaced with MaterialButton version and only reason for that I see is that activity is not using Theme.MaterialComponents.* theme or am I missing something?

Dwite commented 3 years ago

I assume the views are not replaced by their AppCompact or Material version is because launcher activity is FragmentActivity and not AppCompactActivity