0

Android documentation encourages to use Fragment Dialogs on older versions of ADT by adding the support library. It claims that just using Dialogs can issue some memory problems. However when I added support library to my project it increased my footprint from 400K to 700k, so my application is just same size as the support library. It was a price to just show one simple dialog. So question is really I have to sacrifice my application footprint by adding the library because Dialog implementation has real problems, and in this case I had to do that, or I can live with standard dialogs implementation? Attention to moderators, it isn't duplication of How Android Support Library work? since I am asking of an impact not using fragment dialogs and the support library on an application stability.

Community
  • 1
  • 1
user2305886
  • 784
  • 8
  • 18

1 Answers1

0

I think if you are only running API 10 and lower, but nothing higher, you might not want to add the support library. Seeing as you won't be using anything else (I'm guessing here from what you are saying), the footprint might not be worth it. The support library is meant for backwards compatibility, and since your intent is not to do that, remove it and use plain old Dialogs. If they are not deprecated then I don't see why not. Just make sure there are no performance issues (which is my guess as to why the doc encourages the use of the DialogFragment).

That being said is there any reason you are designing an app like that (pre honeycomb only app)? You really should be using Fragments. If you really don't want to use the support library, then design your app for API 12 and up. Not supporting older versions is more viable solution nowadays (if the adoption metrics mean anything). Plus its tried and true, so you will encounter less problems with the support (no pun intended) around it.

Andy
  • 10,553
  • 21
  • 75
  • 125
  • Unfortunately there are plenty of Android 2.3.x cheap phones on market. Needless to say many young people carry them since can't afford much more expensive devices, so I can't move to higher version of ADT yet. My concern was if dealing with Dialogs may bring me to address some bugs, since I have already implemented few workarounds fixing some 2.3.x bugs. – user2305886 Feb 04 '14 at 02:41
  • Well I dont know about the bugs, but adding DialogFragment in theory would fix some bugs since its continually being supported for older versions. I do not know about specifics though. That being said, if the lowest api level you need to support is 1.6, use the support library to start supporting post honeycomb hardware as well. – Andy Feb 04 '14 at 02:52