B4A Library MaatisaLibs - Collection of Themes & Tools

Hi to all.
First of all, My English is bad so i am sorry.

I am using B4A for long time, and I am thankful to B4X community and Erel, Because it changes my programming life.
This is my first semi-pro;) library, So i hope it will be useful for you.

This lib contains 4 Classes and one manifest attribute for changing theme in version 1.00.
1- MaatisaScaleFont v1.00 Class: Balanced FontSize in any Devices.
How to work:​
MaatisaScaleFont Class:
Sub Globals
  Dim msp1 As MSP
End Sub

Sub Activity_Create(FirstTime As Boolean)
  msp1.Initialize(Activity.Width)  'Initialize lib object with width of your Activity
  Dim lbl As Label
  lbl.Initialize("")
  lbl.Text = $"Maatisa ScaleFont [sp] Library${CRLF}Written by Mohsen Torabi"$
  lbl.Gravity = Gravity.CENTER_HORIZONTAL + Gravity.CENTER_VERTICAL
  lbl.SingleLine = False
  lbl.Textsize = msp1.sp(15)    'Set best font size to Label
  Activity.AddView(lbl , 0 , 0 , 100%x , 10%y)
  Log(msp1.About)
End Sub

2- MaatisaLinkSupport v1.00 Class: Labels with Link Support.
How to work:​
MaatisaLinkSupport Class:
Dim lbl1 as Label
Dim mls1 As MaatisaLinkSupport
mls1.LinkSupport(lbl1)

3- MaatisaCustomToast v1.00 Class: A custom toast message with custom FontFamily, FontColor, FontSize, Shape Color and Shape's border radius.
How to work:​
MaatisaCustomToast Class:
Dim mct1 As MaatisaCustomToast
mct1.Initialize("Welcome to Maatisa products", Typeface.DEFAULT_BOLD, Colors.Black, 16, Colors.Yellow, 20dip)
mct1.Show("" , True)
In "Initialize" method you can set your default msg, Or change it for once time in "Show" method, That means if msg in "Show" method be empty it uses default msg.

4- MaatisaPersianNumber v1.00 Class: Converts any digits to Persian digits. (It is useful to Middle-East users, Persian, Arabic and...)
How to work:​
MaatisaPersianNumber Class:
Dim mpn1 As MaatisaPersianNumber
Activity.Title = mpn1.PerNumber("1234567890")

Source Codes and Documents are available in zip file to download.

5- Available themes in Library: [Contains 20 Themes]
Themes: [use with Macro]:
Dark [Default dark theme]
Light [Default light theme]
Blue [Dark parent]
Orange [Light parent]
Pink [Light parent]
Purple [Light parent]
Cyan [Light parent]
Brown [Dark parent]
Yellow [Dark parent]
Darkness [Dark parent]
Maatisa1 [Dark parent]
Maatisa2 [Dark parent]
Maatisa3 [Dark parent]
Maatisa4 [Dark parent]
Maatisa5 [Dark parent]
Maatisa6 [Dark parent]
Maatisa7 [Light parent]
Maatisa8 [Dark parent]
Maatisa9 [Dark parent]
Maatisa10 [Dark parent]

How it Works: [use this line in manifest]:
Manifest Editor:
CreateResourceFromFile(Macro, MaatisaLibs.Blue)

Image of Theme colors:
MaatisaLibs Theme Colors 1000.jpg


Some screenshots:
Maatisa10.png
Maatisa8.png
Maatisa4.png
Maatisa3.png
Maatisa9.png
Yellow.png


MaatisaLibs v1.00

I hope you Enjoy!
 

Attachments

  • MaatisaLibs_1.zip
    20.5 KB · Views: 393
  • MaatisaLibs_Sample.zip
    52.5 KB · Views: 357
  • MaatisaLibs Documents.txt
    2.5 KB · Views: 375

Ibrahim Saleh

Member
Licensed User
Longtime User
Thank you so much for this lib. The Font Size library is a much-needed addition to the B4A Libs.
 
Top