Skip to content

TE7-T893: Add UI widget layout#20

Open
Kruna1Pate1 wants to merge 5 commits intodevelopfrom
feature/TE7-T893_UIWidgetLayout
Open

TE7-T893: Add UI widget layout#20
Kruna1Pate1 wants to merge 5 commits intodevelopfrom
feature/TE7-T893_UIWidgetLayout

Conversation

@Kruna1Pate1
Copy link
Copy Markdown
Owner

@Kruna1Pate1 Kruna1Pate1 commented Jun 7, 2023

UI widget layouts

Summary by AIReviewRadar 1.0.2

Release Notes:

  • New Feature: Added UI widget layouts with various interactive and customizable components such as buttons, checkboxes, chips, progress bars, sliders, and spinners.
  • New Feature: Added data binding and view models to improve the performance of the application.
  • Refactor: Enabled view binding and data binding to simplify the codebase.

"Buttons, sliders, and chips galore,
With data binding, we'll do more.
Our UI is now interactive and fun,
Thanks to this PR, we've just begun!"

@Kruna1Pate1 Kruna1Pate1 requested a review from nishchal-v June 7, 2023 13:40
@github-actions
Copy link
Copy Markdown

github-actions bot commented Jun 7, 2023

🤖 AIReviewRadar

Thank you for letting me participate in the code review.

The pull request titled "TE7-T893: Add UI widget layout" adds a significant amount of code to the project, including new classes, layouts, and adapters. The changes include adding dependencies, enabling view binding and data binding, and setting up UI components such as buttons, checkboxes, chips, progress bars, sliders, and spinners. The pull request also includes new Kotlin files that define extension functions and classes for data binding and view models. Overall, the changes aim to improve the user interface of the application by providing more interactive and customizable UI components.


Chat with 🤖 AIReviewRadar (@openai)

  • Reply on review comments left by this bot to ask follow-up questions. A review comment is a comment on a diff or a file.
  • Invite the bot into a review comment chain by tagging @openai in a reply.

Files ignored due to filter (3)

Ignored files

  • Demo/app/src/main/res/drawable/img.png
  • Demo/app/src/main/res/drawable/running_up_that_hill.png
  • Demo/app/src/main/res/drawable/trade_graph.png
Files not summarized due to max files limit (148)

Not summarized

  • Demo/app/src/main/java/com/krunal/demo/uicomponents/extentions/TypedArrayExtentions.kt
  • Demo/app/src/main/java/com/krunal/demo/uicomponents/extentions/ViewExtentions.kt
  • Demo/app/src/main/java/com/krunal/demo/uicomponents/helpers/PreferenceHelper.kt
  • Demo/app/src/main/java/com/krunal/demo/uicomponents/helpers/ThemeHelper.kt
  • Demo/app/src/main/java/com/krunal/demo/uicomponents/models/CardDetail.kt
  • Demo/app/src/main/java/com/krunal/demo/uicomponents/models/DrawableResource.kt
  • Demo/app/src/main/java/com/krunal/demo/uicomponents/models/Name.kt
  • Demo/app/src/main/java/com/krunal/demo/uicomponents/models/Theme.kt
  • Demo/app/src/main/java/com/krunal/demo/uicomponents/models/enums/AccentColor.kt
  • Demo/app/src/main/java/com/krunal/demo/uicomponents/models/enums/CardType.kt
  • Demo/app/src/main/java/com/krunal/demo/uicomponents/models/enums/ThemeMode.kt
  • Demo/app/src/main/java/com/krunal/demo/uicomponents/picker/DatePickerFragment.kt
  • Demo/app/src/main/java/com/krunal/demo/uicomponents/picker/TimePickerFragment.kt
  • Demo/app/src/main/java/com/krunal/demo/uicomponents/sheets/OperationsBottomSheetFragment.kt
  • Demo/app/src/main/java/com/krunal/demo/uicomponents/tablayoutfragments/CallsFragment.kt
  • Demo/app/src/main/java/com/krunal/demo/uicomponents/tablayoutfragments/ChatFragment.kt
  • Demo/app/src/main/java/com/krunal/demo/uicomponents/tablayoutfragments/HomeFragment.kt
  • Demo/app/src/main/java/com/krunal/demo/uicomponents/utils/PreferenceKeys.kt
  • Demo/app/src/main/java/com/krunal/demo/uicomponents/views/CustomView.kt
  • Demo/app/src/main/java/com/krunal/demo/uicomponents/views/HistoryLineView.kt
  • Demo/app/src/main/java/com/krunal/demo/uicomponents/views/MyClickableSpan.kt
  • Demo/app/src/main/res/color/chip_card.xml
  • Demo/app/src/main/res/color/chip_card_text.xml
  • Demo/app/src/main/res/color/chip_operations_time.xml
  • Demo/app/src/main/res/color/stack_exchange_chip_background.xml
  • Demo/app/src/main/res/drawable/circle_image.xml
  • Demo/app/src/main/res/drawable/circular_progress.xml
  • Demo/app/src/main/res/drawable/gradient_button.xml
  • Demo/app/src/main/res/drawable/gradient_progress.xml
  • Demo/app/src/main/res/drawable/highlighted_background.xml
  • Demo/app/src/main/res/drawable/ic_add.xml
  • Demo/app/src/main/res/drawable/ic_add_filled.xml
  • Demo/app/src/main/res/drawable/ic_android.xml
  • Demo/app/src/main/res/drawable/ic_avax_logo.xml
  • Demo/app/src/main/res/drawable/ic_back.xml
  • Demo/app/src/main/res/drawable/ic_calendar.xml
  • Demo/app/src/main/res/drawable/ic_call.xml
  • Demo/app/src/main/res/drawable/ic_card.xml
  • Demo/app/src/main/res/drawable/ic_chat.xml
  • Demo/app/src/main/res/drawable/ic_check.xml
  • Demo/app/src/main/res/drawable/ic_circle.xml
  • Demo/app/src/main/res/drawable/ic_cross.xml
  • Demo/app/src/main/res/drawable/ic_down_arrow.xml
  • Demo/app/src/main/res/drawable/ic_down_arrow_outlined.xml
  • Demo/app/src/main/res/drawable/ic_email.xml
  • Demo/app/src/main/res/drawable/ic_exchange.xml
  • Demo/app/src/main/res/drawable/ic_feed.xml
  • Demo/app/src/main/res/drawable/ic_female.xml
  • Demo/app/src/main/res/drawable/ic_food.xml
  • Demo/app/src/main/res/drawable/ic_gasoline.xml
  • Demo/app/src/main/res/drawable/ic_heart_outlined.xml
  • Demo/app/src/main/res/drawable/ic_home.xml
  • Demo/app/src/main/res/drawable/ic_image.xml
  • Demo/app/src/main/res/drawable/ic_info.xml
  • Demo/app/src/main/res/drawable/ic_line_shader.xml
  • Demo/app/src/main/res/drawable/ic_link_logo.xml
  • Demo/app/src/main/res/drawable/ic_male.xml
  • Demo/app/src/main/res/drawable/ic_market.xml
  • Demo/app/src/main/res/drawable/ic_mastercard.xml
  • Demo/app/src/main/res/drawable/ic_menu.xml
  • Demo/app/src/main/res/drawable/ic_next.xml
  • Demo/app/src/main/res/drawable/ic_notification.xml
  • Demo/app/src/main/res/drawable/ic_other_gender.xml
  • Demo/app/src/main/res/drawable/ic_paperplane.xml
  • Demo/app/src/main/res/drawable/ic_pause.xml
  • Demo/app/src/main/res/drawable/ic_pause_outlined.xml
  • Demo/app/src/main/res/drawable/ic_pen.xml
  • Demo/app/src/main/res/drawable/ic_play.xml
  • Demo/app/src/main/res/drawable/ic_play_outlined.xml
  • Demo/app/src/main/res/drawable/ic_previous.xml
  • Demo/app/src/main/res/drawable/ic_profile.xml
  • Demo/app/src/main/res/drawable/ic_remove.xml
  • Demo/app/src/main/res/drawable/ic_right_arrow.xml
  • Demo/app/src/main/res/drawable/ic_rose_logo.xml
  • Demo/app/src/main/res/drawable/ic_search.xml
  • Demo/app/src/main/res/drawable/ic_splash.xml
  • Demo/app/src/main/res/drawable/ic_swap.xml
  • Demo/app/src/main/res/drawable/ic_timezone.xml
  • Demo/app/src/main/res/drawable/ic_two_circle.xml
  • Demo/app/src/main/res/drawable/ic_up_arrow.xml
  • Demo/app/src/main/res/drawable/ic_wallet.xml
  • Demo/app/src/main/res/drawable/image_toggle.xml
  • Demo/app/src/main/res/drawable/progress_vertical.xml
  • Demo/app/src/main/res/drawable/progress_vertical_graph.xml
  • Demo/app/src/main/res/drawable/rounded_bottom_bar.xml
  • Demo/app/src/main/res/drawable/rounded_bottom_sheet.xml
  • Demo/app/src/main/res/drawable/rounded_image.xml
  • Demo/app/src/main/res/drawable/rounded_tab_layout.xml
  • Demo/app/src/main/res/drawable/rounded_toast.xml
  • Demo/app/src/main/res/drawable/rounded_transparent_background.xml
  • Demo/app/src/main/res/drawable/selected_theme.xml
  • Demo/app/src/main/res/drawable/tab_selected_background.xml
  • Demo/app/src/main/res/layout/activity_uicomponents.xml
  • Demo/app/src/main/res/layout/card_chip.xml
  • Demo/app/src/main/res/layout/card_layout.xml
  • Demo/app/src/main/res/layout/custom_toast.xml
  • Demo/app/src/main/res/layout/fragment_app_bar.xml
  • Demo/app/src/main/res/layout/fragment_button.xml
  • Demo/app/src/main/res/layout/fragment_calls.xml
  • Demo/app/src/main/res/layout/fragment_card.xml
  • Demo/app/src/main/res/layout/fragment_chat.xml
  • Demo/app/src/main/res/layout/fragment_checkbox.xml
  • Demo/app/src/main/res/layout/fragment_chip.xml
  • Demo/app/src/main/res/layout/fragment_cl_chain_bias.xml
  • Demo/app/src/main/res/layout/fragment_cl_circular.xml
  • Demo/app/src/main/res/layout/fragment_cl_guideline_barrier.xml
  • Demo/app/src/main/res/layout/fragment_cl_relative.xml
  • Demo/app/src/main/res/layout/fragment_coordinator_layout.xml
  • Demo/app/src/main/res/layout/fragment_custom_view.xml
  • Demo/app/src/main/res/layout/fragment_data_binding.xml
  • Demo/app/src/main/res/layout/fragment_date_picker.xml
  • Demo/app/src/main/res/layout/fragment_edit_text.xml
  • Demo/app/src/main/res/layout/fragment_fab.xml
  • Demo/app/src/main/res/layout/fragment_frame_layout.xml
  • Demo/app/src/main/res/layout/fragment_home.xml
  • Demo/app/src/main/res/layout/fragment_linear_layout.xml
  • Demo/app/src/main/res/layout/fragment_operations_bottom_sheet.xml
  • Demo/app/src/main/res/layout/fragment_progress_bar.xml
  • Demo/app/src/main/res/layout/fragment_radio.xml
  • Demo/app/src/main/res/layout/fragment_relative_layout.xml
  • Demo/app/src/main/res/layout/fragment_slider.xml
  • Demo/app/src/main/res/layout/fragment_snackbar.xml
  • Demo/app/src/main/res/layout/fragment_span.xml
  • Demo/app/src/main/res/layout/fragment_spinner.xml
  • Demo/app/src/main/res/layout/fragment_tab_layout.xml
  • Demo/app/src/main/res/layout/fragment_theme.xml
  • Demo/app/src/main/res/layout/fragment_time_picker.xml
  • Demo/app/src/main/res/layout/fragment_toast.xml
  • Demo/app/src/main/res/layout/name_layout.xml
  • Demo/app/src/main/res/layout/name_merge_layout.xml
  • Demo/app/src/main/res/layout/notification_layout.xml
  • Demo/app/src/main/res/layout/operations_card_layout.xml
  • Demo/app/src/main/res/layout/recent_operation_layout.xml
  • Demo/app/src/main/res/layout/theme_layout.xml
  • Demo/app/src/main/res/layout/timezone_spinner.xml
  • Demo/app/src/main/res/menu/card_bottom_navigation_items.xml
  • Demo/app/src/main/res/menu/toolbar_menu.xml
  • Demo/app/src/main/res/menu/toolbar_search_menu.xml
  • Demo/app/src/main/res/values-night/themes.xml
  • Demo/app/src/main/res/values/arrays.xml
  • Demo/app/src/main/res/values/attrs.xml
  • Demo/app/src/main/res/values/colors.xml
  • Demo/app/src/main/res/values/dimens.xml
  • Demo/app/src/main/res/values/splash.xml
  • Demo/app/src/main/res/values/strings.xml
  • Demo/app/src/main/res/values/styles.xml
  • Demo/app/src/main/res/values/themes.xml
  • Demo/gradle/wrapper/gradle-wrapper.properties
🤖 AIReviewRadar
  <details>
Files not reviewed due to max files limit (163)

Not reviewed

  • Demo/app/src/main/java/com/krunal/demo/uicomponents/adapters/TimezoneAdapter.kt
  • Demo/app/src/main/java/com/krunal/demo/uicomponents/adapters/ViewBindingAdapter.kt
  • Demo/app/src/main/java/com/krunal/demo/uicomponents/adapters/ViewPagerAdapter.kt
  • Demo/app/src/main/java/com/krunal/demo/uicomponents/binding/DataBindingFragment.kt
  • Demo/app/src/main/java/com/krunal/demo/uicomponents/binding/DataBingingViewModel.kt
  • Demo/app/src/main/java/com/krunal/demo/uicomponents/cardscreen/CardFragment.kt
  • Demo/app/src/main/java/com/krunal/demo/uicomponents/cardscreen/CardFragmentViewModel.kt
  • Demo/app/src/main/java/com/krunal/demo/uicomponents/constraintLayouts/ChainBiasFragment.kt
  • Demo/app/src/main/java/com/krunal/demo/uicomponents/constraintLayouts/CircularFragment.kt
  • Demo/app/src/main/java/com/krunal/demo/uicomponents/constraintLayouts/GuidelineBarrierFragment.kt
  • Demo/app/src/main/java/com/krunal/demo/uicomponents/constraintLayouts/RelativeFragment.kt
  • Demo/app/src/main/java/com/krunal/demo/uicomponents/dialogs/MyDatePickerDialog.kt
  • Demo/app/src/main/java/com/krunal/demo/uicomponents/extentions/ActivityExtentions.kt
  • Demo/app/src/main/java/com/krunal/demo/uicomponents/extentions/LinearLayoutExtentions.kt
  • Demo/app/src/main/java/com/krunal/demo/uicomponents/extentions/NumberExtentions.kt
  • Demo/app/src/main/java/com/krunal/demo/uicomponents/extentions/TypedArrayExtentions.kt
  • Demo/app/src/main/java/com/krunal/demo/uicomponents/extentions/ViewExtentions.kt
  • Demo/app/src/main/java/com/krunal/demo/uicomponents/helpers/PreferenceHelper.kt
  • Demo/app/src/main/java/com/krunal/demo/uicomponents/helpers/ThemeHelper.kt
  • Demo/app/src/main/java/com/krunal/demo/uicomponents/models/CardDetail.kt
  • Demo/app/src/main/java/com/krunal/demo/uicomponents/models/DrawableResource.kt
  • Demo/app/src/main/java/com/krunal/demo/uicomponents/models/Name.kt
  • Demo/app/src/main/java/com/krunal/demo/uicomponents/models/Theme.kt
  • Demo/app/src/main/java/com/krunal/demo/uicomponents/models/enums/AccentColor.kt
  • Demo/app/src/main/java/com/krunal/demo/uicomponents/models/enums/CardType.kt
  • Demo/app/src/main/java/com/krunal/demo/uicomponents/models/enums/ThemeMode.kt
  • Demo/app/src/main/java/com/krunal/demo/uicomponents/picker/DatePickerFragment.kt
  • Demo/app/src/main/java/com/krunal/demo/uicomponents/picker/TimePickerFragment.kt
  • Demo/app/src/main/java/com/krunal/demo/uicomponents/sheets/OperationsBottomSheetFragment.kt
  • Demo/app/src/main/java/com/krunal/demo/uicomponents/tablayoutfragments/CallsFragment.kt
  • Demo/app/src/main/java/com/krunal/demo/uicomponents/tablayoutfragments/ChatFragment.kt
  • Demo/app/src/main/java/com/krunal/demo/uicomponents/tablayoutfragments/HomeFragment.kt
  • Demo/app/src/main/java/com/krunal/demo/uicomponents/utils/PreferenceKeys.kt
  • Demo/app/src/main/java/com/krunal/demo/uicomponents/views/CustomView.kt
  • Demo/app/src/main/java/com/krunal/demo/uicomponents/views/HistoryLineView.kt
  • Demo/app/src/main/java/com/krunal/demo/uicomponents/views/MyClickableSpan.kt
  • Demo/app/src/main/res/color/chip_card.xml
  • Demo/app/src/main/res/color/chip_card_text.xml
  • Demo/app/src/main/res/color/chip_operations_time.xml
  • Demo/app/src/main/res/color/stack_exchange_chip_background.xml
  • Demo/app/src/main/res/drawable/circle_image.xml
  • Demo/app/src/main/res/drawable/circular_progress.xml
  • Demo/app/src/main/res/drawable/gradient_button.xml
  • Demo/app/src/main/res/drawable/gradient_progress.xml
  • Demo/app/src/main/res/drawable/highlighted_background.xml
  • Demo/app/src/main/res/drawable/ic_add.xml
  • Demo/app/src/main/res/drawable/ic_add_filled.xml
  • Demo/app/src/main/res/drawable/ic_android.xml
  • Demo/app/src/main/res/drawable/ic_avax_logo.xml
  • Demo/app/src/main/res/drawable/ic_back.xml
  • Demo/app/src/main/res/drawable/ic_calendar.xml
  • Demo/app/src/main/res/drawable/ic_call.xml
  • Demo/app/src/main/res/drawable/ic_card.xml
  • Demo/app/src/main/res/drawable/ic_chat.xml
  • Demo/app/src/main/res/drawable/ic_check.xml
  • Demo/app/src/main/res/drawable/ic_circle.xml
  • Demo/app/src/main/res/drawable/ic_cross.xml
  • Demo/app/src/main/res/drawable/ic_down_arrow.xml
  • Demo/app/src/main/res/drawable/ic_down_arrow_outlined.xml
  • Demo/app/src/main/res/drawable/ic_email.xml
  • Demo/app/src/main/res/drawable/ic_exchange.xml
  • Demo/app/src/main/res/drawable/ic_feed.xml
  • Demo/app/src/main/res/drawable/ic_female.xml
  • Demo/app/src/main/res/drawable/ic_food.xml
  • Demo/app/src/main/res/drawable/ic_gasoline.xml
  • Demo/app/src/main/res/drawable/ic_heart_outlined.xml
  • Demo/app/src/main/res/drawable/ic_home.xml
  • Demo/app/src/main/res/drawable/ic_image.xml
  • Demo/app/src/main/res/drawable/ic_info.xml
  • Demo/app/src/main/res/drawable/ic_line_shader.xml
  • Demo/app/src/main/res/drawable/ic_link_logo.xml
  • Demo/app/src/main/res/drawable/ic_male.xml
  • Demo/app/src/main/res/drawable/ic_market.xml
  • Demo/app/src/main/res/drawable/ic_mastercard.xml
  • Demo/app/src/main/res/drawable/ic_menu.xml
  • Demo/app/src/main/res/drawable/ic_next.xml
  • Demo/app/src/main/res/drawable/ic_notification.xml
  • Demo/app/src/main/res/drawable/ic_other_gender.xml
  • Demo/app/src/main/res/drawable/ic_paperplane.xml
  • Demo/app/src/main/res/drawable/ic_pause.xml
  • Demo/app/src/main/res/drawable/ic_pause_outlined.xml
  • Demo/app/src/main/res/drawable/ic_pen.xml
  • Demo/app/src/main/res/drawable/ic_play.xml
  • Demo/app/src/main/res/drawable/ic_play_outlined.xml
  • Demo/app/src/main/res/drawable/ic_previous.xml
  • Demo/app/src/main/res/drawable/ic_profile.xml
  • Demo/app/src/main/res/drawable/ic_remove.xml
  • Demo/app/src/main/res/drawable/ic_right_arrow.xml
  • Demo/app/src/main/res/drawable/ic_rose_logo.xml
  • Demo/app/src/main/res/drawable/ic_search.xml
  • Demo/app/src/main/res/drawable/ic_splash.xml
  • Demo/app/src/main/res/drawable/ic_swap.xml
  • Demo/app/src/main/res/drawable/ic_timezone.xml
  • Demo/app/src/main/res/drawable/ic_two_circle.xml
  • Demo/app/src/main/res/drawable/ic_up_arrow.xml
  • Demo/app/src/main/res/drawable/ic_wallet.xml
  • Demo/app/src/main/res/drawable/image_toggle.xml
  • Demo/app/src/main/res/drawable/progress_vertical.xml
  • Demo/app/src/main/res/drawable/progress_vertical_graph.xml
  • Demo/app/src/main/res/drawable/rounded_bottom_bar.xml
  • Demo/app/src/main/res/drawable/rounded_bottom_sheet.xml
  • Demo/app/src/main/res/drawable/rounded_image.xml
  • Demo/app/src/main/res/drawable/rounded_tab_layout.xml
  • Demo/app/src/main/res/drawable/rounded_toast.xml
  • Demo/app/src/main/res/drawable/rounded_transparent_background.xml
  • Demo/app/src/main/res/drawable/selected_theme.xml
  • Demo/app/src/main/res/drawable/tab_selected_background.xml
  • Demo/app/src/main/res/layout/activity_uicomponents.xml
  • Demo/app/src/main/res/layout/card_chip.xml
  • Demo/app/src/main/res/layout/card_layout.xml
  • Demo/app/src/main/res/layout/custom_toast.xml
  • Demo/app/src/main/res/layout/fragment_app_bar.xml
  • Demo/app/src/main/res/layout/fragment_button.xml
  • Demo/app/src/main/res/layout/fragment_calls.xml
  • Demo/app/src/main/res/layout/fragment_card.xml
  • Demo/app/src/main/res/layout/fragment_chat.xml
  • Demo/app/src/main/res/layout/fragment_checkbox.xml
  • Demo/app/src/main/res/layout/fragment_chip.xml
  • Demo/app/src/main/res/layout/fragment_cl_chain_bias.xml
  • Demo/app/src/main/res/layout/fragment_cl_circular.xml
  • Demo/app/src/main/res/layout/fragment_cl_guideline_barrier.xml
  • Demo/app/src/main/res/layout/fragment_cl_relative.xml
  • Demo/app/src/main/res/layout/fragment_coordinator_layout.xml
  • Demo/app/src/main/res/layout/fragment_custom_view.xml
  • Demo/app/src/main/res/layout/fragment_data_binding.xml
  • Demo/app/src/main/res/layout/fragment_date_picker.xml
  • Demo/app/src/main/res/layout/fragment_edit_text.xml
  • Demo/app/src/main/res/layout/fragment_fab.xml
  • Demo/app/src/main/res/layout/fragment_frame_layout.xml
  • Demo/app/src/main/res/layout/fragment_home.xml
  • Demo/app/src/main/res/layout/fragment_linear_layout.xml
  • Demo/app/src/main/res/layout/fragment_operations_bottom_sheet.xml
  • Demo/app/src/main/res/layout/fragment_progress_bar.xml
  • Demo/app/src/main/res/layout/fragment_radio.xml
  • Demo/app/src/main/res/layout/fragment_relative_layout.xml
  • Demo/app/src/main/res/layout/fragment_slider.xml
  • Demo/app/src/main/res/layout/fragment_snackbar.xml
  • Demo/app/src/main/res/layout/fragment_span.xml
  • Demo/app/src/main/res/layout/fragment_spinner.xml
  • Demo/app/src/main/res/layout/fragment_tab_layout.xml
  • Demo/app/src/main/res/layout/fragment_theme.xml
  • Demo/app/src/main/res/layout/fragment_time_picker.xml
  • Demo/app/src/main/res/layout/fragment_toast.xml
  • Demo/app/src/main/res/layout/name_layout.xml
  • Demo/app/src/main/res/layout/name_merge_layout.xml
  • Demo/app/src/main/res/layout/notification_layout.xml
  • Demo/app/src/main/res/layout/operations_card_layout.xml
  • Demo/app/src/main/res/layout/recent_operation_layout.xml
  • Demo/app/src/main/res/layout/theme_layout.xml
  • Demo/app/src/main/res/layout/timezone_spinner.xml
  • Demo/app/src/main/res/menu/card_bottom_navigation_items.xml
  • Demo/app/src/main/res/menu/toolbar_menu.xml
  • Demo/app/src/main/res/menu/toolbar_search_menu.xml
  • Demo/app/src/main/res/values-night/themes.xml
  • Demo/app/src/main/res/values/arrays.xml
  • Demo/app/src/main/res/values/attrs.xml
  • Demo/app/src/main/res/values/colors.xml
  • Demo/app/src/main/res/values/dimens.xml
  • Demo/app/src/main/res/values/splash.xml
  • Demo/app/src/main/res/values/strings.xml
  • Demo/app/src/main/res/values/styles.xml
  • Demo/app/src/main/res/values/themes.xml
  • Demo/gradle/wrapper/gradle-wrapper.properties

Comment thread Demo/app/build.gradle
id 'kotlin-kapt'
}

android {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 AIReviewRadar

This patch adds the kotlin-kapt plugin to the list of plugins in the build.gradle file.

The kotlin-kapt plugin is used for Kotlin annotation processing. It generates code based on annotations in your Kotlin code, which can be used for tasks such as dependency injection and database access.

There are no potential issues or errors with this change.

val searchView = searchItem.actionView as SearchView
searchView.isIconified = false
}
} No newline at end of file
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 AIReviewRadar

The code changes look good. However, there are a few things to consider:

  1. It's always a good practice to add a newline at the end of the file.
  2. The getThemeColor extension function is not used in this file. If it's not being used anywhere else in the project, it can be removed to reduce unnecessary code.

Other than that, the code looks good and should work as expected.

.replace(R.id.uiComponentsFragment, CoordinatorLayoutFragment())
.commit()
}
} No newline at end of file
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 AIReviewRadar

The code changes look good. However, there are a few things to consider:

  1. The installSplashScreen() method is only available in Android 12 and higher. If the minimum SDK version of the app is lower than 31, this method call will cause a runtime error on devices running Android versions lower than 12.

  2. The setupTheme() method sets the activity theme based on the current accent color. This may not be desirable if the app allows users to change the accent color at runtime. In that case, the theme should be set dynamically whenever the accent color changes.

  3. The setupFragment() method replaces the container view with a CoordinatorLayoutFragment. It may be useful to add some logic to determine which fragment to show based on user input or other factors.

  4. It's generally a good practice to include a newline at the end of the file.


