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.

Can't extend Activities. #265

Copy link
Copy link
@renaudcerrato

Description

@renaudcerrato
Issue body actions

Hi there!

For my application, I need 2 activities :

  • A classical one, for Tablets, using AA.
  • The second one, for Phone, using the "android:configChanges" attribute (to avoid application restart on orientation change).

Both will share the same code, excepted the 2nd one which will handle "onConfigurationChange" by itself.
Since we can't duplicate activities in the Manifest, my plan was to extends the first one :

class MyPhoneActivity extends MyTabletActivity_ { ... }

BUT, using @EActivity on MyTabletActivity, the generated class is final!

Is there any workaround possible, that's really frustrating!

(To those asking why I'm not using the same activity for both tablets and phone : the phone activity has the same layout in both portrait and landscape, while the tablet activity have different one. Thus, application restarting is useless concerning phone. Even more considering that handling configuration change is the ONLY way to keep webviews state.)

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.