Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some issue in View #95

Open
pritishqualwebs opened this issue May 15, 2017 · 7 comments
Open

Some issue in View #95

pritishqualwebs opened this issue May 15, 2017 · 7 comments

Comments

@pritishqualwebs
Copy link

I am using gradle version
compile 'devlight.io:navigationtabbar:1.2.5'

My xml file is

<devlight.io.library.ntb.NavigationTabBar android:id="@+id/ntb" android:layout_width="match_parent" android:layout_alignParentBottom="true" android:layout_height="?actionBarSize"/>

and getting this error

FATAL EXCEPTION: main Process: PID: 18929 java.lang.IllegalArgumentException: width and height must be > 0 at android.graphics.Bitmap.createBitmap(Bitmap.java:836) at android.graphics.Bitmap.createBitmap(Bitmap.java:815) at android.graphics.Bitmap.createBitmap(Bitmap.java:782) at devlight.io.library.ntb.NavigationTabBar.onDraw(NavigationTabBar.java:1077) at android.view.View.draw(View.java:15249) at android.view.View.buildDrawingCacheImpl(View.java:14495) at android.view.View.buildDrawingCache(View.java:14357) at android.view.View.updateDisplayListIfDirty(View.java:14166) at android.view.View.getDisplayList(View.java:14207) at android.view.View.draw(View.java:14977) at android.view.ViewGroup.drawChild(ViewGroup.java:3407) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3200) at android.view.View.updateDisplayListIfDirty(View.java:14180) at android.view.View.getDisplayList(View.java:14207) at android.view.View.draw(View.java:14977) at android.view.ViewGroup.drawChild(ViewGroup.java:3407) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3200) at android.view.View.updateDisplayListIfDirty(View.java:14180) at android.view.View.getDisplayList(View.java:14207) at android.view.View.draw(View.java:14977) at android.view.ViewGroup.drawChild(ViewGroup.java:3407) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3200) at android.view.View.updateDisplayListIfDirty(View.java:14180) at android.view.View.getDisplayList(View.java:14207) at android.view.View.draw(View.java:14977) at android.view.ViewGroup.drawChild(ViewGroup.java:3407) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3200) at android.view.View.updateDisplayListIfDirty(View.java:14180) at android.view.View.getDisplayList(View.java:14207) at android.view.View.draw(View.java:14977) at android.view.ViewGroup.drawChild(ViewGroup.java:3407) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3200) at android.view.View.updateDisplayListIfDirty(View.java:14180) at android.view.View.getDisplayList(View.java:14207) at android.view.View.draw(View.java:14977) at android.view.ViewGroup.drawChild(ViewGroup.java:3407) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3200) at android.view.View.draw(View.java:15252) at android.widget.FrameLayout.draw(FrameLayout.java:598) at com.android.internal.policy.impl.PhoneWindow$DecorView.draw(PhoneWindow.java:2650) at android.view.View.updateDisplayListIfDirty(View.java:14185) at android.view.View.getDisplayList(View.java:14207) at android.view.ThreadedRenderer.updateViewTreeDisplayList(ThreadedRenderer.java:273) at android.view.ThreadedRenderer.updateRootDisplayList(ThreadedRenderer.java:279) at android.view.ThreadedRenderer.draw(ThreadedRenderer.java:318) at android.view.ViewRootImpl.draw(ViewRootImpl.java:2560) at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:2382) at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2012) at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1084) at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:5990) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:767) at android.view.Choreographer.doCallbacks(Choreographer.java:580) at android.view.Choreographer.doFrame(Choreographer.java:550) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:753) at android.os.Handler.handleCallback(Handler.java:739) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:135) at android.app.ActivityThread.main(ActivityThread.java:5343) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:905) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:700)

@xaksis
Copy link

xaksis commented Jul 10, 2017

were you able to find any solution to this? I'm seeing the same issue

@urieluvd
Copy link

Same... I have tried with drawables in svg and png in drawable-any, each dpi folder and is still crashing in Android 6.0

@rencsaridogan
Copy link

This seems to be a serious issue. I couldn't find any solution for the matter as well.

@urieluvd
Copy link

I have solved mine...
I was seting the adapter after a permission check, remember that in API > 23 these are made on runtime, and I was not launching the Permission Request properly, just stepping over next lines of code and, so... this was blocking my view from rendering the tabmenu layout the right way. I just moved the Permission Check after my NavigationTabBar initialization and now it works fine.

So if you have a similar case, just check that you don have Post Lollipop Runtime Permission Request before your NavigationTabBar initialization, nor other thing that could block the UI Thread.

@rencsaridogan
Copy link

@LordUriel thanks for the detailed feedback. However, I've tried it without any other code, just initialization through XML. I am trying this on a Google Pixel with Android Oreo Beta, so that might cause the issue. The NavigationBar is located within a ConstraintLayout with end, start, bottom alignments to the parent.

So, there might be something further to investigate here.

@smoi
Copy link

smoi commented Sep 14, 2017

same error here. Does someone knows how to fix it?

@kvaruna
Copy link

kvaruna commented Oct 17, 2018

nd I was not launching the Permission Request properly, just stepping o

Am facing the same issue and i have not initiated any permission requests for my app but it is asking for permission anyways. Anything you want to share on this? @LordUriel

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants