Skip to content

UI widgets and stock exchange#6

Open
Kruna1Pate1 wants to merge 2 commits intodevelopfrom
feature/ui-widgets-and-stock-exchange
Open

UI widgets and stock exchange#6
Kruna1Pate1 wants to merge 2 commits intodevelopfrom
feature/ui-widgets-and-stock-exchange

Conversation

@Kruna1Pate1
Copy link
Copy Markdown
Owner

@Kruna1Pate1 Kruna1Pate1 commented May 23, 2023

  • 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

  • KT screen

  • Market screen

  • Exchange screen

  • Custom divider

  • Add circular progress

  • App bar

  • Notification icon

  • Donut chart attrs

  • Complete design

  • Make button functional

Summary by AIReviewRadar 1.0.2

Release Notes:

  • New Feature: Added UI components such as custom views, radio buttons, and floating action buttons.
  • New Feature: Added screens for stock exchange and wallet management with corresponding view models and adapters.
  • Refactor: Updated dependencies including Material Design, Lifecycle, Fragment, and Core libraries.

"Widgets and stocks, oh my!
Our app's now soaring high.
With new features galore,
Users will surely adore.
Custom views and adapters too,
Wallets managed with a view.
Thanks to this PR,
Our app's better by far."

@Kruna1Pate1 Kruna1Pate1 requested a review from nishchal-v May 23, 2023 05:45
@github-actions
Copy link
Copy Markdown

github-actions bot commented May 23, 2023

🤖 AIReviewRadar

Thank you for letting me participate in the code review.

The pull request titled "UI widgets and stock exchange" adds a significant amount of functionality to the app, including UI components such as custom views, radio buttons, floating action buttons, and more. It also includes new screens for stock exchange and wallet management, with corresponding view models and adapters. The changes are well-organized into separate files and packages, making it easy to navigate and understand the codebase. Overall, this is a substantial and well-executed update to the app.


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 (184)

Not summarized

  • Demo/app/src/main/java/com/krunal/demo/uicomponents/SpinnerFragment.kt
  • Demo/app/src/main/java/com/krunal/demo/uicomponents/TabLayoutFragment.kt
  • Demo/app/src/main/java/com/krunal/demo/uicomponents/ThemeFragment.kt
  • Demo/app/src/main/java/com/krunal/demo/uicomponents/ToastFragment.kt
  • Demo/app/src/main/java/com/krunal/demo/uicomponents/adapters/ThemeAdapter.kt
  • 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_main.xml
  • Demo/app/src/main/res/layout/activity_stack_exchange.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/company_amount_card.xml
  • Demo/app/src/main/res/layout/custom_toast.xml
  • Demo/app/src/main/res/layout/exchange_card.xml
  • Demo/app/src/main/res/layout/exchange_layout.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_exchange.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_market.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/fragment_wallet.xml
  • Demo/app/src/main/res/layout/item_portfolio.xml
  • Demo/app/src/main/res/layout/item_share_details.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/price_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/layout/title_card.xml
  • Demo/app/src/main/res/layout/total_price_layout.xml
  • Demo/app/src/main/res/menu/card_bottom_navigation_items.xml
  • Demo/app/src/main/res/menu/stack_exchange_app_bar_menu.xml
  • Demo/app/src/main/res/menu/stack_exchange_bottom_menu.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/build.gradle
  • Demo/gradle/wrapper/gradle-wrapper.properties
🤖 AIReviewRadar
  <details>
Files not reviewed due to max files limit (199)

Not reviewed

  • Demo/app/src/main/java/com/krunal/demo/uicomponents/ButtonFragment.kt
  • Demo/app/src/main/java/com/krunal/demo/uicomponents/CheckboxFragment.kt
  • Demo/app/src/main/java/com/krunal/demo/uicomponents/ChipFragment.kt
  • Demo/app/src/main/java/com/krunal/demo/uicomponents/CoordinatorLayoutFragment.kt
  • Demo/app/src/main/java/com/krunal/demo/uicomponents/CustomViewFragment.kt
  • Demo/app/src/main/java/com/krunal/demo/uicomponents/EditTextFragment.kt
  • Demo/app/src/main/java/com/krunal/demo/uicomponents/FabFragment.kt
  • Demo/app/src/main/java/com/krunal/demo/uicomponents/FrameLayoutFragment.kt
  • Demo/app/src/main/java/com/krunal/demo/uicomponents/LinearLayoutFragment.kt
  • Demo/app/src/main/java/com/krunal/demo/uicomponents/ProgressBarFragment.kt
  • Demo/app/src/main/java/com/krunal/demo/uicomponents/RadioFragment.kt
  • Demo/app/src/main/java/com/krunal/demo/uicomponents/RelativeLayoutFragment.kt
  • Demo/app/src/main/java/com/krunal/demo/uicomponents/SliderFragment.kt
  • Demo/app/src/main/java/com/krunal/demo/uicomponents/SnackBarFragment.kt
  • Demo/app/src/main/java/com/krunal/demo/uicomponents/SpanFragment.kt
  • Demo/app/src/main/java/com/krunal/demo/uicomponents/SpinnerFragment.kt
  • Demo/app/src/main/java/com/krunal/demo/uicomponents/TabLayoutFragment.kt
  • Demo/app/src/main/java/com/krunal/demo/uicomponents/ThemeFragment.kt
  • Demo/app/src/main/java/com/krunal/demo/uicomponents/ToastFragment.kt
  • Demo/app/src/main/java/com/krunal/demo/uicomponents/adapters/ThemeAdapter.kt
  • 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_main.xml
  • Demo/app/src/main/res/layout/activity_stack_exchange.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/company_amount_card.xml
  • Demo/app/src/main/res/layout/custom_toast.xml
  • Demo/app/src/main/res/layout/exchange_card.xml
  • Demo/app/src/main/res/layout/exchange_layout.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_exchange.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_market.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/fragment_wallet.xml
  • Demo/app/src/main/res/layout/item_portfolio.xml
  • Demo/app/src/main/res/layout/item_share_details.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/price_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/layout/title_card.xml
  • Demo/app/src/main/res/layout/total_price_layout.xml
  • Demo/app/src/main/res/menu/card_bottom_navigation_items.xml
  • Demo/app/src/main/res/menu/stack_exchange_app_bar_menu.xml
  • Demo/app/src/main/res/menu/stack_exchange_bottom_menu.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/build.gradle
  • Demo/gradle/wrapper/gradle-wrapper.properties

