Android Question modern gradients

Mehrzad238

Active Member
Just out of curiosity, how can we have modern gradients in b4x?
 

Attachments

  • download (1).jpeg
    20.6 KB · Views: 96

Cableguy

Expert
Licensed User
Longtime User
In B4J is "easy" since it's CSS capable... in B4A, not so...
the way I can visualise it would be with 1 or 2 canvas and 2 panels... Set the gradients for each panel, with the solid colors you want, then set a transparent to solid gradient
on the canvas and "sandwhich" them together.... by applying the panel1 background to the canvas, and then appllying the canvas to panel2... never tried it though
 
Upvote 0

Sagenut

Expert
Licensed User
Longtime User
As @teddybear suggested... But my initial image it's really orrible.
Example made in B4J.
 

Attachments

  • ModernGradient.zip
    15.7 KB · Views: 42
Upvote 0

TILogistic

Expert
Licensed User
Longtime User
Other:

If you want it softer, apply a blur. (BitmapCreatorEffects method Blur) simple Gaussian



Note: This gradient generation is based on the APIs of each platform. B4J uses CSS.
 
Last edited:
Upvote 0

Mehrzad238

Active Member
wow that looks awsome
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…