Android Tutorial Beginning B4A App Development - Built In UI Controls

Hi gang

B4A Github Repo

For anyone beginning with b4a, they would want to know what UI components are available that come built in with b4a and can be used right out of the box?

So Iv'e compiled this based on the latest version of b4a for anyone to be up to speed. Hope its helpful.

Rule: Designer = Yes means the control can be dropped on a layout in the Abstract Designer (configurable properties in the Designer). Designer = No means code-only (Initialize + AddView).

Core views (Core library)
ControlBased OnCategoryDesigner
Buttonandroid.widget.ButtonActionsYes
Labelandroid.widget.TextViewTextYes
EditTextandroid.widget.EditTextFormsYes
AutoCompleteEditTextandroid.widget.AutoCompleteTextViewFormsYes
ImageViewandroid.widget.ImageViewMediaYes
Panelandroid.view.ViewGroup (layout container, base for custom views)ContainmentYes
CheckBoxandroid.widget.CheckBoxSelectionYes
RadioButtonandroid.widget.RadioButtonSelectionYes
ToggleButtonandroid.widget.ToggleButtonSelectionYes
ListViewandroid.widget.ListViewContainmentYes
Spinnerandroid.widget.SpinnerSelectionYes
ScrollViewandroid.widget.ScrollViewContainmentYes
HorizontalScrollViewandroid.widget.HorizontalScrollViewContainmentYes
SeekBarandroid.widget.SeekBarSelectionYes
ProgressBarandroid.widget.ProgressBarFeedbackYes
WebViewandroid.webkit.WebViewContainmentYes
TabHostandroid.widget.TabHostNavigationYes

Custom views (ViewsEx, TabStripViewPager, ExoPlayer, xCustomListView)
ControlBased OnCategoryDesigner
SwitchViewsEx · android.widget.SwitchSelectionYes
RatingBarViewsEx · android.widget.RatingBarSelectionYes
FloatLabeledEditTextViewsEx · FloatLabeledEditText third-party view over a native EditTextFormsYes
TabStripTabStripViewPager · androidx.viewpager.widget.ViewPager + sliding tab stripNavigationYes
VideoViewAudio · android.widget.VideoView (+ MediaController)MediaNo (code)
AdViewFirebaseAdMob · com.google.android.gms.ads.AdView banner (NativeExpressAdView sibling; InterstitialAd / RewardedVideoAd are full-screen, not layout controls)CommunicationNo (code)
SimpleExoPlayerViewExoPlayer · androidx.media3.ui.PlayerView (SimpleExoPlayer is the non-visual controller)MediaYes
CustomListViewxCustomListView · B4A class over ScrollView / HorizontalScrollView with item panelsContainmentYes
GameViewGameView · custom canvas-drawn View (Bitmap + Canvas + Paint loop)Game / CanvasNo (code)
TouchPanelViewsEx · code-created touch-intercept PanelContainmentNo (code)

B4X custom views (XUI Views + satellites)
Added via Designer → Add View → CustomView. All render into a base Panel (B4XView); canvas-drawn ones paint via B4XCanvas / BitmapCreator.
ControlBased OnCategoryDesigner
AnimatedCounterXUI Views · B4XCanvas frame animation over labels (digit ticker)FeedbackYes
AnotherProgressBarXUI Views · BitmapCreator + B4XCanvas bar on an ImageView containerFeedbackYes
B4XBreadCrumbXUI Views · B4XCanvas-drawn crumb path on a Panel with touch handlingNavigationYes
B4XComboBoxXUI Views · native Spinner + action buttonSelectionYes
B4XFloatTextFieldXUI Views · native EditText + canvas-drawn floating hint, clear/accept/reveal buttonsFormsYes
B4XImageViewXUI Views · ImageView + bitmap (resize modes, round, corners)MediaYes
B4XLoadingIndicatorXUI Views · B4XCanvas-drawn animated indicator (7 styles)FeedbackYes
B4XPlusMinusXUI Views · label stepper on a Panel (orientation, cyclic, rapid change)SelectionYes
B4XRadioButtonXUI Views · BitmapCreator-drawn glyph on an ImageView containerSelectionYes
B4XSeekBarXUI Views · B4XCanvas-drawn track + touch Panel (min/max/interval)SelectionYes
B4XSwitchXUI Views · BitmapCreator-drawn track/thumb on an ImageView containerSelectionYes
RoundSliderXUI Views · B4XCanvas-drawn circular track on a PanelSelectionYes
ScrollingLabelXUI Views · B4XCanvas-drawn auto-scrolling textTextYes
SwiftButtonXUI Views · B4XCanvas-drawn 3D button (primary/secondary/disabled, side height)ActionsYes
MadeWithLoveXUI Views · static Label badgeTextYes
B4XTableB4XTable · CustomListView rows + header Panels over a SQLite queryContainmentYes
BBCodeViewBCTextEngine · BCTextEngine + BitmapCreator rich-text rendering on a ScrollViewTextYes
BBLabelBCTextEngine · BCTextEngine + BitmapCreator rich-text rendering on a PanelTextYes
B4XGifViewB4XGifView · FLAnimatedImageView animated drawable on a Panel (ImageView fallback, SetGif / SetGif2)MediaYes
B4XTurtleB4XTurtle · BitmapCreator canvas layers composited into an ImageViewGame / CanvasYes
ScoreLabelX2 · game HUD Labels on a PanelGame / CanvasYes

