milosmns / actual-number-picker

Android: A horizontal number picker
GNU General Public License v3.0
222 stars 36 forks source link

Doesn't showing on Android 6.0 if on ListView #7

Closed antoniocgrande closed 7 years ago

antoniocgrande commented 7 years ago

I did make one ListView and inflated the ActualNumberPicker on Adapter. Did works fine on Android 4.1.2, but on Android 6.0 doesn't is shown nothing.

milosmns commented 7 years ago

You put the slider into a ListView as an item? It should be similar to the ViewPager in terms of touch handling, but a weird case altogether. Can you verify it happens only on 6.0 devices? I have devices with 6.0 and 7.0 and it works fine in a ViewPager - it doesn't do anything special related to a lower API level so this bug doesn't really make sense to me.

Can you try it with a RecyclerView? https://developer.android.com/training/material/lists-cards.html

antoniocgrande commented 7 years ago

Yes, I put the slider into a ListView as an item. I received the following error log on Android Monitor.

11-30 11:30:30.645 2971-2971/br.com.jcr.icar W/View: ActualNumberPicker not displayed because it is too large to fit into a software layer (or drawing cache), needs 780300 bytes, only 384000 available

I'm testing on Android 6.0 emulator. In my device Android 4.1.2 works fine.

thanks for your help. regards.

2016-11-24 13:02 GMT-02:00 Milos Marinkovic notifications@github.com:

You put the slider into a ListView as an item? It should be similar to the ViewPager in terms of touch handling, but a weird case altogether. Can you verify it happens only on 6.0 devices? I have devices with 6.0 and 7.0 and it works fine in a ViewPager - it doesn't do anything special related to a lower API level so this bug doesn't really make sense to me.

Can you try it with a RecyclerView? https://developer.android.com/ training/material/lists-cards.html

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/milosmns/actual-number-picker/issues/7#issuecomment-262795373, or mute the thread https://github.com/notifications/unsubscribe-auth/AVYuXXorVFDtnrWhyeps_QJFrHNCCJn6ks5rBabwgaJpZM4K7sEP .

milosmns commented 7 years ago

Okay I think it's either the emulator or the ListView (probably emulator due to low memory footprint. You should be using the RecyclerView anyway as ListView is practically deprecated now - more information at https://developer.android.com/training/material/lists-cards.html