Skip to content

Add ConstraintLayout, RecyclerView and ViewModel lesson modules with code tabs#284

Merged
MihaiCristianCondrea merged 1 commit intomainfrom
codex/create-lesson-packages-and-activities-r205ek
Mar 3, 2026
Merged

Add ConstraintLayout, RecyclerView and ViewModel lesson modules with code tabs#284
MihaiCristianCondrea merged 1 commit intomainfrom
codex/create-lesson-packages-and-activities-r205ek

Conversation

@MihaiCristianCondrea
Copy link
Owner

Motivation

  • Expand the Android Studio lessons set by adding lessons demonstrating ConstraintLayout, RecyclerView, and ViewModel patterns with matching Java/XML syntax examples.
  • Reuse existing UI patterns (SyntaxFabActivity + LessonCodeTabsActivity) so each lesson exposes Java and XML code in the same tabbed viewer used across the app.

Description

  • Added three lesson packages and Activities: layouts/constraint/ConstraintLayoutActivity, lists/recyclerview/RecyclerViewActivity, and architecture/viewmodel/ViewModelActivity, each extending SyntaxFabActivity and wired to LessonCodeTabsActivity.createIntent(...) for Java/XML tabs.
  • Implemented tab fragments to display code from raw assets (*TabCodeFragment and *TabLayoutFragment) and added the raw assets under res/raw following the text_<lesson>_java.txt / text_<lesson>_xml.txt naming pattern.
  • Added supporting UI layouts and components: activity_constraint_layout.xml, activity_recycler_view.xml, activity_view_model.xml, item_recycler_view_lesson.xml, and a RecyclerViewPreviewAdapter for the RecyclerView preview.
  • Registered new lessons in app/src/main/res/xml/preferences_android_studio.xml, added titles/summaries/strings in res/values/strings.xml, and declared the new Activities in AndroidManifest.xml.

Testing

  • Ran ./gradlew test, which failed in this environment because the Android SDK location is not configured (missing ANDROID_HOME or local.properties sdk.dir).
  • Validated XML well-formedness for modified/added XML files using a Python ET.parse check, which succeeded for the updated files.

Codex Task

@MihaiCristianCondrea MihaiCristianCondrea merged commit e91dbca into main Mar 3, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant