c# - Xamarin Android: Recent Apps and Activities -




i've been developing first xamarin android app in c# few weeks. approach @ separating different aspects of app each other have multiple activities: 1 login 1 main menu 1 settings ...

while navigating through app noticed each activity opened shown under recent apps. counter started finishing current activity before launching new 1 using intent aswell overwriting onbackpressed in each activity control activity loaded next.

is bad design? how usual apps 1 know behave? never noticed app listed multiple times under recent apps feel wrong. state of art have 1 activity , handle fragments?

this question difficult answer, there advantages , drawbacks of both strategies.

in essence, people prefer use fragments nowadays multiple reasons:

  • activities more memory intensive,
  • it easier handle navigation stack using fragmentmanager
  • fragments adaptable both phone , tables
  • compared activities, fragments easier re-use
  • a fragment cannot exist on own, must part of activity
  • fragments although more complex implement compared activities

in end, strategy decide use. pointed out yourself, activities show in list of recent applications. won't case when using fragments.





wiki

Comments

Popular posts from this blog

Asterisk AGI Python Script to Dialplan does not work -

python - Read npy file directly from S3 StreamingBody -

kotlin - Out-projected type in generic interface prohibits the use of metod with generic parameter -