简体   繁体   中英

Google Glass CardScrollView does not render while swiping

I'm attempting to create a GDK app that has a similar user interface as the sample Timer app in that it launches sub-activities in which to render CardScrollView instances that cycle through valid selections.

My problem is that once I am at the point where I cycle through the numbers, the CardScrollView stops rendering while the scrolling is in motion. I can see the previous activity revealed and rendering until the activity containing the currently active cards stop scrolling.

Is there something obvious I'm missing here?

In my case, the answer was that I'd foolishly applied the "MenuStyle" style that the Timer activity uses to all my sub-activities in the AndroidManifest. This style specifies the following:

   <style name="MenuTheme" parent="@android:style/Theme.DeviceDefault">
       <item name="android:windowBackground">@android:color/transparent</item>
       <item name="android:colorBackgroundCacheHint">@null</item>
       <item name="android:windowIsTranslucent">true</item>
       <item name="android:windowAnimationStyle">@null</item>
   </style>

So indeed, given the null animation style and the transparent background, nothing would be displayed while the CardScrollView is in motion.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM