Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
This repository was archived by the owner on Feb 26, 2023. It is now read-only.
This repository was archived by the owner on Feb 26, 2023. It is now read-only.

EView's onDetachedFromWindow call super.onAttachedToWindow not super.onDetachedFrom Window #2056

Copy link
Copy link
@RobinLJB

Description

@RobinLJB
Issue body actions

I found a bug that when I create an EView and I overwrite onDetachedFromWindow method.

Then, the generated Class's onDetachedFromWindow method will call super.onAttachedToWindow
instead of super.onDetachedFromWindow .

so, I lookup the package "androidannotations-4.3.0.jar" and found that ,
in this class org.androidannotations.holder.EViewHolder
source code

then I fixed this method and change onAttachedToWindowMethod to onDetachedFromWindowMethod locally and it worked

AndroidAnnotations version: 4.3

Android compile SDK version: 26.0.1

your code
@OverRide
protected void onDetachedFromWindow() {
bus.unregister(this);
super.onDetachedFromWindow();
}

Expected generated code:
@OverRide
public void onDetachedFromWindow() {
getContext().unregisterReceiver(onActionDiscoveryStartedReceiver_);
getContext().unregisterReceiver(onActionDiscoveryFinishedReceiver_);
getContext().unregisterReceiver(onActionStateChangedReceiver_);
super.onDetachedFromWindow();
}

Actual generated code:
@OverRide
public void onDetachedFromWindow() {
getContext().unregisterReceiver(onActionDiscoveryStartedReceiver_);
getContext().unregisterReceiver(onActionDiscoveryFinishedReceiver_);
getContext().unregisterReceiver(onActionStateChangedReceiver_);
super.onAttachedToWindow();
}

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.