Closed jjhesk closed 8 years ago
I'm not sure what this could be. I have been using the library in my own application and I have not received this issue. Do you have any views in your application that you override onMeasure()? Maybe something like this is occurring? https://github.com/MikeOrtiz/TouchImageView/issues/47
Base on the commit linked in that repo, they added in a default setMeasuredDimension when the drawable they attempted to use was null.
Even i took out the swiperefreshlayout to nothing and it occurs on another level of onMeasure.
@mikeortiz was mentioned the check null method to void the crash which is this
if (drawable == null || drawable.getIntrinsicWidth() == 0 || drawable.getIntrinsicHeight() == 0) {
setMeasuredDimension(0, 0);
return;
}
or
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
but it doesnt seem to work in my case.
Can you give me where you are creating the SingleStackNavigationManagerFragment? Do you have a full working example of when the crashes happen so I can investigate further?
Here it is.. issue_onMeasure branch
i strongly believe that it has something to do with the weakreference because I have seen this cause even coming out when i took out the navigationfragment while it was trying to access the objects from the garbage. .. i hope that this library could support smarttablayout library because it can do much more in plenty different varieties.
i discovered the issue with the inner library.
Sorry can you elaborate on what the issue was? When you say inner library is it my library? Can you please do a pull request so I can fix it for others? If it wasn't with the library then this will help others fix the same issue in their project. If it is with the issue I would love to incorporate any work that you put into this library to ensure the best product for everyone!
I have re-opened the issue until I know for certain it is not the library code or that it is changed in the library.
Please note all development is taking place on the develop branch. I'd like to keep the master clean as the current live code so that I can manage any hot fixes from there (such as this fix you are talking about and #11 )
wait. this issue is still incur in the back button on press. When the navigationfragment popback to the previous fragment. This onMeasure() bug just pop out. @DMCApps sorry. this bug is not fixed yet. I had a setup with the swiperefresh component bind in the xml on the previous fragment but it happened to crash when it pops back.
I have noticed that in some situation when i start using navigationfragment it will trigger onMeasure too soon that caused crash from the initiation. However this bug is not constantly happening and that will occurs randomly. do you think it has anything to relate to this? I am trying to reproduce it and capture more information for this.
I captured onMeasure() illegalstate exception like so:
Currently there is an Fragment Adapter using like so: