You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description:
I want to display the app logo in the MaterialToolbar only on the start tab. To achieve this I wrote a destinationChangedListener for the navController and used the setLogo method to set the logo null on specified tabs.
With 1.5 every works like a charm, with 1.6 I will receive an NPE.
2022-05-17 10:16:25.150 10665-10665/de.rnd.news.qa E/AndroidRuntime: FATAL EXCEPTION: main
Process: ***, PID: 10665
java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.Object.equals(java.lang.Object)' on a null object reference
at com.google.android.material.internal.ToolbarUtils.getImageView(ToolbarUtils.java:98)
at com.google.android.material.internal.ToolbarUtils.getLogoImageView(ToolbarUtils.java:88)
at com.google.android.material.appbar.MaterialToolbar.updateLogoImageView(MaterialToolbar.java:208)
at com.google.android.material.appbar.MaterialToolbar.onLayout(MaterialToolbar.java:135)
at android.view.View.layout(View.java:23144)
at android.view.ViewGroup.layout(ViewGroup.java:6412)
at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1829)
at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1673)
at android.widget.LinearLayout.onLayout(LinearLayout.java:1582)
....
Material Library version: 1.6
The text was updated successfully, but these errors were encountered:
Description:
I want to display the app logo in the MaterialToolbar only on the start tab. To achieve this I wrote a destinationChangedListener for the navController and used the
setLogo
method to set the logo null on specified tabs.With 1.5 every works like a charm, with 1.6 I will receive an NPE.
Source code:
Error message:
Material Library version: 1.6
The text was updated successfully, but these errors were encountered: