Commit451 / ForegroundViews

Views that supports a foreground, like FrameLayout does
Apache License 2.0
214 stars 29 forks source link

RecyclerView #8

Open falget opened 7 years ago

falget commented 7 years ago

Hello, when create RecyclerView with GridLayoutManager, foreground in items of recyclerview did not work properly, some item have foreground other not. Tested with ForegroundImageView. When using RecyclerView with LinearLayoutManager everything works good.

Jawnnypoo commented 7 years ago

Is there a chance you can provide some sample code where this is occurring?

falget commented 7 years ago

My item layout: http://pastebin.com/pu0vAtUP Simple RecyclerView adapter: http://pastebin.com/QEHCq9LH Code to initialize RecyclerView and adapter: http://pastebin.com/4Rh2N9Jn I hope this helps, but I think that the problem can be with RelativeLayout.

Jawnnypoo commented 7 years ago

Looking at your item layout, why not just use android:background on the more button? It does not already have a background, so it should work just fine. Also, what version of Android are you seeing this on? 6.0+ defers to the Android implementation, so it might be a problem with the platform.

falget commented 7 years ago

If i set image background not a app:srcCompat, then i can't set image padding and android:tint (color for vector drawable), use android 5.0.

falget commented 7 years ago

I tested more, and create a simple layout, foreground not work: http://pastebin.com/gdzpMsL2