B4X cross-platform types (helpers and foundation)
Non-view B4X* types from the same libraries — code-only, shared across B4A / B4i / B4J. (View-type B4X* controls live in the tables above.)
TypeBased OnCategoryDesigner
B4XViewXUI · universal wrapper over the native ViewFrameworkNo (code)
B4XCanvasXUI · android.graphics.Canvas via the Core canvas implementation (see Foundation below)DrawingNo (code)
B4XPath / B4XRect / B4XFont / B4XBitmapXUI · companion types of B4XView (Path / Rect / Typeface / Bitmap)DrawingNo (code)
B4XSetB4XCollections · ordered set (Add / Remove / Contains)DataNo (code)
B4XOrderedMapB4XCollections · insertion-ordered key-to-value mapDataNo (code)
B4XCollectionsB4XCollections · factory (CreateSet / CreateOrderedMap / CreateBitSet)DataNo (code)
B4XComparatorSortB4XCollections · quicksort with custom comparatorDataNo (code)
B4XCacheB4XCollections · size-capped cache (Get / Put / MaxSize)DataNo (code)
B4XBytesBuilderB4XCollections · growable byte array (Append / ChangeLength)DataNo (code)
B4XBitSetB4XCollections · bit array (Set / Get / Size)DataNo (code)
CopyOnWriteList / CopyOnWriteMapB4XCollections · thread-safe list / mapDataNo (code)
B4XFormatterB4XFormatter · number/date format definitions (drives B4XPlusMinus)FormatNo (code)
B4XSerializatorRandomAccessFile · cross-platform object serializerDataNo (code)
B4XCipherB4XEncryption · symmetric cipherSecurityNo (code)
Not shipped types: B4XMainPage (implemented by the app, not a library), B4XTypes (debug bridge internals).

Code-only UI managers
Built and wired in code — not Designer surfaces.
FeatureBased OnCategoryUse
B4XDrawerB4XDrawer · left/center/dim Panels with gesture handlingNavigationside drawer: Initialize + panels + Resize
PreoptimizedCLVPreoptimizedCLV · CustomListView + B4XSeekBar fast-scroll overlayContainmentperformance helper wrapping a CustomListView
B4XDialog + templatesXUI Views · Panels + CustomListView / text fields (Date, Input, List, Color, Search, Signature, Timed, LongText, progress)Communication / Pickers / Formsmodal ShowDialog pattern
PreferencesDialogB4XPreferencesDialog · CustomListView + B4XDialog + item templates with built-in item layoutsCommunication / Formssettings form generator (AddBooleanItem / AddTextItem / … / ShowDialog)
BCToastBCToast · BBLabel (BCTextEngine rendering) on a PanelCommunicationtransient Show message
SimpleMediaManagerSimpleMediaManager · async bitmap loader + SimpleExoPlayerView / video viewsMediamedia loader wired to existing panels/ImageViews in code
B4XPagesB4XPages · Activity/Form page framework (B4XPagesManager)Navigationpage framework, not a control
X2 engineX2 · BitmapCreator sprites + Box2D physics on GameViewGame / Canvassprite/tile engine, code-driven
MediaChooserMediaChooser · camera capture + ContentChooser intents, runtime permission check, keep-alive serviceMediaCaptureImage / CaptureVideo / ChooseImage / ChooseVideo (resumable, returns MediaChooserResult); temp-file cleanup
NB6NB6 · Notification builder helperCommunicationnotifications helper, not a View

Foundation: XUI drawing stack (XUI library)
The canvas-drawn controls above share one cross-platform drawing stack.
  • B4XView — universal view wrapper. Every native view (Button, Label, Panel, …) is addressable through the same B4XView API, which is why B4X custom views accept any view as their base.
  • B4XCanvas — drawing surface bound to a view via Initialize(View). Primitives: DrawLine / DrawRect / DrawCircle / DrawPath / DrawBitmap (each plain + rotated), DrawText (+ rotated), MeasureText, ClipPath / RemoveClip, ClearRect. Invalidate flushes to screen; Resize / Release manage its lifecycle. Companion types: B4XPath (lines, ovals, arcs, rounded rects), B4XRect, B4XFont, B4XBitmap. Based on: android.graphics.Canvas + Bitmap + Paint / Path / Rect, via the Core canvas implementation it delegates every draw call to (B4XCanvas → core canvas → native canvas, bound to the target view).
  • BitmapCreator (BitmapCreator library) — offscreen bitmap + software canvas. Controls that pre-render (AnotherProgressBar, B4XSwitch, B4XRadioButton, B4XTurtle layers, BBCodeView / BBLabel text) draw into a BitmapCreator and blit the result to an ImageView container.
  • Controls in this report built on this stack: AnimatedCounter, AnotherProgressBar, B4XBreadCrumb, B4XLoadingIndicator, B4XPlusMinus, B4XRadioButton, B4XSeekBar, B4XSwitch, RoundSlider, ScrollingLabel, SwiftButton, B4XFloatTextField (hint), B4XTurtle, BBCodeView, BBLabel.

Notes
  • B4X custom views are added via Designer → Add View → CustomView; Java custom views (ViewsEx, TabStripViewPager, SimpleExoPlayerView, CustomListView) support the Visual Designer the same way.
  • Non-visual libraries shipped alongside (Phone, GPS, BLE2, Serial, SQL, OkHttp, Firebase* services, USB, Audio players, Camera, …) expose no layout controls and are excluded — same as the reference repo, which lists only widgets. Deliberately excluded UI-adjacent items: PreferenceScreen / PreferenceCategory (full-screen settings, not layout views), IME (keyboard helper), Camera preview (hosted on a Panel, no standalone View), ContentChooser (activity starter), full-screen ads, B4XMainPage (app-implemented) and B4XTypes (debug internals).
  • Totals: 17 core + 10 custom views + 21 B4X Designer views + 14 B4X helper/foundation types + 10 code-only managers ≈ 72 entries.
You are welcome to extend if there is something incorrect/needs updating

#SharingTheGoodness
 
Last edited:

Mashiane

Expert
Licensed User
Longtime User
In case you come from using Android Studio / other android development platforms...

You might notice that some components are not listed above, well don't be weary, there are a lot of libraries created in this forum that will meet your needs and if not, you can wrap these with java / javaobject / reflection if you dont find it in forum search.

Below we look at android.widget components and enhancement androidx components that dont come as standard built in components and some components that cover those use cases.

android.widget vs B4A — Gap Report

Method: every android.widget class name from the Android API reference / AOSP listing was checked against the stock B4A libraries' published wrappers.

Counts: ≈70 widget classes = 5 abstract bases + 7 deprecated + 58 current concrete. B4A covers 21 (18 as views + 3 functional). Missing: 37.

