Android Question rv- set panel alpha by code

chrjak

Active Member
Licensed User
Longtime User
hi,

how to set the alpha value of a panel in a widget later manually by code?

thanks for answers
 

chrjak

Active Member
Licensed User
Longtime User
thanks for the answer

but the problem is i can only access the panel with rv options..
 
Upvote 0

chrjak

Active Member
Licensed User
Longtime User
sorry,
I don't understand... How to create panels in an imageview?
 
Upvote 0

chrjak

Active Member
Licensed User
Longtime User
Sorry. Still don't understand completely

How to set Imageview's Alpha?
 
Upvote 0

bitstra

Member
Licensed User
Longtime User
This works fine here:

pnlBlack is used to dimm effect over Main Panel...

B4X:
    pnlBlack1.Initialize("pnlBlack1")
    pnlBlack1.Color=Colors.ARGB(0,0,0,0)
    'Activity.AddView(pnlBlack1,0,Panel1.Top+Panel1.height+1dip,100%x,100%y-Panel1.Top+Panel1.height)
    pnlMain.AddView(pnlBlack1,0,Panel1.Top+Panel1.height+1dip,100%x,100%y-Panel1.Top+Panel1.height)
    pnlBlack1.BringToFront

B4X:
Sub fadeTimer_Tick()


 
    If fd>dimValue Then
        fd=dimValue
        pnlBlack1.Color=Colors.ARGB(fd,0,0,0)
        fadeTimer.Enabled=False
        'pnlBlack2.Color=Colors.ARGB(fd,0,0,0)
        fd=0
    Else
 
        fd=fd+2
        If fd>dimValue Then fd=dimValue
        pnlBlack1.Color=Colors.ARGB(fd,0,0,0)
        'pnlBlack2.Color=Colors.ARGB(fd,0,0,0)

    End If


End sub

FORGET THIS - I didn't see that you asked for a widget (remote view)!
 
Last edited:
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…