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
SearchView not on top of toolbar in one activity. Fine in the other #153
Comments
Can you elaborate on what you mean by "child activity"? How are the styles different between the two activities? My guess is that in one of them you've set it to fit the system window, as the offset looks to be the same as the status bar height. There's a way to override the offset when it draws if you'd like to look into that. I won't be able to look into it myself until after my internship. |
child activity meaning the activity that is working is starting it. the styles are the same and not using any systemfitwindows. I tried this 'searchView?.menuY = -resources.getStatusBarHeight()' right after the bind searchview but didnt do anything. Am I calling it correctly? |
sorry i realize now you say in comments to call in the open listener. I will see if that works |
That fixed it. Thank you. |
Great! I recommend you make it relative, as in using "-=" rather than "=". This probably works now because menuY is 0, but in the event your toolbar is not at the top, you'll have a problem again. |
I have 2 activities using the same theme but the searchview is offset on the child activity.
In my main activity it works fine. But in my child activity that is launched from my main its offset.
I do have a tab layout in the parent activity.
Any ideas what to look for to fix this?
The text was updated successfully, but these errors were encountered: