how to remove layout at runtime?

Orlando

Member
Licensed User
Longtime User
Hi, I don't know if B4A support themes, so, i've created two layouts (white/day and night/black).

if i use activity.loadlayout("white") how can i remove it when i want to use the black layout?

i've tried to load the black layout but when i start another activity i can see the white layout in the background and animations are slow. (DELL STREAK 7)
 

Orlando

Member
Licensed User
Longtime User
Thanks i found this usefull thread:

Code: android:targetSdkVersion=14


Code:
SetApplicationAttribute(android:theme,"@android:style/Theme.Holo"

So, how can i change the theme at runtime? from Theme.Holo to Theme.Holo.Light?
 
Upvote 0

customnames

Member
Licensed User
Longtime User
Can't change back

while this works the first time, you can't go back to
the original layout.
:sign0163:
how can one turn off an individual screen without it appearing as a ghost underlay
 
Last edited:
Upvote 0

Orlando

Member
Licensed User
Longtime User
Hi, thanks for your help.

So, how can i modify this code to remove al views of all opened activities?

B4X:
Sub RemoveViews
 Dim i AsIntFor i = Activity.NumberOfViews - 1 To 0 Step -1
  Activity.RemoveViewAt(i)
 NextEnd Sub
 
Last edited:
Upvote 0
Top