frakbot / glowpadbackport Goto Github PK
View Code? Open in Web Editor NEWA backport of the Android 4.2 GlowPadView that works on the SDK on API levels 4+
A backport of the Android 4.2 GlowPadView that works on the SDK on API levels 4+
TargetDrawable.java uses reflection to access the getStateCount, which causes an error to popup in Android P
49 | mGetStateCount.setAccessible(true);
https://github.com/frakbot/GlowPadBackport/search?utf8=%E2%9C%93&q=StateListDrawable&type=
When setting compileSdkVersion to 23 in my project, proguard shows these warnings:
Warning: net.frakbot.glowpadbackport.PointCloud: can't find referenced method 'float cos(float)' in library class android.util.FloatMath
Warning: net.frakbot.glowpadbackport.PointCloud: can't find referenced method 'float sin(float)' in library class android.util.FloatMath
Warning: net.frakbot.glowpadbackport.PointCloud: can't find referenced method 'float sqrt(float)' in library class android.util.FloatMath
your library is great. it works smoothly on 2.3 to 4.4.2. But I have 1 unknown issue. In my nexus one with 2.3.7, when i touch the ring it force closes. below is the log.
please help.
01-12 14:34:11.787: E/AndroidRuntime(9479): android.content.res.Resources$NotFoundException: Array resource ID #0x0
01-12 14:34:11.787: E/AndroidRuntime(9479): at android.content.res.Resources.obtainTypedArray(Resources.java:432)
01-12 14:34:11.787: E/AndroidRuntime(9479): at net.sebastianopoggi.ui.GlowPadBackport.GlowPadView.loadDescriptions(GlowPadView.java:1359)
01-12 14:34:11.787: E/AndroidRuntime(9479): at net.sebastianopoggi.ui.GlowPadBackport.GlowPadView.getTargetDescription(GlowPadView.java:1336)
01-12 14:34:11.787: E/AndroidRuntime(9479): at net.sebastianopoggi.ui.GlowPadBackport.GlowPadView.announceTargets(GlowPadView.java:1321)
01-12 14:34:11.787: E/AndroidRuntime(9479): at net.sebastianopoggi.ui.GlowPadBackport.GlowPadView.switchToState(GlowPadView.java:379)
01-12 14:34:11.787: E/AndroidRuntime(9479): at net.sebastianopoggi.ui.GlowPadBackport.GlowPadView.trySwitchToFirstTouchState(GlowPadView.java:1059)
01-12 14:34:11.787: E/AndroidRuntime(9479): at net.sebastianopoggi.ui.GlowPadBackport.GlowPadView.handleDown(GlowPadView.java:841)
01-12 14:34:11.787: E/AndroidRuntime(9479): at net.sebastianopoggi.ui.GlowPadBackport.GlowPadView.onTouchEvent(GlowPadView.java:783)
java.lang.ClassNotFoundException: net.sebastianopoggi.ui.GlowPadBackport.GlowPadView$AnimationBundle
at org.jetbrains.android.uipreview.ProjectClassLoader.load(ProjectClassLoader.java:92)
at com.android.tools.idea.rendering.RenderClassLoader.findClass(RenderClassLoader.java:55)
at org.jetbrains.android.uipreview.ProjectClassLoader.findClass(ProjectClassLoader.java:54)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
at net.sebastianopoggi.ui.GlowPadBackport.GlowPadView.<init>(GlowPadView.java:99)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at org.jetbrains.android.uipreview.ViewLoader.createNewInstance(ViewLoader.java:375)
at org.jetbrains.android.uipreview.ViewLoader.loadView(ViewLoader.java:100)
at com.android.tools.idea.rendering.ProjectCallback.loadView(ProjectCallback.java:165)
at android.view.BridgeInflater.loadCustomView(BridgeInflater.java:207)
at android.view.BridgeInflater.createViewFromTag(BridgeInflater.java:135)
at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:755)
at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:64)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:727)
at android.view.LayoutInflater.inflate(LayoutInflater.java:492)
at android.view.LayoutInflater.inflate(LayoutInflater.java:373)
at com.android.layoutlib.bridge.impl.RenderSessionImpl.inflate(RenderSessionImpl.java:399)
at com.android.layoutlib.bridge.Bridge.createSession(Bridge.java:336)
at com.android.ide.common.rendering.LayoutLibrary.createSession(LayoutLibrary.java:332)
at com.android.tools.idea.rendering.RenderService$3.compute(RenderService.java:549)
at com.android.tools.idea.rendering.RenderService$3.compute(RenderService.java:538)
at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:932)
at com.android.tools.idea.rendering.RenderService.createRenderSession(RenderService.java:538)
at com.android.tools.idea.rendering.RenderService.render(RenderService.java:611)
at org.jetbrains.android.uipreview.AndroidLayoutPreviewToolWindowManager.doRender(AndroidLayoutPreviewToolWindowManager.java:575)
at org.jetbrains.android.uipreview.AndroidLayoutPreviewToolWindowManager.access$1700(AndroidLayoutPreviewToolWindowManager.java:81)
at org.jetbrains.android.uipreview.AndroidLayoutPreviewToolWindowManager$6$1.run(AndroidLayoutPreviewToolWindowManager.java:521)
at com.intellij.openapi.progress.impl.ProgressManagerImpl$2.run(ProgressManagerImpl.java:178)
at com.intellij.openapi.progress.ProgressManager.executeProcessUnderProgress(ProgressManager.java:209)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:212)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.runProcess(ProgressManagerImpl.java:171)
at org.jetbrains.android.uipreview.AndroidLayoutPreviewToolWindowManager$6.run(AndroidLayoutPreviewToolWindowManager.java:516)
at com.intellij.util.ui.update.MergingUpdateQueue.execute(MergingUpdateQueue.java:320)
at com.intellij.util.ui.update.MergingUpdateQueue.execute(MergingUpdateQueue.java:310)
at com.intellij.util.ui.update.MergingUpdateQueue$2.run(MergingUpdateQueue.java:254)
at com.intellij.util.ui.update.MergingUpdateQueue.flush(MergingUpdateQueue.java:269)
at com.intellij.util.ui.update.MergingUpdateQueue.flush(MergingUpdateQueue.java:227)
at com.intellij.util.ui.update.MergingUpdateQueue.run(MergingUpdateQueue.java:217)
at com.intellij.util.concurrency.QueueProcessor.runSafely(QueueProcessor.java:238)
at com.intellij.util.Alarm$Request$1.run(Alarm.java:318)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)
Hi,
I was wondering if you can tell me how to import the library in my Android Studio 0.5.7 ?
I am having quite some issues :(
/edit :
Is there any other way to contact you ? I actually read and tried the documentation first, and what I did was clone the project first, then copy the GlowPadBackport directory (so not the rest of the project/directories) under my own project /libs directory, and afterwards I would be getting errors (Error : configuration with name 'deffault' not found)...
Whilst writing this I already am wondering if I should not copy the whole project and then get rid of the GlowPadBackport-sample directory....
Hi rock3r,
Imported ur library in to my sample project but each time I try to run it I face this same error in GlowPadView.java
at[ if(mTargetDrawables == null || mTargetDrawables.size()==0) ] - to be specific. That condition turns true and it throws the IllegalStateException as coded.
What could be the reason? The library is untouched and none of the arrays,attrs are missing. It compiles successfully but throws an error at runtime.
By the way, I am using AIDE for android. But looking at the nature of the error thrown, I don't think IDE has anything to do with it. Please respond soon. Even though this is not the main functionality of my app, its going to be a valuable addition. Thanks for ur effort to pull n port this library.
hi
how to set ringing the glowpad?
thanks in advance...
Add support for Gradle and Android Studio. Maybe release on Maven Central?
When I try to import the application to eclipse. I see a error 'No projects found to import'
I have integrated your great glowpadview backport into one of my app on a lock screen activity. On the onTrigger
event, a call to finish
is performed. I have tested it on some devices and it works good. However I have a user who has reported an issue with his phone (Coolpad 8297 - Android 4.2.2):
"When I get an incoming text and I try to unlock the custom lockscreen it suddenly gives me the inner slider lock again but now with a circle around it like it does when sliding to the right. Now I have to slide the slider to the right again, so twice in total to unlock. Unlike once when no incoming texts.
Steps to reproduce are: I get incoming text, I press power button on phone, I wait for custom lock screen to load, I try to unlock, then I have to unlock it again since its somehow stuck when I get a text."
Below is an image sent by the user:
http://imgur.com/3F5VNmA
Unfortunately, I haven't succeeded to reproduce the issue. I post the issue here because it is perhaps related to your backport implementation. In that case you will maybe have an idea about where the issue may come from?
From what I see, there is no way to use a generated drawable on any of the targets.
Also, there's a replace replaceTargetDrawablesIfPresent()
that takes Components. Can you also make the replaceTargetDrawables()
public and take Drawable
objects and resource ids?
PS:
From what I know, the use case of replaceTargetDrawablesIfPresent()
is probably for something like launching custom apps(thus needing to get the app's launcher icon resource). It would also be handy to replace targets with custom Drawable objects.
If I add this library on my project, it broke my build.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.