class FrameLayoutFragment : Fragment(R.layout.fragment_frame_layout) {

} No newline at end of file
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 AIReviewRadar

The code changes look good. However, it would be better to add a newline at the end of the file to follow standard coding conventions.

Comment thread Demo/app/build.gradle

testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 AIReviewRadar

This patch adds some new dependencies to the dependencies section of the build.gradle file.

  • androidx.constraintlayout:constraintlayout:2.1.4: This is the ConstraintLayout library, which provides a flexible layout manager for Android apps.

  • androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycle_version: This is the ViewModel component of the Android Architecture Components library. It allows you to store and manage UI-related data in a lifecycle-conscious way.

  • androidx.fragment:fragment-ktx:1.5.7: This is the Fragment component of the AndroidX library. It provides a way to modularize your app's UI into reusable pieces.

  • androidx.lifecycle:lifecycle-livedata-ktx:$lifecycle_version: This is the LiveData component of the Android Architecture Components library. It allows you to observe changes to data in a lifecycle-conscious way.

  • androidx.core:core-splashscreen:1.0.1: This is the SplashScreen API, which provides a standard way to show a splash screen in your app.

  • androidx.preference:preference-ktx:1.2.0: This is the Preference component of the AndroidX library. It provides a way to manage user preferences in your app.

