CardViewVG v3 (FREE)

FOR CONVENIENCE, ALL CONTENT IS PLACED IN A SINGLE BLOCK. THE EXTENSION IS SIMPLE AND UNDERSTANDABLE.
:gear: Block Parameters Breakdown:

  • :package: container β€” The layout component (VerticalArrangement or HorizontalArrangement) where cards will be rendered.
  • :framed_picture: imagesList β€” Global list variable containing image URLs (e.g., get global listImages).
  • :pencil: titlesList β€” Global list variable containing card titles (e.g., get global listTitles).
  • :page_facing_up: descriptionsList β€” Global list variable containing card descriptions (e.g., get global listDescriptions).
  • ↔️ isHorizontal β€” Scroll orientation: true for horizontal scrolling; false for vertical scrolling.
  • :triangular_ruler: cardWidthPercent β€” Card width as a percentage of the screen width. 0 = wrap content; 80-90 = fixed card width.
  • :straight_ruler: cardHeightPercent β€” Card height as a percentage of the screen height. 0 = auto-adjust height based on content.
  • :radio_button: cardCornerRadius β€” Corner rounding radius of the card frame in px (recommended: 15–20).
  • :milky_way: cardElevation β€” 3D shadow floating height in dp (recommended: 15–25 for a pronounced 3D effect).
  • :framed_picture: imageWidthPercent β€” Image width in % inside the card. 0 = match card width.
  • :framed_picture: imageHeightPercent β€” Image height in % relative to screen. 0 = auto-calculated height.
  • :black_square_button: imageCornerRadius β€” Corner rounding radius specifically for the image view in px (recommended: 10–15).
  • :artist_palette: cardBgColor β€” Background color of the card (App Inventor color block).
  • :radio_button: buttonColor β€” Background color for the card buttons.
  • :round_pushpin: textPosition β€” Text position relative to the image:
    • 0 β€” Text below image
    • 1 β€” Text to the left of image
    • 2 β€” Text to the right of image
    • 3 β€” Text above image
  • :radio_button: btn1Visible / btn2Visible / btn3Visible β€” Set true to display the button; false to hide it.
  • :memo: btn1Text / btn2Text / btn3Text β€” Text labels for the buttons (e.g., β€œDetails”, β€œBuy”, β€œDelete”).

:bell: Handling Button Clicks (when CardViewVG.OnCardButtonClicked):
component_event

  • :id_button: buttonId β€” ID number of the pressed button (1, 2, or 3).
  • :bar_chart: cardIndex β€” Index position of the clicked card (starts at 0).
  • :label: cardTitle β€” Title string of the card where the click occurred.



:counterclockwise_arrows_button: Automatic Pagination (Infinite Scroll / Lazy Loading)

  • :rocket: Batch Rendering: Cards are no longer generated all at once. When executed, only the first 10 cards are rendered immediately.
  • :scroll: Auto-Trigger on Scroll: As the user scrolls near the end of the view (within ~300px of the edge), the extension automatically loads the next batch of 10 cards (11–20, 21–30, etc.).
  • :high_voltage: High Performance: Keeps the app responsive and smooth, preventing memory overflows and UI freezes even when passing datasets of 100+ items.
  • :hammer_and_wrench: Fully Automated: No manual scroll-tracking logic needed inside App Inventor blocks β€” the infinite scroll listener is fully handled under the hood.

com.cardviewvg_v3.aix (19.8 KB)

The extension was created with the help of: FAST

4 Likes

That’s amazing :heart_eyes:

1 Like

Thank you for your contribution!
And your documentation gets better and better. Well done!

Are you already familiar with helper blocks? Using a helper block could make the extension more user friendly… see also Need help to adding helper or drop down blocks in extension - #4 by ewpatton - Extension Development - MIT App Inventor Community

Taifun

2 Likes

:open_book: Expandable Description Text

  • :scissors: 4-Line Limit: Description text is capped at a maximum of 4 lines by default.
  • :small_blue_diamond: Expansion Hint: If the text exceeds 4 lines, a blue β€œRead more… ▼” indicator appears automatically.
  • :counterclockwise_arrows_button: Expand & Collapse: Clicking either the text or the hint expands the description to full length and switches the label to β€œShow less… ▲”. Clicking again collapses it back to 4 lines.
  • :eye: Smart Detection: Short descriptions (4 lines or fewer) do not show the expansion hint.
  • :scroll: Internal Text Scroll: Shows 4 lines when collapsed. When expanded, limits display to 10 lines max. If the text exceeds 10 lines, an internal scrollbar enables inside the text box.
  • :right_arrow_curving_left: Reset on Collapse: Clicking again collapses it back to 4 lines and automatically scrolls the text back to the top.

com.cardviewvg_v3.aix (19.8 KB)

Add link to the extension