Android Question Call Activity?


Licensed User
Longtime User
Can i call same activity more than one time?
same like in visual studio / VB, we can call form more than one time with declare the form to new form object. may i do that in B4A?

I'm making an ecommerce application, when i click product image it will start activity detail of the product. inside detail of the product i have insert other products with horizontalscrollbar, when i click product in horizontalscrollbar it's will start same activity( detail of the product ). can i do that?
because if i try application like aliexpress/alibaba, they application can do like that.

StartActivity (List Product) -> Click (Product) -> Detail of the Product ( Inside Detail Have List Products ) -> Click (List Products) -> Detail of the Product (Again).

When we press back it will back to previous detail of the product.


Licensed User
Longtime User
Upvote 0


Well-Known Member
Licensed User
Longtime User
you can remove the layout (at android views) (in .net controls/ui)
and then you can load other layout (designer file)
its also possible to load more than one layout in a single activity form.
something like
LoadLayout("Product Overview")
LoadLayout("Product Detail")
LoadLayout("Product Costs")
only one activity can be active at the same time.
Upvote 0


Licensed User
Longtime User
thank you, i already got solution.

i create 2 activity same code.
if i click product in first activity (detail of the product), it will "StartActivity" to second activity.
on second activity i change the code when i click product again in second activity it's just recreate activity.

i'm use this code to recreate activity
Sub RecreateActivity
    Log("RecreateActivity called")
    Dim JavaObject1 As JavaObject
    JavaObject1.RunMethod("NativeRecreateActivity", Null)
End Sub

public void NativeRecreateActivity(){
#End If

thank you
Upvote 0