// Update time without data binding
CoroutineScope(Dispatchers.IO).launch {
viewModel.timeFlow.collectLatest { time ->
runOnUiThread {
Copy link
Copy Markdown

@github-actions github-actions bot May 23, 2023

Choose a reason for hiding this comment

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

🤖 AIReviewRadar

The changes in this patch look good.

However, it would be better to add a comment explaining the purpose of binding.mainViewModel = viewModel for future developers who may work on this code.

Other than that, I don't see any issues with this patch.

@@ -12,15 +12,18 @@ import kotlinx.coroutines.launch
 
 class MainActivity : AppCompatActivity() {
 
-    lateinit var binding: ActivityMainBinding
-    lateinit var mPlayer: MediaPlayer
+    private lateinit var binding: ActivityMainBinding
+    private lateinit var mPlayer: MediaPlayer
     private val viewModel: MainActivityViewModel by viewModels()
     override fun onCreate(savedInstanceState: Bundle?) {
         super.onCreate(savedInstanceState)
-
         binding = ActivityMainBinding.inflate(layoutInflater)
 
         setContentView(binding.root)
+
+        // Set up view model for data binding
+        binding.mainViewModel = viewModel
+
+        // Update time without data binding
         CoroutineScope(Dispatchers.IO).launch {
             viewModel.timeFlow.collectLatest { time ->
                 runOnUiThread {

Please add a comment explaining the purpose of binding.mainViewModel = viewModel.


data class ExchangeModel(
val exchange: ShareDetails, val receive: ShareDetails, val transactionCost: Float
)
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 change looks good. However, it would be helpful to add some documentation to the ExchangeModel class and its properties to explain their purpose and usage. This will make it easier for other developers to understand the code and use it correctly.

"185.701,18"
)
}
}
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 use a numeric data type instead of a string for the amount, amountDiff, diffPercentage, and maxValue properties. This will make it easier to perform arithmetic operations on these values in the future. Additionally, it would be helpful to add comments explaining the purpose of each property and the dummyWallet companion object.

)
)
}
}
Copy link
Copy Markdown

@github-actions github-actions bot May 23, 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, there are a few things to consider:

  1. It is recommended to use @DrawableRes annotation for drawable resources to avoid potential crashes due to resource type mismatch.

  2. The dummyData list should be used with caution as it may not reflect the actual data that will be used in production. It is better to have a separate class or method to generate test data.

Other than that, the code looks good and follows the best practices.

private const val DEFAULT_RADIUS = -1F
private const val CHART_PADDING = 100F
}
} 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 potential issues that could be addressed:

  1. Security: There are no security issues in this code.

  2. Logic errors: There are no logic errors in this code.

  3. Syntax errors: There are no syntax errors in this code.

  4. Out of bound errors: There are no out of bound errors in this code.

  5. Data races: There are no data races in this code.

  6. Livelocks, starvation, suspension: There are no concurrency issues in this code.

  7. Order violation: There are no order violations in this code.

  8. Atomicity violation: There are no atomicity violations in this code.

  9. Consistency: There are no consistency issues in this code.

  10. Complexity: The complexity of this code is reasonable and does not need to be reduced.

  11. Error handling: There is no error handling in this code. It may be useful to add some error handling for cases where the values or colors lists are empty.

  12. Typos, grammar: There are no typos or grammar issues in this code.

Bump version
- 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

- KT screen
- Market screen
- Exchange screen
- Custom divider
- Add circular progress
- App bar
- Notification icon
- Donut chart attrs
- Complete design
- Make button functional
@Kruna1Pate1 Kruna1Pate1 force-pushed the feature/ui-widgets-and-stock-exchange branch from 7e62530 to 9ed4302 Compare May 23, 2023 06:44
shareDetailsList.addAll(list)
notifyDataSetChanged()
}
} 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 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 is recommended to add a newline at the end of the file to follow common coding practices.


