Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Button] Vertical bar appers and gone on the right of button and textview's #4118

Open
kelalaka153 opened this issue Mar 27, 2024 · 3 comments

Comments

@kelalaka153
Copy link

This is a very strange behavior. I'm using bottom navigation and in one of the fragments (FA) there is a button. When the fragment is shown for the first time everything is normal. When we use bottom navigation to other fragments and then back to the FA, a vertical bar appears on the right of the button and then disappears in 3 seconds. This happens to buttons only with style using Widget.MaterialComponents.Button.OutlinedButton as parent style. Elevated is behaving as expected.

This is the style that the button uses

    <style name="ButtonTopGroupRight" parent="Widget.MaterialComponents.Button.OutlinedButton">
        <item name="iconPadding">8dp</item>
        <item name="fontFamily">@font/poppins</item>
        <item name="iconTint">@drawable/button_top_group_right_selector</item>
        <item name="strokeColor">@drawable/button_top_group_right_selector</item>
        <item name="android:textColor">@drawable/button_top_group_right_selector</item>

    </style>

Expected behavior:

button_submit_1

button_submit_2

Source code: The code snippet which is causing this issue

This is the button.

            <com.google.android.material.button.MaterialButton
                android:id="@+id/addFilterButtonWide"
                style="@style/ButtonTopGroupRight"
                android:layout_width="140dp"
                android:layout_height="40dp"
                android:text="@string/common_filter"
                android:textColor="@color/black"

                android:layout_gravity="start"
                android:visibility="gone"
                />

Android API version:

minSdk = 29
compileSdk = 34

Material Library version:

material:1.11.0

Device:

Tested on Android 11,12 devices and Android 14 emulator.

@hunterstich
Copy link
Contributor

Hi @kelalaka153,

Do you have a minimal sample app you can share with us that reproduces this? I don't see anything like this when trying to repro the issue on my end. Thanks!

@hunterstich hunterstich changed the title [Component name] Vertical bar appers and gone on the right of button and textview's [Button] Vertical bar appers and gone on the right of button and textview's Mar 28, 2024
@kelalaka153
Copy link
Author

kelalaka153 commented Apr 11, 2024

I'm trying to minimize the code. need a little more time.

@langsmith
Copy link

@kelalaka153 , I also saw this (a couple of months ago). I doubt it's been fixed in the latest 1.12.0 version of Material. I put android:scrollbars="none" on the views that were showing the scrollbars 😕

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants