B4A Library External Display

A library for external display with b4a sample
If you don't have a display (like me ) , you might be able to simulate a secondary display in Settings >> Developer options .


photo_2017-11-25_10-27-40.jpg


If you use this library please donate :)

externaldisplay

Author: SMM
Version: 0.04


  • Display
    • Functions:
      • IsInitialized As Boolean
    • Properties:
      • AppVsyncOffsetNanos As Long [read only]
      • Flags As Int [read only]
      • Metrics As DisplayMetrics [read only]
      • Mode As DisplayMode [read only]
      • Name As String [read only]
      • Rotation As Int [read only]
  • DisplayMetrics
    • Fields:
      • DENSITY_280 As Int
      • DENSITY_360 As Int
      • DENSITY_400 As Int
      • DENSITY_420 As Int
      • DENSITY_560 As Int
      • DENSITY_DEFAULT As Int
      • DENSITY_HIGH As Int
      • DENSITY_LOW As Int
      • DENSITY_MEDIUM As Int
      • DENSITY_TV As Int
      • DENSITY_XHIGH As Int
      • DENSITY_XXHIGH As Int
      • DENSITY_XXXHIGH As Int
    • Functions:
      • density As Float
      • densityDpi As Int
      • equals (o As Object) As Boolean
      • hashCode As Int
      • heightPixels As Int
      • Initialize
      • IsInitialized As Boolean
      • scaledDensity As Float
      • setToDefaults
      • toString As String
      • widthPixels As Int
      • xdpi As Float
      • ydpi As Float
    • Properties:
      • To As DisplayMetrics [write only]
  • DisplayMode
    • Functions:
      • hashCode As Int
      • IsInitialized As Boolean
      • toString As String
    • Properties:
      • ModeId As Int [read only]
      • PhysicalHeight As Int [read only]
      • PhysicalWidth As Int [read only]
      • RefreshRate As Float [read only]
  • ExternalDisplaySMM
    • Events:
      • _displayadded (displayId As Int)
      • _displaychanged (displayId As Int)
      • _displayremoved (displayId As Int)
    • Fields:
      • DISPLAY_CATEGORY_PRESENTATION As String
      • VIRTUAL_DISPLAY_FLAG_AUTO_MIRROR As Int
      • VIRTUAL_DISPLAY_FLAG_OWN_CONTENT_ONLY As Int
      • VIRTUAL_DISPLAY_FLAG_PRESENTATION As Int
    • Functions:
      • addViewToDisplay (display As Display, params As WindowManagerLayoutParams, view As android.view.View)
      • GetDisplay (displayId As Int) As Display
      • Initialize (EventName As String)
      • registerListener (EventName As String)
      • unregisterDisplayListener
    • Properties:
      • Displays As Display() [read only]
  • WindowManagerLayoutParams
    • Fields:
      • FILL_PARENT As Int
      • MATCH_PARENT As Int
      • WRAP_CONTENT As Int
    • Functions:
      • Initialize
      • IsInitialized As Boolean
    • Properties:
      • height As Int [write only]
      • width As Int [write only]
      • X As Int [write only]
      • Y As Int [write only]
 

Attachments

  • externaldisplay (4).zip
    9.1 KB · Views: 295
  • displayb4a.zip
    2.8 KB · Views: 283

kolpolok

Member
Licensed User
Longtime User
Hi. Really liked the lib. Can I get a bit more documentation, specially on ExternalDisplaySMM. Great job
 
I saw o the #1 post, the description of Display, the "Functions" only has : IsInitialized ,buy no 'Initialize'. I tried:
Dim aa as Display
Dim s as string
s=aa.Name

But the compile said aa is not initialized. Anything I missed?
 

somed3v3loper

Well-Known Member
Licensed User
Longtime User
I saw o the #1 post, the description of Display, the "Functions" only has : IsInitialized ,buy no 'Initialize'. I tried:
Dim aa as Display
Dim s as string
s=aa.Name

But the compile said aa is not initialized. Anything I missed?
Display is a service , in the sample I just start it.
 
Top