data class TitleCardModel(
val textBeforeAmount: String, val amount: Float, val textAfterAmount: String
) 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 patch looks good. Just one minor comment, please add a newline at the end of the file.

@@ -0,0 +1,6 @@
+package com.krunal.demo.stackexchange.models
+
+data class TitleCardModel(
+    val textBeforeAmount: String, 
+    val amount: Float, 
+    val textAfterAmount: String
+)


@JvmStatic
fun euroFormat(number: Float): String = formatter.format(number).removeSuffix("€")
} 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 Locale.GERMANY is hardcoded in the implementation. It might be better to make it configurable so that it can be changed easily if needed.

  2. The function euroFormat takes a Float as input. It might be better to use Double instead since it has a higher precision.

  3. The function removeSuffix("€") assumes that the currency symbol is always "€". This may not be true for all locales. It might be better to make this configurable as well.

  4. It's recommended to add a newline at the end of the file.

Other than these minor points, the code looks good.

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.

// Draw right progress
canvas.drawLine(width - progress, centerPositionY, width.toFloat(), centerPositionY, progressPaint)
}
} 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 how it is used.
  2. Document the constructor parameters and their default values.
  3. Explain the purpose of each attribute and its default value.
  4. Clarify the purpose of lineHeight and how it affects the appearance of the divider.

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

/**
 * A custom view that displays a horizontal divider with progress bars on both sides.
 *
 * This view can be used to visually separate content in a layout and indicate progress
 * towards a goal. The divider consists of a solid line in the background and two progress
 * bars on either side of the center. The progress bars can be customized with different
 * colors and thicknesses.
 *
 * @param context The context in which this view is created.
 * @param attrs An AttributeSet containing attributes to customize the appearance of this view.
 * @param defStyleAttr An attribute style resource to apply to this view.
 */
class Divider @JvmOverloads constructor(
    context: Context,
    attrs: AttributeSet? = null,
    defStyleAttr: Int = R.attr.dividerStyle,
) : View(context, attrs, defStyleAttr) {

    // Default values for attributes
    private var lineHeight = 5F
    private var progressColor = Color.RED
    private var backgroundColor = context.getThemeColor(com.google.android.material.R.attr.colorSurfaceDim)
    private var progress = 6F

    // Paint objects for drawing the divider
    private val progressPaint: Paint = Paint(Paint.ANTI_ALIAS_FLAG)
    private val backgroundPaint: Paint = Paint(Paint.ANTI_ALIAS_FLAG)

    // Y position of the center of the divider
    private var centerPositionY: Float = 5F

    init {
        // Load attributes from XML
        setupAttributes(attrs, defStyleAttr)

        // Set up paint objects for drawing the divider
        setupPaint()
    }

    /**
     * Sets up the paint objects for drawing the divider.
     */
    private fun setupPaint() {
        progressPaint.apply {
            color = progressColor
            strokeWidth = lineHeight
            style = Paint.Style.STROKE
            strokeCap = Paint.Cap.ROUND
        }

        backgroundPaint.apply {
            color = backgroundColor
            strokeWidth = lineHeight
            style = Paint.Style.STROKE
            strokeCap = Paint.Cap.ROUND
        }
    }

    /**
     * Loads custom attributes from XML and sets their values.
     *
     * @param attrs An AttributeSet containing attributes to customize the appearance of this view.
     * @param defStyle An attribute style resource to apply to this view.
     */
    private fun setupAttributes(attrs: AttributeSet?, defStyle: Int) {
        context.theme.obtainStyledAttributes(attrs, R.styleable.Divider, defStyle, 0).apply {
            backgroundColor = getColor(R.styleable.Divider_backgroundColor, backgroundColor)
            progressColor = getColor(R.styleable.Divider_progressColor, progressColor)
            progress = getDimension(R.styleable.Divider_progress, progress)
            lineHeight = getDimension(R.styleable.Divider_lineHeight, lineHeight)
            recycle()
        }
    }

    override fun onDraw(canvas: Canvas) {
        centerPositionY = height / 2F
        drawBackground(canvas)
        drawProgress(canvas)

        super.onDraw(canvas)
    }

    override fun onMeasure(widthMeasureSpec: Int, heightMeasureSpec: Int) {
        setMeasuredDimension(widthMeasureSpec, lineHeight.toInt())
    }

    /**
     * Draws the solid line in the background of the divider.
     *
     * @param canvas The canvas on which to draw the line.
     */
    private fun drawBackground(canvas: Canvas) {
        canvas.drawLine(0f, centerPositionY, width.toFloat(), centerPositionY, backgroundPaint)
    }

    /**
     * Draws the progress bars on either side of the divider.
     *
     * @param canvas The canvas on which to draw the progress bars.
     */
    private fun drawProgress(canvas: Canvas) {
        // Draw left progress
        canvas.drawLine(0f, centerPositionY, progress, centerPositionY, progressPaint)

        // Draw right progress
        canvas.drawLine(width - progress, centerPositionY, width.toFloat(), centerPositionY, progressPaint)
    }
}

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