The Kids Learning App follows a conventional Android Gradle project layout, with all application source code located underDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/SaadAhmed1122/Kids_learnig_App/llms.txt
Use this file to discover all available pages before exploring further.
app/src/main/java/com/kidsapp/fiver1/. The package is deliberately flat at the top level for the main activities, with four sub-packages (db/, model/, helper/, layout/, view/, and gameactivities/) handling specialised concerns such as persistence, puzzle rendering, and game modes.
Directory Tree
Key Packages
db/ — SQLite persistence layer for the photo gallery
db/ — SQLite persistence layer for the photo gallery
The
db/ package contains all database infrastructure for the Memory Gallery feature:MemoryContract.java— Defines the SQLite table schema as static constants (table name, column names). Acts as the single source of truth for column identifiers used across the package.MemoryDbHelper.java— ExtendsSQLiteOpenHelper. HandlesonCreateandonUpgrade, creating and migrating thememoriestable that stores Base64-encoded image strings and metadata.MemoriesAdapter.java— ARecyclerView.Adapterthat bindsMemorymodel objects to gallery item views inShow_ImagesMain. Handles decoding Base64 strings back toBitmapfor display.
model/ — Memory data model
model/ — Memory data model
The
model/ package contains a single class:Memory.java— A plain Java object (POJO) representing one gallery entry. It holds the image encoded as a Base64 string (images are resized to 250 × 250 px viaBitmapUtilbefore encoding) along with any associated metadata. This model is serialised to/from the SQLite database throughMemoryDbHelperand surfaced in the UI byMemoriesAdapter.
helper/ — Puzzle tile logic and bitmap utilities
helper/ — Puzzle tile logic and bitmap utilities
The
helper/ package provides shared utilities used by the puzzle feature:DataHelper.java— Manages the puzzle tile data structure. Implements the core tile-swap algorithm: tiles are represented as an ordered list ofBlockobjects;DataHelperhandles shuffling (with solvability checking) and validates move legality before committing a swap.Block.java— A lightweight value object representing a single puzzle tile. Stores the tile’s current position index and its correct (solved) position, allowingDataHelperto detect when the puzzle is complete.BitmapUtil.java— Utility methods for bitmap manipulation: resizing images to the target dimensions (250 × 250 px for gallery storage) and converting betweenBitmapand Base64Stringfor SQLite persistence.
layout/ and view/ — Custom puzzle rendering
layout/ and view/ — Custom puzzle rendering
These two packages together implement the custom puzzle UI:
PuzzleLayout.java(layout/) — A customViewGroupthat arrangesPuzzleViewchildren in a grid. It overridesonMeasureandonLayoutto size and position each tile without relying on standard layout managers, giving precise control over tile boundaries.PuzzleView.java(view/) — A customViewthat renders a single puzzle tile. It draws the appropriate cropped region of the source bitmap usingCanvasand handles touch events, forwarding valid swipe gestures toDataHelperfor processing.
gameactivities/ — Game hub activity classes
gameactivities/ — Game hub activity classes
The
gameactivities/ package contains the Activity subclasses loaded by GameLoader when a child selects a game category in GameMainAct:Action.java— Hosts the Action-category WebView, loading an action game URL into a full-screenWebViewwith JavaScript enabled.Cards.java— Hosts card-based games (e.g., memory card flip) in a dedicated WebView activity.Classic.java— Hosts classic mini-games such as simple platformers or arcade titles via WebView.Racing.java— Hosts racing games in a WebView with landscape orientation locked.Contact.java— A lightweight screen providing developer contact information and app version details, accessible from within the game hub.
Drawable Naming Conventions
All quiz and answer images in
res/drawable/ follow a strict prefix-and-index naming scheme. Understanding this convention is essential when adding new quiz content or debugging missing image errors.| Prefix | Content |
|---|---|
b0 – b9 | Animal question images |
a0 – a24 | Animal answer images |
c0 – c9 | Food question/answer images |
d0 – d19 | Answer distractor images |
e0 – e9 | Emotion question images |
h0 – h22 | Colours & shapes images |
m0 – m9 | Number answer images |
n0 – n9 | Number question images |
o0 – o9 | Object answer images |
p0 – p2 | Person images |
q0 – q9 | Things / vehicles question images |
s0 – s9 | Transport answer images |
t0 – t9 | Transport question images |
w0 – w16 | Wildlife / world answer images |