8000 [edited] @Extra fields should be updated when setIntent() is called · Issue #166 · androidannotations/androidannotations · GitHub
[go: up one dir, main page]

Skip to content
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.

[edited] @Extra fields should be updated when setIntent() is called #166

@Brimstedt

Description

@Brimstedt

Hello

Im using notifications to launch an activity and in this activity I have used the @extra annotation to inject my extras.

Example:

@ViewById(R.id.server)
TextView serverView;

@Extra(SERVER)
String server;

@AfterViews
protected void afterViews()
{
    serverView.setText(server);
}

@Override
protected void onPostResume()
{
    super.onPostResume();
    serverView.setText(server);
}

However, my serverView is never updated with new text during the PostResume, unless I also add:

@Override
protected void onNewIntent(Intent intent)
{
    super.onNewIntent(intent);
    server = intent.getStringExtra(TITLE);
}

Shouldnt this updating be done automatically be androidannotation?

br

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0