Missing — B4X substitute covers the use case (16)
android.widget ClassNative ComponentCovers Use Case
DatePickerandroid.widget.DatePicker — native date picker viewB4XDateTemplate (dialog)
CalendarViewandroid.widget.CalendarView — native calendar gridB4XDateTemplate (dialog)
TimePickerandroid.widget.TimePicker — native time picker viewB4XDateTemplate family / B4XTimedTemplate (dialogs)
NumberPickerandroid.widget.NumberPicker — native number spinnerB4XPlusMinus (Designer)
GridViewandroid.widget.GridView — 2-D scrolling gridB4XTable + Erel Table / Flexible Table class (sortable, SQLite load, CSV)
TableLayout / TableRowandroid.widget.TableLayout / android.widget.TableRow — native table container + rowB4XTable + Erel Table / Flexible Table class
ExpandableListViewandroid.widget.ExpandableListView — two-level listCustomListView (Designer)
SearchViewandroid.widget.SearchView — native search boxB4XSearchTemplate + Erel SearchView class / SQLSearchView (SQLite-backed, 400k-item tested)
PopupWindow / PopupMenu / ListPopupWindowandroid.widget.PopupWindow / PopupMenu / ListPopupWindow — floating windows/menusB4XDialog (modal dialogs)
TabWidgetandroid.widget.TabWidget — tab strip for TabHostTabStrip (Designer, ViewPager-based)
CheckedTextViewandroid.widget.CheckedTextView — checkable text rowB4XRadioButton / CheckBox (Designer)
RadioGroupandroid.widget.RadioGroup — exclusive-check containermanaged manually / B4XRadioButton set (Designer)
SlidingDrawer (deprecated)android.widget.SlidingDrawer — sliding drawerB4XDrawer (code-only)

Missing — true gaps, no substitute (21)
android.widget ClassBased OnCovers Use Case
AnalogClockandroid.widget.AnalogClock — native analog clock face
TextClockandroid.widget.TextClock — native digital clock text
Chronometerandroid.widget.Chronometer — native count-up timer view— (Timer + Label in code)
ImageButtonandroid.widget.ImageButton — image-backed button— (Button with bitmap)
MultiAutoCompleteTextViewandroid.widget.MultiAutoCompleteTextView — token-wise autocomplete
DialerFilterandroid.widget.DialerFilter — dial-pad filter
QuickContactBadgeandroid.widget.QuickContactBadge — contact badge thumbnail
Magnifierandroid.widget.Magnifier — API 29+ text magnifier
FrameLayoutandroid.widget.FrameLayout — native frame containerPanel covers the role generically
LinearLayoutandroid.widget.LinearLayout — native linear containerPanel covers the role generically
RelativeLayoutandroid.widget.RelativeLayout — native relative containerPanel covers the role generically
GridLayoutandroid.widget.GridLayout — native grid containerPanel covers the role generically
Spaceandroid.widget.Space — layout spacerPanel covers the role generically
ImageSwitcherandroid.widget.ImageSwitcher — animated image swapper
TextSwitcherandroid.widget.TextSwitcher — animated text swapper
ViewSwitcherandroid.widget.ViewSwitcher — two-view swapper
ViewFlipperandroid.widget.ViewFlipper — multi-view flipper
ViewAnimatorandroid.widget.ViewAnimator — animated container base
AdapterViewFlipperandroid.widget.AdapterViewFlipper — adapter-backed flipper
StackViewandroid.widget.StackView — stacked-card view
Toolbar (framework)android.widget.Toolbar — standard toolbar
ZoomControlsandroid.widget.ZoomControls — zoom button pair— (deprecated upstream in API 26)

androidx coverage

androidx LibraryBased OnCovers Use Case
viewpagerandroidx.viewpager.widget.ViewPager + PagerAdapter — legacy pagerTabStrip (Designer)
media3androidx.media3.* 1.2.0 (exoplayer, ui, datasource, extractor, dash/hls/rtsp/smoothstreaming) — playback engine + PlayerView surfaceSimpleExoPlayer (code-only) + SimpleExoPlayerView (Designer)
coreandroidx.core.* (ViewCompat, WindowInsetsCompat, ActivityCompat, ContextCompat) — backport plumbingIME, RuntimePermissions (non-UI)