There are no potential issues or errors with this change.

changeVisibility()
}
}
} No newline at end of file
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 AIReviewRadar

The code changes look good and there are no potential issues related to security, logic errors, syntax errors, out of bound errors, data races, livelocks, starvation, suspension, order violation, atomicity violation, consistency, complexity, error handling, typos, or grammar.

However, it is recommended to add a newline at the end of the file to follow the convention.

selectedLanguages.remove(language)
}
}
} No newline at end of file
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 AIReviewRadar

The code changes look good. However, there are a few things that can be improved in the documentation:

  1. Add a brief description of what this fragment does and how it fits into the app.
  2. Add comments to explain the purpose of selectedLanguages and how it is used.
  3. Add comments to explain the purpose of setupListeners() and how it sets up the listeners for the checkboxes.
  4. Add comments to explain the purpose of onCheckedChanged() and how it updates the list of selected languages.

Here's an example of how the documentation could be improved:

/**
 * Fragment that displays a list of checkboxes for selecting languages.
 * The selected languages are stored in a list and can be retrieved by calling
 * `selectedLanguages`.
 */
class CheckboxFragment : Fragment(R.layout.fragment_checkbox), OnCheckedChangeListener {

    // List of selected languages
    private var selectedLanguages = mutableListOf<String>()

