Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0fea4003 authored by Fan Zhang's avatar Fan Zhang
Browse files

Fix robolectric tests

- Override a button style to avoid dependency on new style name.

Change-Id: I62935afe16424d8ddf0c2448327d76eda00440a5
Fixes: 69918100
Test: robotests
parent cb721bd8
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -65,7 +65,7 @@
            android:orientation="vertical">
            <Button
                android:id="@android:id/text1"
                style="@style/SupportPrimaryButton"
                style="@style/ActionPrimaryButton"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_margin="8dp"/>
@@ -86,7 +86,7 @@
            android:orientation="vertical">
            <Button
                android:id="@android:id/text2"
                style="@style/SupportPrimaryButton"
                style="@style/ActionPrimaryButton"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_margin="8dp"/>
+1 −1
Original line number Diff line number Diff line
@@ -56,7 +56,7 @@
    </LinearLayout>
    <Button
        android:id="@android:id/text1"
        style="@style/SupportPrimaryButton"
        style="@style/ActionPrimaryButton"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_margin="8dp"
+1 −1
Original line number Diff line number Diff line
@@ -38,7 +38,7 @@
        android:textColor="?android:attr/textColorSecondary"/>
    <Button
        android:id="@android:id/text1"
        style="@style/SupportPrimaryButton"
        style="@style/ActionPrimaryButton"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_margin="8dp"/>
+0 −2
Original line number Diff line number Diff line
@@ -338,8 +338,6 @@

    <style name="TextAppearance.SupportSummary" parent="TextAppearance.CategoryTitle"/>

    <style name="SupportPrimaryButton" parent="android:Widget.DeviceDefault.Button.Colored"/>

    <style name="SupportSecondaryButton"
           parent="android:Widget.DeviceDefault.Button.Borderless.Colored">
        <item name="android:textSize">12sp</item>
+5 −1
Original line number Diff line number Diff line
<resources>
    <style name="Theme.Settings" parent="@android:style/Theme.DeviceDefault.Settings" />

    <!-- Override the main app's style for ActionPrimaryButton to get around lack of new style
         support in robolectric  -->
    <style name="ActionPrimaryButton" parent="android:Widget.DeviceDefault.Button" />
</resources>