Android Question Copy from view

devmobile

Active Member
Licensed User
I have view that i need copy from it
I use
Dim im as ImageView
im = imgicon

But when i change im variable,it apply on main imageview
 

Emme Developer

Well-Known Member
Licensed User
Longtime User
Yes i know
How do i can copy from view without reference?
You cannot make a copy of the view itself. You can make another view with same layout and setting.

B4X:
Dim im as ImageView
'.....

Dim im2 as ImageView
dim p as panel = im.parent
p.addview(im2,im.left,im.top,im.width,im.height)
im2.gravity = im.gravity
im2.bitmap = im.bitmap
 
Upvote 0

devmobile

Active Member
Licensed User
Yes it is good solution
Thanks
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…