    ...

    /**
     * Sets up the listeners for the checkboxes and initializes the list of selected languages.
     */
    private fun setupListeners() {
        selectedLanguages.add("English")
        selectedLanguages.add("Hindi")
        binding.cbEnglish.setOnCheckedChangeListener(this)
        binding.cbHindi.setOnCheckedChangeListener(this)
        binding.cbGujarati.setOnCheckedChangeListener(this)
        binding.cbSpanish.setOnCheckedChangeListener(this)
        binding.btnSaveChanges.setOnClickListener {
            Toast.makeText(requireContext(), selectedLanguages.joinToString(), Toast.LENGTH_SHORT)
                .show()
        }
    }

    /**
     * Called when the state of a checkbox changes.
     * Updates the list of selected languages based on the state of the checkbox.
     */
    override fun onCheckedChanged(btn: CompoundButton?, isChecked: Boolean) {
        val language = when (btn) {
            binding.cbEnglish -> "English"
            binding.cbHindi -> "Hindi"
            binding.cbGujarati -> "Gujarati"
            binding.cbSpanish -> "Spanish"
            else -> ""
        }
        if (isChecked) {
            selectedLanguages.add(language)
        } else {
            selectedLanguages.remove(language)
        }
    }
}


class RelativeLayoutFragment : Fragment(R.layout.fragment_relative_layout) {

} No newline at end of file
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 AIReviewRadar

The code changes look good. However, it is recommended to add a newline at the end of the file to follow standard coding conventions.

}
}
}
} No newline at end of file
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 AIReviewRadar

The code changes look good. However, it would be better to add a comment explaining the purpose of the setupProgress() function and how it works. Additionally, it's recommended to add a newline at the end of the file.

toast.show()
}
}
} No newline at end of file
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 AIReviewRadar

The code changes look good. However, there are a few things that could be improved in the documentation:

  1. Add a brief description of what this fragment does and how it fits into the app.
  2. Add comments to explain the purpose of showSelected() function and how it works.
  3. Add comments to explain the purpose of binding.rgGender.setOnCheckedChangeListener and binding.rgHouse.setOnCheckedChangeListener and how they work.

Making these changes will make the code easier to understand for other developers who may work on this project in the future.

}
}.attach()
}
} No newline at end of file
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 AIReviewRadar

The code changes look good. However, it would be better to add a newline at the end of the file to follow standard conventions.

Toast.makeText(requireContext(), getString(R.string.nothing_selected), Toast.LENGTH_SHORT)
.show()
}
} No newline at end of file
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 AIReviewRadar

