flipkart-incubator / springy-heads Goto Github PK
View Code? Open in Web Editor NEWChat heads library for android
License: Apache License 2.0
Chat heads library for android
License: Apache License 2.0
Many thanks for great effort.
I have an issue that there is a strange behavior happens when I force RTL
the closed heads stick to the right and when I click them , the header is hidden
I use this code to force RTL:
try { String languageToLoad = "ar"; // your language Locale locale = new Locale(languageToLoad); Locale.setDefault(locale); Configuration config = activity.getResources().getConfiguration(); //config.locale = locale; config.setLocale(locale); activity.getResources().updateConfiguration(config, activity.getResources().getDisplayMetrics()); activity.getWindow().getDecorView().setLayoutDirection(View.LAYOUT_DIRECTION_RTL); } catch (Exception ex){ LogUtil.e(ex); }
I want to use fragment instead of view. Thank you
Do we have the functionality for setting unread count on the chat head. Looking at the source code, it seems the functionality is not there. Am I right?
In the demo app, though you are showing unread count as 2, that is just part of image. I feel that's a misleading info!
Hi!
First off, great work!
I have a small question. I'm wondering how I can change the initial position of the first added cheathead. Right now it appears on the top left corner. I would like to change the initial position to right and add a slightly margin from the top.
This is the layoutparams when a chathead is created:
ViewGroup.LayoutParams layoutParams = chatHeadContainer.createLayoutParams(getConfig().getHeadWidth(), getConfig().getHeadHeight(), Gravity.START | Gravity.TOP, 0);
I have tried by changing the Gravity.START to END and it works but the touch events are not set to that position and therefore I can't maximize/minmize the chathead.
Hi
I've tested "run-in-service" branch
when service is running, the apk installation dialog install button is not clickable. is there any sort of flag to
fix it.
Error:(23, 13) Failed to resolve: com.flipkart.chatheads:app:0.9.6
what should I put in my build.gradle root?
Hi,
I want to add four chat heads with each chat head having different bitmap image. How to do this?
chat heads are working without issues but it is not visible outside the application. How to bring the chat heads to mobile's home page or outside the application.
Each time I'm minimizing the chat head and then maximizing it again the view of the fragment is getting recreated. is there a way to stop that?
Is this possible for ios version in future.
I don't think there's an setting for this, so can someone point me in the direction of where to change this in the code?
The documentation says that this is supposed to use using Activity Context
and cannot be use in service. Why and what are the reason for this? Is there anything we can do to run this service using another service class?
In the service, I have tried to insert the code to use an auto complete view after the layout is inflated but the autocomplete text view now can't be typed in ie. no keyboard pops out.
Is there another way of attaching the activity to the inflated layout?
Hi
"run-in-service" branch doesn't support screen orientation change.
A NullPointerException is thrown whenever the last head is removed from the view, thus causing the application to crash.
06-23 16:27:05.049 21780-21780/me.gurpreetsk.soundrecordingwithtts E/MaximizedArrangement: onSpringAtRest:
java.lang.NullPointerException: Attempt to invoke virtual method 'com.facebook.rebound.Spring com.facebook.rebound.Spring.removeListener(com.facebook.rebound.SpringListener)' on a null object reference
at com.flipkart.chatheads.arrangement.MaximizedArrangement$2.onSpringAtRest(MaximizedArrangement.java:118)
at com.facebook.rebound.Spring.advance(Spring.java:445)
at com.facebook.rebound.BaseSpringSystem.advance(BaseSpringSystem.java:129)
at com.facebook.rebound.BaseSpringSystem.loop(BaseSpringSystem.java:143)
at com.facebook.rebound.AndroidSpringLooperFactory$ChoreographerAndroidSpringLooper$1.doFrame(AndroidSpringLooperFactory.java:117)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:872)
at android.view.Choreographer.doCallbacks(Choreographer.java:686)
at android.view.Choreographer.doFrame(Choreographer.java:618)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:860)
at android.os.Handler.handleCallback(Handler.java:751)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6121)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:889)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:779)
06-23 16:27:05.052 21780-21780/me.gurpreetsk.soundrecordingwithtts E/WindowManagerContainer: updateLayout:
java.lang.IllegalArgumentException: View=com.flipkart.chatheads.container.WindowManagerContainer$MotionCaptureView{ca123f3 V.ED..... ......I. 0,0-1080,1731} not attached to window manager
at android.view.WindowManagerGlobal.findViewLocked(WindowManagerGlobal.java:473)
at android.view.WindowManagerGlobal.updateViewLayout(WindowManagerGlobal.java:368)
at android.view.WindowManagerImpl.updateViewLayout(WindowManagerImpl.java:99)
at com.flipkart.chatheads.container.WindowManagerContainer.updateLayout(WindowManagerContainer.java:214)
at com.flipkart.chatheads.container.WindowManagerContainer.onArrangementChanged(WindowManagerContainer.java:204)
at com.flipkart.chatheads.container.DefaultChatHeadManager.setArrangementImpl(DefaultChatHeadManager.java:388)
at com.flipkart.chatheads.container.DefaultChatHeadManager.onMeasure(DefaultChatHeadManager.java:184)
at com.flipkart.chatheads.container.HostFrameLayout.onLayout(HostFrameLayout.java:27)
at android.view.View.layout(View.java:17637)
at android.view.ViewGroup.layout(ViewGroup.java:5575)
at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:2346)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2068)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1254)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6338)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:874)
at android.view.Choreographer.doCallbacks(Choreographer.java:686)
at android.view.Choreographer.doFrame(Choreographer.java:621)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:860)
at android.os.Handler.handleCallback(Handler.java:751)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6121)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:889)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:779)
Is possible change the white height container?
Thanks in advance.
Hello,
I have problem because I cannot tap on views below in windowsManager layer. How we can dispatch touch event?
This library is way more like a Facebook messenger than the suggested hover library, will it work now in foreground service?
when the library is added using compile 'com.flipkart.springyheads:library:0.9.6'
android studio doesn't see the same methods on the library.
can you help me?. how to add ViewPager to Chatheads?
In android 12 after add chat head outside touch stop working maybe need to update flags for it. If anyone can help.
I've implemented the run_in_service library into my project. At the moment when I click on the springy head to maximize the arrangement, it crashes and spits out an error. The main line of the error is java.lang.ClassCastException: android.graphics.drawable.InsetDrawable cannot be cast to android.graphics.drawable.TransitionDrawable
Error: Here
Chat head service class: Here
I'm trying to make the chathead below and the the expanded view above, but the altering topPadding in MaximizedArrangement, causes the expanded view to not to be scrollable. Is this expected behavior, anything that i can do to make the scrolling work?
Hi,
I am experiencing a problem when creating webview
in chatbubble
. The problem is: after creation webview
stops updating, i.e webview
stops loading dynamic content. In my application, webview
is loading dynamic content in Activity/Fragment
perfectly.
Another interesting thing is that, when the Activity
which created chatbubble
is opened and chatbubble
is inflated
, it loads all the contents. But if you start chatbubble
from an Activity
and then close the Activity
then inflate chatbubble
it fails to load all the dynamic content.
I have searched around applied all the webview settings
still I am facing the same issue.
Any Ideas?
Hi,
I want to report a bug.
I tried the PlayStore version (Springy chat head service).
When i delete the chat heads the system freeze and i have to reboot.
Hello,
When I add new chathead in container the backpress button not working in other apps. I have to Maximised the chathead than minimise after that backpress work. What chathead is visible than keyboard does not open. Please help me out.
I am naive to using library's
Tutorial on Readme lead to error
1.Like binary xml failed on
unable-to-start-activity-componentinfo-android-view-inflateexception-binary
<com.flipkart.chatheads.ChatHeadContainer android:id="@+id/chat_head_container" android:layout_width="match_parent" android:layout_height="match_parent"/>
or
<com.flipkart.chatheads.ui.ChatHeadContainer android:id="@+id/chat_head_container" android:layout_width="match_parent" android:layout_height="match_parent"/>
https://github.com/thisisPratzz/EyeCare/tree/Springyhead
import or cloning project leads to gradle errors (a lot of them)
http://stackoverflow.com/questions/38825451/no-service-of-type-factory-available-in-projectscopeservices/38871519#38871519
hi everybody,
how can i load avatar url to CircularDrawable?
thank all
Hi @sids
Can i scroll rounded image in a horizontally, is it possible then how? can u please guide me ?
Thanks (_)
I would like to use similar functionality as a overlay layout using services, that is adding view to window manager but I am getting errors in,
@OverRide
public FragmentManager getFragmentManager() {
return TestFragment.fragmentManager;
}
Help me, Thank you
Hi,
i would like to use this library because it works very good, but i need a custom behavior.
I need the "chat head" goes in a fixed position on the toolbar when it touches the sides of the display or if i make a fast bottom drag. And it is captured if i position it in the previous fixed toolbar position.
Is it possibile to achieve this behavior with this library?
Maybe i have to implement a new Arrangment?
Thanks for your help and for your work with this library
Hi, i clone the project in android studio, when the Main Activity of the app start and launch the services, the bubble chathead automatically appears because the services class call automatically 2 methods:
the above image is my own App using the library, when i open the app automatically appears the bubble because the 2 methods from the image above are called, if i delete thats methods when i Rebuilt the project the app Crash practically telling me that i cant start the app without Necessarily "Add a new chatheads" And I do not want to open the bubble if I do not call it myself, and appears the following Log Error:
If I open the blue link, it shows me the class that present the error in the library.
Anyway, I just want to start the service without having to call the 2 methods that make the bubble appear automatically. how can I do this?
could you please consider adding an EdiText to the view. I've tried using FLAG_NOT_FOCUSABLE, but it makes no difference. The Soft Keyboard doesn't pop. Also it ruines the onKey event in MotionCapturingTouchListener.
In the attachView callback of the adapter, inflating a fragment causes all the styles applied in the fragment to be ignored.
ExampleFragment fragment = ExampleFragment.newInstance();
View view = fragment.inflate((LayoutInflater)getSystemService(LAYOUT_INFLATER_SERVICE), parent);
cachedView = view;
viewCache.put(key, view);
Even inflating directly from the layout xml this happens.
LayoutInflater inflater = (LayoutInflater) getSystemService(LAYOUT_INFLATER_SERVICE);
View view = inflater.inflate(R.layout.fragment_example, parent, false);
cachedView = view;
viewCache.put(key, view);
Any tips on why this happens or how to fix it?
Hi there! Thanks for this wonderful library. I am having slight problem while removing ChatHead. Whenever, I try to detach ChatHead by moving it to the bottom I am getting this error:
java.lang.IllegalArgumentException: View=com.flipkart.chatheads.ui.container.WindowManagerContainer$MotionCaptureView{3f1e3c5 V.ED..... ......I. 0,0-480,767} not attached to window manager
06-05 00:32:50.318 30194-30194/com.jesture.phoenix W/System.err: at android.view.WindowManagerGlobal.findViewLocked(WindowManagerGlobal.java:473)
06-05 00:32:50.318 30194-30194/com.jesture.phoenix W/System.err: at android.view.WindowManagerGlobal.updateViewLayout(WindowManagerGlobal.java:368)
06-05 00:32:50.318 30194-30194/com.jesture.phoenix W/System.err: at android.view.WindowManagerImpl.updateViewLayout(WindowManagerImpl.java:101)
06-05 00:32:50.318 30194-30194/com.jesture.phoenix W/System.err: at com.flipkart.chatheads.ui.container.WindowManagerContainer.onArrangementChanged(WindowManagerContainer.java:204)
06-05 00:32:50.318 30194-30194/com.jesture.phoenix W/System.err: at com.flipkart.chatheads.ui.container.DefaultChatHeadManager.setArrangementImpl(DefaultChatHeadManager.java:398)
06-05 00:32:50.319 30194-30194/com.jesture.phoenix W/System.err: at com.flipkart.chatheads.ui.container.DefaultChatHeadManager.onMeasure(DefaultChatHeadManager.java:186)
06-05 00:32:50.319 30194-30194/com.jesture.phoenix W/System.err: at com.flipkart.chatheads.ui.HostFrameLayout.onLayout(HostFrameLayout.java:24)
06-05 00:32:50.319 30194-30194/com.jesture.phoenix W/System.err: at android.view.View.layout(View.java:17641)
06-05 00:32:50.319 30194-30194/com.jesture.phoenix W/System.err: at android.view.ViewGroup.layout(ViewGroup.java:5575)
06-05 00:32:50.319 30194-30194/com.jesture.phoenix W/System.err: at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:2346)
06-05 00:32:50.319 30194-30194/com.jesture.phoenix W/System.err: at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2068)
06-05 00:32:50.319 30194-30194/com.jesture.phoenix W/System.err: at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1254)
06-05 00:32:50.319 30194-30194/com.jesture.phoenix W/System.err: at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6344)
06-05 00:32:50.319 30194-30194/com.jesture.phoenix W/System.err: at android.view.Choreographer$CallbackRecord.run(Choreographer.java:874)
06-05 00:32:50.319 30194-30194/com.jesture.phoenix W/System.err: at android.view.Choreographer.doCallbacks(Choreographer.java:686)
06-05 00:32:50.319 30194-30194/com.jesture.phoenix W/System.err: at android.view.Choreographer.doFrame(Choreographer.java:621)
06-05 00:32:50.319 30194-30194/com.jesture.phoenix W/System.err: at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:860)
06-05 00:32:50.320 30194-30194/com.jesture.phoenix W/System.err: at android.os.Handler.handleCallback(Handler.java:751)
06-05 00:32:50.320 30194-30194/com.jesture.phoenix W/System.err: at android.os.Handler.dispatchMessage(Handler.java:95)
06-05 00:32:50.320 30194-30194/com.jesture.phoenix W/System.err: at android.os.Looper.loop(Looper.java:154)
06-05 00:32:50.320 30194-30194/com.jesture.phoenix W/System.err: at android.app.ActivityThread.main(ActivityThread.java:6128)
06-05 00:32:50.320 30194-30194/com.jesture.phoenix W/System.err: at java.lang.reflect.Method.invoke(Native Method)
06-05 00:32:50.320 30194-30194/com.jesture.phoenix W/System.err: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:889)
06-05 00:32:50.320 30194-30194/com.jesture.phoenix W/System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:779)
Please help me out! Thanks!
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.