Skip to content

OnClick() does not trigger when implement OnClickListener for Button in HMOS #83

@kanaksony

Description

@kanaksony

Describe the bug
Overriden method onClick() does not trigger when implement OnClickListener for default Button component

Background Scenario:
With the Current SDK Version, whenever a developer needs a button with some functionality to execute in overridden method onClick() action, s/he need to perform the following steps mentioned under steps to reproduce:

Steps to reproduce the behavior:

  1. Define a button component either in XML or in java code
  2. Implement onClickListener and set the same in java code
  3. Add some functionality in the listener implementation

Expected behavior
Functionality added in step 3 must be executed immediately after following all above steps

Current Behavior:
Functionality added in step 3 doesn't get executed because by default clickable property of Button is not set as true

Possible Resolution:
By default clickable property of the Button must be set as true

Additional information

Developer Platform: Windows
DevEco Studio version: 2.1.0.501
SDK API version: 5
SDK version: 2.1.1.21
Device: Simulator and device both

--
Regards,
Kanak Sony

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions