Android Question Brightness Activity

BillMeyer

Well-Known Member
Licensed User
Longtime User
Try This (Search for Screen Brightness)

B4X:
Sub Process_Globals
    Dim phone1 As Phone
End Sub

Sub Globals
    Dim sb As SeekBar
End Sub

Sub Activity_Create(FirstTime As Boolean)
    sb.Initialize("sb")
    sb.Max = 100
    sb.Value = 50
    Activity.AddView(sb, 10dip, 10dip, 90%x, 30dip)
End Sub
Sub sb_ValueChanged (Value As Int, UserChanged As Boolean)
    phone1.SetScreenBrightness(Max(Value, 5) / 100)
End Sub

Enjoy !!
 
Upvote 0

vercettyDev

Active Member
Licensed User
Longtime User
But to pass the touches from my activity to the android, what would it be?

Because the application I showed, it creates an overlay with an opacity, and I can ram it on my android normally.
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
Return false from the touch event if you do not want to consume the event
 
Upvote 0
Top