The code changes look good. However, there are a few things that could be improved in the documentation:

  1. Add a brief description of what this fragment does and what it is used for.
  2. Add comments to explain the purpose of each method and variable.
  3. Add a comment to explain why binding.spinnerBordered.setSelection(4, true) is being called.

Making these changes will make the code easier to understand and maintain.

show()
}
}
} No newline at end of file
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 AIReviewRadar

The code changes look good. The ToastFragment class has been added to the project, which sets up click listeners for buttons to show different types of toasts. It also includes a function to make and show custom toasts with an icon, text, length, and background color.

One minor suggestion is to add a newline at the end of the file to follow standard coding conventions.

viewTheme.setCardBackgroundColor(themes[position].color)
return view
}
} No newline at end of file
Copy link
Copy Markdown

@github-actions github-actions bot Jun 7, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 AIReviewRadar

The code changes look good. However, it would be better to use the ViewHolder pattern to improve performance and reduce memory usage.

Also, it's recommended to pass a non-null parent to the inflate method instead of passing null. This ensures that the view is inflated with the correct layout parameters.

Here's an updated version of the code that implements these suggestions:

class ThemeAdapter(
    private val context: Context,
    private val themes: List<Theme>
) : BaseAdapter() {

    override fun getCount(): Int = themes.size

    override fun getItem(position: Int): Any? = null

    override fun getItemId(position: Int): Long = 0

    override fun getView(position: Int, convertView: View?, parent: ViewGroup?): View {
        var view = convertView
        val holder: ViewHolder

        if (view == null) {
            view = LayoutInflater.from(context).inflate(R.layout.theme_layout, parent, false)
            holder = ViewHolder(view)
            view.tag = holder
        } else {
            holder = view.tag as ViewHolder
        }

        val theme = themes[position]
        holder.tvName.text = theme.name
        holder.viewTheme.setCardBackgroundColor(theme.color)

        return view!!
    }

    private class ViewHolder(view: View) {
        val tvName: TextView = view.findViewById(R.id.tvThemeName)
        val viewTheme: MaterialCardView = view.findViewById(R.id.cardThemeColor)
    }
}

- Custom View
- Radio Button
- Floating Action Button
- Edit Text
- Text Input Layout
- Tab bar
- View pager
- App Bar
- Relative Layout
- Linear Layout
- Frame Layout
- Chip
- Chip Group
- Constraint Layout
- Relatively
- Circular
- Chain
- Bias
- Weight
- Guideline
- Barrier
- Time Picker
- Date Picker
- Time Picker
- Progress bar
- Seek Bar
- Spinner
- Custom drop-down
- Data binding
- View binding
- merge, include with binding
- Overview of livedata
- observer & observable
- Splash screen and restrictions on android 12
- Spannable text
- Link text
- Clickable text
- Card screen design
- Operations bottom sheet
- Custom bottom sheet
- Custom Time line view
- Theme
- Complete remaining screen
- Coordinator layout
- Navigation and fragments
@Kruna1Pate1 Kruna1Pate1 force-pushed the feature/TE7-T893_UIWidgetLayout branch from 3645b6b to 7377ef8 Compare June 8, 2023 04:22
if (checked) getString(R.string.enabled_switch) else getString(R.string.disabled_switch)
}
}
} No newline at end of file
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 AIReviewRadar

The code looks good.

Please add a newline at the end of the file to follow standard conventions.

@@ -34,3 +34,4 @@ class ButtonFragment : Fragment(R.layout.fragment_button), OnClickListener {
         }
     }
 }
+

Reply with "OK" if you have made the changes.

)
}
}
} No newline at end of file
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 AIReviewRadar

The code changes look good. However, it would be better to add a newline at the end of the file to follow standard conventions.

binding.root.addTextView(spanBuilder)
}
}
} No newline at end of file
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 AIReviewRadar

The code changes look good. However, there are a few things that could be improved in the documentation:

  1. Add a brief description of what this class does and what it is used for.
  2. Add comments to explain the purpose of each method and variable.
  3. Add comments to explain what each span does and how it is applied.

These improvements will make it easier for other developers to understand and maintain this code in the future.

}
}
}
} No newline at end of file
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 AIReviewRadar

The code changes look good to me. The new code adds functionality to the existing SnackBarFragment class by setting up different types of snack bars with various options such as duration, action, anchor view, and swipeable behavior.

However, I noticed that there is no documentation provided for this class or its methods. It would be helpful to add some comments explaining what each method does and how it can be used. This will make it easier for other developers to understand and use this code in the future.

Additionally, it might be a good idea to add some error handling to the code, especially when dealing with user input. For example, if the user enters an invalid value for the duration of the snack bar, the app could crash. Adding some validation checks and error messages would improve the user experience and prevent crashes.

Overall, the code changes are good, but adding documentation and error handling would make it even better.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant