ImageButton: You must not call setTag() on a view Glide is targeting
See original GitHub issueI noticed some images are not loaded when im using gliex.forms with my forms project. After enabling debug log following exception is there:
Unexpected exception in glidex: Java.Lang.IllegalArgumentException: You must not call setTag() on a view Glide is targeting 11-25 18:35:38.650 W/glidex (13060): at Java.Interop.JniEnvironment+InstanceMethods.CallObjectMethod (Java.Interop.JniObjectReference instance, Java.Interop.JniMethodInfo method, Java.Interop.JniArgumentValue* args) [0x00069] in <0ad2222fd7074badb5de547b1521aab0>:0 11-25 18:35:38.650 W/glidex (13060): at Java.Interop.JniPeerMembers+JniInstanceMethods.InvokeVirtualObjectMethod (System.String encodedMember, Java.Interop.IJavaPeerable self, Java.Interop.JniArgumentValue* parameters) [0x0002a] in <0ad2222fd7074badb5de547b1521aab0>:0 11-25 18:35:38.650 W/glidex (13060): at Android.Glide.RequestBuilder.Into (Android.Widget.ImageView view) [0x00031] in <11ae0431714345688234bc37c9dafe24>:0 11-25 18:35:38.650 W/glidex (13060): at Android.Glide.GlideExtensions+<LoadViaGlide>d__0.MoveNext () [0x00303] in <427dfe7fb53c4ee294c990744f70970c>:0 11-25 18:35:38.650 W/glidex (13060): — End of managed Java.Lang.IllegalArgumentException stack trace — 11-25 18:35:38.650 W/glidex (13060): java.lang.IllegalArgumentException: You must not call setTag() on a view Glide is targeting 11-25 18:35:38.650 W/glidex (13060): at com.bumptech.glide.request.target.ViewTarget.getRequest(ViewTarget.java:265) 11-25 18:35:38.650 W/glidex (13060): at com.bumptech.glide.RequestBuilder.into(RequestBuilder.java:603) 11-25 18:35:38.650 W/glidex (13060): at com.bumptech.glide.RequestBuilder.into(RequestBuilder.java:682) 11-25 18:35:38.650 W/glidex (13060): at md51558244f76c53b6aeda52c8a337f2c37.ListViewAdapter.n_getView(Native Method) 11-25 18:35:38.650 W/glidex (13060): at md51558244f76c53b6aeda52c8a337f2c37.ListViewAdapter.getView(ListViewAdapter.java:100) 11-25 18:35:38.650 W/glidex (13060): at android.widget.HeaderViewListAdapter.getView(HeaderViewListAdapter.java:232) 11-25 18:35:38.650 W/glidex (13060): at android.widget.AbsListView.obtainView(AbsListView.java:3189) 11-25 18:35:38.650 W/glidex (13060): at android.widget.ListView.makeAndAddView(ListView.java:2197) 11-25 18:35:38.650 W/glidex (13060): at android.widget.ListView.fillDown(ListView.java:824) 11-25 18:35:38.650 W/glidex (13060): at android.widget.ListView.fillFromTop(ListView.java:885) 11-25 18:35:38.650 W/glidex (13060): at android.widget.ListView.layoutChildren(ListView.java:1952) 11-25 18:35:38.650 W/glidex (13060): at android.widget.AbsListView.onLayout(AbsListView.java:2961) 11-25 18:35:38.650 W/glidex (13060): at android.view.View.layout(View.java:20836) 11-25 18:35:38.650 W/glidex (13060): at android.view.ViewGroup.layout(ViewGroup.java:6401) 11-25 18:35:38.650 W/glidex (13060): at android.support.v4.widget.SwipeRefreshLayout.onLayout(SwipeRefreshLayout.java:611) 11-25 18:35:38.650 W/glidex (13060): at android.view.View.layout(View.java:20836) 11-25 18:35:38.650 W/glidex (13060): at android.view.ViewGroup.layout(ViewGroup.java:6401) 11-25 18:35:38.650 W/glidex (13060): at md51558244f76c53b6aeda52c8a337f2c37.ListViewRenderer.n_onLayout(Native Method) 11-25 18:35:38.650 W/glidex (13060): at md51558244f76c53b6aeda52c8a337f2c37.ListViewRenderer.onLayout(ListViewRenderer.java:65) 11-25 18:35:38.650 W/glidex (13060): at android.view.View.layout(View.java:20836) 11-25 18:35:38.650 W/glidex (13060): at android.view.ViewGroup.layout(ViewGroup.java:6401) 11-25 18:35:38.650 W/glidex (13060): at com.xamarin.forms.platform.android.FormsViewGroup.measureAndLayout(FormsViewGroup.java:37) 11-25 18:35:38.650 W/glidex (13060): at md51558244f76c53b6aeda52c8a337f2c37.VisualElementRenderer_1.n_onLayout(Native Method) 11-25 18:35:38.650 W/glidex (13060): at md51558244f76c53b6aeda52c8a337f2c37.VisualElementRenderer_1.onLayout(VisualElementRenderer_1.java:81) 11-25 18:35:38.650 W/glidex (13060): at android.view.View.layout(View.java:20836) 11-25 18:35:38.650 W/glidex (13060): at android.view.ViewGroup.layout(ViewGroup.java:6401) 11-25 18:35:38.650 W/glidex (13060): at com.xamarin.forms.platform.android.FormsViewGroup.measureAndLayout(FormsViewGroup.java:37) 11-25 18:35:38.650 W/glidex (13060): at md51558244f76c53b6aeda52c8a337f2c37.VisualElementRenderer_1.n_onLayout(Native Method) 11-25 18:35:38.650 W/glidex (13060): at md51558244f76c53b6aeda52c8a337f2c37.VisualElementRenderer_1.onLayout(VisualElementRenderer_1.java:81) 11-25 18:35:38.650 W/glidex (13060): at android.view.View.layout(View.java:20836) 11-25 18:35:38.650 W/glidex (13060): at android.view.ViewGroup.layout(ViewGroup.java:6401) 11-25 18:35:38.650 W/glidex (13060): at com.xamarin.forms.platform.android.FormsViewGroup.measureAndLayout(FormsViewGroup.java:37) 11-25 18:35:38.650 W/glidex (13060): at md58432a647068b097f9637064b8985a5e0.NavigationPageRenderer.n_onLayout(Native Method) 11-25 18:35:38.650 W/glidex (13060): at md58432a647068b097f9637064b8985a5e0.NavigationPageRenderer.onLayout(NavigationPageRenderer.java:65) 11-25 18:35:38.650 W/glidex (13060): at android.view.View.layout(View.java:20836) 11-25 18:35:38.650 W/glidex (13060): at android.view.ViewGroup.layout(ViewGroup.java:6401) 11-25 18:35:38.650 W/glidex (13060): at com.xamarin.forms.platform.android.FormsViewGroup.measureAndLayout(FormsViewGroup.java:37) 11-25 18:35:38.650 W/glidex (13060): at md58432a647068b097f9637064b8985a5e0.MasterDetailContainer.n_onLayout(Native Method) 11-25 18:35:38.650 W/glidex (13060): at md58432a647068b097f9637064b8985a5e0.MasterDetailContainer.onLayout(MasterDetailContainer.java:53) 11-25 18:35:38.650 W/glidex (13060): at android.view.View.layout(View.java:20836) 11-25 18:35:38.650 W/glidex (13060): at android.view.ViewGroup.layout(ViewGroup.java:6401) 11-25 18:35:38.650 W/glidex (13060): at android.support.v4.widget.DrawerLayout.onLayout(DrawerLayout.java:1172)
Issue Analytics
- State:
- Created 5 years ago
- Comments:17 (6 by maintainers)
https://github.com/xamarin/Xamarin.Forms/pull/4542
Ok, yeah I can repro with the
BackgroundColor
. I will merge #24 when it’s green.@toomasz would it be possible for you to contribute some layouts in the
glidex.forms.samples
project? You can makeup whatever you like. I generally go through all of those before I submit an update to NuGet.