Kotlin 1.9.25 migration#987
Draft
XanderZhu wants to merge 70 commits into
Draft
Conversation
- Add step 2.3a: remove tools:viewBindingIgnore from layout XML - Add step 2.3b: check <include> layouts for viewBindingIgnore and use .root - Update general migration steps to include layout XML fix as step 1 - Add viewBindingIgnore check to per-file verification checklist - Update 'Unresolved reference' error docs with viewBindingIgnore as common cause - Update included layouts pitfall with .root pattern for delegates - Move migration tracker to docs/ (gitignored) to avoid branch conflicts Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This included layout is referenced by AchievementAdapterDelegate via <include>. The viewBindingIgnore attribute was blocking ViewBinding class generation for the included layout. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- RateAppDialog.kt (DialogFragment) — 10 view refs - FastContinueFragment.kt (Fragment) — 13 view refs - CourseBenefitsAdapterDelegate.kt (Adapter/ViewHolder) — 9 view refs, removed LayoutContainer - DownloadedCoursesAdapterDelegate.kt (Adapter/ViewHolder) — 4 view refs - AchievementAdapterDelegate.kt (Adapter/ViewHolder) — 3 view refs, uses .root on include Also removed tools:viewBindingIgnore from corresponding layout XMLs. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- InAppPurchaseAdapterDelegate.kt (debug + stageDebuggable) - SplitTestDataAdapterDelegate.kt (debug + stageDebuggable) - AdaptiveStatsActivity.kt - AdaptiveRatingAdapter.kt - AdaptiveWeeksAdapter.kt - QuizCardViewHolder.kt Also fix pre-existing issues in previously migrated files: - AchievementAdapterDelegate: use itemView instead of root - CourseBenefitsAdapterDelegate: remove invalid override, use itemView - DownloadedCoursesAdapterDelegate: fix downloadedCourseTitle → downloadedCourseName, use itemView Remove viewBindingIgnore from 5 layout XMLs. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- AdaptiveLevelDialogFragment.kt (DialogFragment, uses inflate pattern) - AdaptiveOnboardingFragment.kt (Fragment) - AdaptiveRatingFragment.kt (Fragment, includes error_no_connection_with_button) - RecommendationsFragment.kt (Fragment, includes error_no_connection_with_button) Remove viewBindingIgnore from 6 layout XMLs. Add android:id to error layout includes. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- StoriesAdapter.kt (RecyclerView.ViewHolder pattern) - FeedbackStoryPartDelegate.kt (delegate, programmatic inflation, includes view_story_text_input) - PlainTextWithButtonStoryPartDelegate.kt (delegate, programmatic inflation) - StoriesActivityDelegate.kt (Activity delegate, binds activity content view) Remove viewBindingIgnore from 5 layout XMLs. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- AnimatedOnboardingActivity.kt (Activity) - PhotoViewActivity.kt (Activity) - SearchQueriesAdapter.kt (RecyclerView.ViewHolder) - SocialLinksAdapter.kt (RecyclerView.ViewHolder) - AboutAppFragment.kt (Fragment) - FeedbackFragment.kt (Fragment) - NotificationSettingsFragment.kt (Fragment) - OnboardingFragment.kt (Fragment) - StoreManagementFragment.kt (Jetpack Fragment) Remove viewBindingIgnore from 14 layout XMLs. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- 3 synthetic imports (fragment_home, home_streak_view, view_centered_toolbar) - Added android:id to view_centered_toolbar include in view_centered_appbar Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- 2 view references (navigationView, frame) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- ChoiceQuizDelegate.kt - PopupHelper.kt - AchievementTileDelegate.kt - AchievementDetailsDialog.kt - AchievementsListFragment.kt Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- CredentialAuthActivity.kt - RegistrationActivity.kt - SocialAuthActivity.kt - ItemBannerBindingExtension.kt - AuthorAdapterDelegate.kt Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- AuthorListAdapterDelegate.kt - CourseListAdapterDelegate.kt - FiltersAdapterDelegate.kt - OfflineAdapterDelegate.kt - RecommendedCourseListAdapterDelegate.kt Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- SimpleCourseListDefaultAdapterDelegate.kt - SimpleCourseListGridAdapterDelegate.kt - SimpleCourseListGridFirstAdapter.kt - SimpleCourseListsDefaultAdapterDelegate.kt - SimpleCourseListsGridAdapterDelegate.kt Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- ToolbarHelper.kt (extension functions → findViewById) - LessonDemoCompleteBottomSheetDialogFragment.kt - SettingsFragment.kt - InAppWebViewDialogFragment.kt (complex: multiple includes, manual WebView) - CourseContentTimelineAdapter.kt (ViewHolder lambda form) Also removed tools:viewBindingIgnore from 4 layouts and added include IDs to dialog_in_app_web_view.xml Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- CourseContentUnitDelegate.kt (ViewHolder → viewBinding delegate) - CourseContentControlBarDelegate.kt (ViewHolder → viewBinding delegate) - CourseContentSectionDelegate.kt (ViewHolder → viewBinding delegate) - CourseContentFragment.kt (Fragment with multiple includes) - DownloadStatusView.kt (Custom View → binding.inflate) Also removed tools:viewBindingIgnore from 7 layouts and added include IDs to fragment_course_content.xml for error_no_connection and empty_default includes. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- PyCharmStepQuizFragment.kt (simple Fragment) - ReviewStatusView.kt (Custom View → binding.inflate) - EditDeadlinesAdapter.kt (ViewHolder → viewBinding delegate) - LearningRateAdapter.kt (ViewHolder → viewBinding delegate) - CodeQuizInstructionDelegate.kt (helper class → XxxBinding.bind) Also removed tools:viewBindingIgnore from 5 layouts. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Migrated: - CodeStepQuizFormDelegate (delegate→LayoutStepQuizCodeBinding) - CodeStepRunCodeDelegate (delegate→LayoutStepQuizCodeFullscreenRunCodeBinding) - StepQuizReviewDelegate (LayoutContainer→findViewById) - StepQuizReviewTeacherFragment (fragment→viewBinding delegate) - StepQuizReviewFragment (fragment→findViewById) Removed tools:viewBindingIgnore from 6 layout files: - fragment_step_quiz_review.xml - fragment_step_quiz_review_peer.xml - fragment_step_quiz_review_teacher.xml - layout_step_quiz_code_fullscreen_run_code.xml - layout_step_quiz_review_header.xml - layout_step_quiz_review_footer.xml Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Migrated: CodeLayoutDelegate (delegate→findViewById), CodeDetailSampleAdapterDelegate (ViewHolder→findViewById), CodeDetailLimitAdapterDelegate (ViewHolder→findViewById), CodeStepQuizFragment (fragment→findViewById), CourseListUserActivity (activity→findViewById). Layouts with viewBindingIgnore use findViewById instead of ViewBinding classes. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- CoursePropertiesDelegate.kt (utility class with manual binding) - VisitedCourseListItemAdapterDelegate.kt (adapter delegate ViewHolder) - CourseListItemAdapterDelegate.kt (adapter delegate ViewHolder) - CourseListWishFragment.kt (Fragment) - CourseListPopularFragment.kt (Fragment) Removed tools:viewBindingIgnore from 6 layout files: layout_course_properties, item_course, item_visited_course, fragment_course_list, empty_search, item_course_list Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Migrated: - CourseListVisitedFragment.kt — Fragment, uses by viewBinding(FragmentCourseListBinding::bind) - CourseListCollectionFragment.kt — Fragment, uses by viewBinding(FragmentCourseListBinding::bind), uses setTitleToCenteredToolbar for toolbar title - CourseListSearchFragment.kt — Fragment, uses by viewBinding(FragmentCourseListBinding::bind) + findViewById for view_search_toolbar views (viewBindingIgnore) - CourseListUserFragment.kt — Fragment, uses by viewBinding(FragmentCourseListBinding::bind) + findViewById for appBarLayout (viewBindingIgnore) - CourseListVisitedHorizontalFragment.kt — Fragment, uses by viewBinding(ItemCourseListBinding::bind) Key learning: view_search_toolbar.xml has tools:viewBindingIgnore=true, so its views (appBarLayout, searchViewToolbar, backIcon, filterIcon) are not in FragmentCourseListBinding. Must use findViewById for those views. Similarly, courseListUserSkeleton is just a View (not a binding) so no .root needed. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- SpecializationAdapterDelegate.kt - SpecializationListAdapterDelegate.kt - StoriesAdapterDelegate.kt (catalog) - CertificatesAdapterDelegate.kt - CommentLoadMoreRepliesAdapterDelegate.kt Removed viewBindingIgnore from: certificate_item.xml, item_comment_load_more_replies.xml, item_specialization.xml, item_specialization_list.xml, view_stories_container.xml Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
APPS-3860 Add Android PDn consent flows
…inding migration - 22 task files (108 source files to migrate, 5 per task) - PROMPT.md with loop workflow instructions - ralph.yml config for builtin:code-assist Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Files kept locally but no longer tracked by git. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…etic-migration # Conflicts: # app/src/main/java/org/stepik/android/view/auth/ui/activity/RegistrationActivity.kt # app/src/main/java/org/stepik/android/view/auth/ui/activity/SocialAuthActivity.kt
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- CatalogBlockHeaderDelegate: removed LayoutContainer, used binding.bind() - CatalogFragment: removed viewBindingIgnore from layouts, included views via findViewById - CertificatesActivity: removed viewBindingIgnore from layouts, included views via findViewById - CertificateNameChangeDialog: used binding.inflate() in onCreateDialog - CourseSearchResultAdapterDelegate: removed LayoutContainer, used viewBinding lambda form Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…t findViewById Key correction: views from included layouts should be accessed through the parent binding chain (parentBinding.includeId.viewId), NOT via findViewById or .root. - Add android:id requirement for <include> tags - Show wrong (findViewById) vs correct (binding chain) pattern - Update patterns.md pitfall #6 with binding chain examples - Keep .root only for delegates that take a View parameter - Add summary table: when to use binding chain vs .root Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- CommentsActivity.kt: Activity with toolbar binding chain and findViewById for includes - CommentDataAdapterDelegate.kt: Adapter delegate with commentActions include binding - ComposeCommentDialogFragment.kt: DialogFragment with toolbar and error includes - SolutionCommentDialogFragment.kt: DialogFragment with dynamic quiz layout inflation - SubmissionDataAdapterDelegate.kt: Adapter delegate with review submission includes Also removed viewBindingIgnore from 12 layout XML files and fixed stray line in CatalogFragment from previous task. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- ProfileCertificatesFragment: tryAgain via binding.certificatesLoadingError.tryAgain - ProfileCoursesFragment: profileCoursesPlaceholder is View (included layout has viewBindingIgnore) - ProfileDetailFragment: LatexView accessed via binding.profileDetails - ProfileEditActivity: profileEditEmptyLogin.root for ViewStateDelegate - ProfileEditInfoActivity: 4 EditText views via binding, root for snackbar Removed viewBindingIgnore from all 5 layouts. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- ProfileEditPasswordActivity: Activity, 6 view refs, initCenteredToolbar unchanged - ProfileEditTextDelegate: Adapter delegate, 2 view refs, inner ViewHolder - ProfileIdFragment: Fragment, 1 view ref (profileUserId) - ProfileLinksFragment: Fragment, 4 view refs, tryAgain via binding chain - SolutionsActivity: Activity, 10+ view refs, 4 include IDs added, toolbar via binding chain Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- StepSolutionStatsDelegate: delegate with binding.bind(containerView), 2 view refs - StepFragment: complex fragment with 3 synthetic imports, ~20 view refs, binding chain for includes - VideoStepContentFragment: fragment with 3 synthetic imports, added ID to include, binding chain - StepQuizFeedbackBlocksDelegate: delegate with binding.bind(containerView), 6 view refs - StepQuizViewStateDelegateFactory: factory with FragmentStepQuizBinding.bind() Removed viewBindingIgnore from: view_step_solution_stats, view_step_disabled, view_step_disabled_teacher, view_step_quiz_error, layout_step_quiz_feedback_block, fragment_step_quiz, fragment_step_content_video, view_length_video_thumbnail Downstream fixes: SolutionCommentDialogFragment, StepQuizReviewTeacherFragment (adapter to binding type changes from viewBindingIgnore removal) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- CodeStepQuizFullScreenDialogFragment: DialogFragment with 7 synthetic imports - MatchingItemOptionAdapterDelegate: adapter delegate with viewBinding - MatchingItemTitleAdapterDelegate: adapter delegate with viewBinding - MatchingStepQuizFormDelegate: delegate using FragmentStepQuizBinding.bind() - MatchingStepQuizFragment: fragment using view!!.findViewById Removed viewBindingIgnore from 7 layout XMLs. Fixed stepQuizActionContainer type in StepQuizViewStateDelegateFactory. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- SortingOptionAdapterDelegate: adapter delegate with viewBinding - SortingStepQuizFormDelegate: delegate using FragmentStepQuizBinding.bind() - SortingStepQuizFragment: fragment using view!!.findViewById - SqlStepQuizFormDelegate: delegate using FragmentStepQuizBinding + LayoutStepQuizSqlBinding - SqlStepQuizFragment: fragment using view!!.findViewById Removed viewBindingIgnore from layout_step_quiz_sql. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- TableColumnMultipleSelectionItemAdapterDelegate: adapter delegate with viewBinding - TableColumnSingleSelectionItemAdapterDelegate: adapter delegate with viewBinding - TableSelectionItemAdapterDelegate: adapter delegate with viewBinding - TableStepQuizFormDelegate: delegate using FragmentStepQuizBinding.bind() - TableColumnSelectionBottomSheetDialogFragment: BottomSheetDialogFragment with by viewBinding() Removed viewBindingIgnore from 5 layout XMLs (item_table_column_selection_checkbox, item_table_column_selection_radiobutton, item_table_selection, layout_step_quiz_table, bottom_sheet_dialog_table_columns_selection). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- TableStepQuizFragment: fragment using view!!.findViewById for tableRecycler - TextStepQuizFormDelegate: delegate using FragmentStepQuizBinding + LayoutStepQuizTextBinding - TextStepQuizFragment: fragment using view!!.findViewById for stringStepQuizField - UnsupportedStepQuizFragment: Fragment(R.layout) with by viewBinding() for stepQuizAction - EditStepSourceDialogFragment: DialogFragment with by viewBinding() for stepContentEditText Removed viewBindingIgnore from 3 layout XMLs (layout_step_quiz_text, fragment_step_quiz_unsupported, dialog_step_source_edit). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- SubmissionsDialogFragment: 5 synthetic imports, ~20 view refs. Added IDs to 3 includes. - SubmissionsQueryFilterDialogFragment: 13 view refs. Removed viewBindingIgnore. - UserReviewsPotentialAdapterDelegate: Removed LayoutContainer, 4 view refs. - UserReviewsPotentialHeaderAdapterDelegate: Removed LayoutContainer, 1 view ref. - UserReviewsReviewedAdapterDelegate: Removed LayoutContainer, 6 view refs. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…roper viewBinding delegate
…d of certain direct child view binding.
APPS-3864 Migrate synthetic view access to ViewBinding
…d.parcel Migrate kotlin-android-extensions to kotlin-parcelize
Remove kotlinx.android.extensions.LayoutContainer usage
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Integration branch for the Kotlin 1.9.25 upgrade. Contains the synthetic/ViewBinding cleanup and the parcelize migration groundwork. The remaining Kotlin toolchain and library upgrades will follow in dedicated commits/PRs.