Tip: custom views objects are not views*. This means that that Panel.GetView will never return a custom view instance.
You have two options:
1. Add a global variable with the name of the indicator. The global variable will point to the last added indicator.
2. If you check the code of this custom view you will see this important line:
This means that the tag property of the base view points to the custom view instance.
Dim loading As B4XLoadingIndicator = LayoutPanel.GetView(0).Tag
*There are a few custom views that are implemented in Java or Objective C which are actually views.