Missing — UI layout / navigation:
androidx LibraryBased OnCovers Use Case
recyclerviewandroidx.recyclerview.widget.RecyclerView — virtualized listCustomListView / B4XTable (simple cases; complex virtualization = gap)
viewpager2androidx.viewpager2.widget.ViewPager2 — modern pagerTabStrip (legacy-ViewPager role)
drawerlayoutandroidx.drawerlayout.widget.DrawerLayout — native drawerB4XDrawer (code-only)
slidingpanelayoutandroidx.slidingpanelayout.widget.SlidingPaneLayout — two-pane layout
coordinatorlayoutandroidx.coordinatorlayout.widget.CoordinatorLayout — gesture choreography
constraintlayoutandroidx.constraintlayout.widget.ConstraintLayout — flat layoutPanel covers role generically
gridlayoutandroidx.gridlayout.widget.GridLayout — backported grid containerPanel covers role generically
cardviewandroidx.cardview.widget.CardView — elevated cardPanel covers role generically
swiperefreshlayoutandroidx.swiperefreshlayout.widget.SwipeRefreshLayout — pull-to-refresh
customviewandroidx.customview.* — custom-view helpers— (B4A views expose accessibility natively)
transitionandroidx.transition.* — scene/change animations— (B4A Animation covers basic role)
preferenceandroidx.preference.* — settings screensPreferencesDialog (form role)
appcompatandroidx.appcompat.* — backported ActionBar/widgets— (B4A targets framework widgets directly)
paletteandroidx.palette.graphics.Palette — color extraction
emojiandroidx.emoji2.* — downloadable emoji fonts— (BCTextEngine ships its own emoji data file)
vectordrawableandroidx.vectordrawable.* — vector drawables
interpolatorandroidx.interpolator.* — easing functions
asynclayoutinflaterandroidx.asynclayoutinflater.* — async inflation— (layouts are B4A .bal, not XML)
cursoradapterandroidx.cursoradapter.* — cursor adapters— (SQL + CustomListView in code)
loaderandroidx.loader.* — deprecated data loaders— (correctly absent)
windowandroidx.window.* — foldables / window metrics
autofillandroidx.autofill.* — autofill hints
contentpager / documentfile / exifinterface / heifwriter / print / sharetargetfile/print/share helpersContentResolver, FileProvider cover adjacent roles
webkitandroidx.webkit.* — backported WebView APIsWebView (framework role)
versionedparcelable / remotecallback / resourceinspectionIPC / inspection plumbing— (non-UI)

Missing — lists / data-driven UI:
androidx LibraryBased OnCovers Use Case
pagingandroidx.paging.* — paged data loadingPreoptimizedCLV (CLV role)
leanbackandroidx.leanback.* — Android TV UIs
car / wearauto / watch UI kits

Missing — architecture / data:
androidx LibraryBased OnCovers Use Case
lifecycle / livedata / viewmodellifecycle-aware components— (B4A activity events + Process_Globals cover role)
room / sqliteandroidx.room.* — ORM over SQLiteSQL (direct SQLite role)
databindingview binding— (Designer generates the binding)
navigationandroidx.navigation.* — nav graphsB4XPages (page-framework role)
workmanagerandroidx.work.* — background jobsservices / StartServiceAt (role)
savedstate / activity / fragmentstate + screensB4XPages + activity lifecycle (role)
startup / tracing / profileinstallerinit / perf plumbing— (non-UI)
concurrent / collection / annotation / arch-corefutures / collections / annotationsB4XCollections + Threading (role)

Missing — camera / media / security / identity:
androidx LibraryBased OnCovers Use Case
camera (CameraX)androidx.camera.* — modern camera pipelineCamera2 + Erel CamEx2 class (Camera2 API, stills + video)
media (legacy)androidx.media.* — superseded by media3media3 stack above
mediarouterandroidx.mediarouter.* — Cast routes
security-cryptoandroidx.security.crypto — encrypted file/prefsB4XEncryption (cipher role)
biometricandroidx.biometric.* — fingerprint/face promptErel BiometricManager (wraps androidx.biometric; CanAuthenticate / Show / Complete)
credentialsandroidx.credentials.* — passwords / passkeys

Missing — declarative UI / test:
androidx LibraryBased OnCovers Use Case
composedeclarative UI toolkit (+ material, material3, foundation, ui)— (no B4A bridge; Designer is the paradigm)
test / benchmarkJUnit / Espresso / benchmarks— (non-shipping)

Abstract bases + deprecated (reference, not gaps)
  • Abstract (extended, never used directly): AbsListView, AbsSeekBar, AbsSpinner, AdapterView, CompoundButton — B4A exposes their functionality through the concrete wrappers above.
  • Deprecated upstream, correctly absent from B4A: AbsoluteLayout, DigitalClock, Gallery, SlidingDrawer (→ B4XDrawer), TwoLineListItem, ZoomButton, ZoomButtonsController.
You are welcome to extend if there is something incorrect/needs updating

#SharingTheGoodness
 
Top