Fixed
Status Update
Comments
ap...@google.com <ap...@google.com> #2
I proposed this which I think it is better than the actual behavior, and could let the developers work with more room to be creative.
https://code.google.com/p/android/issues/detail?id=58318
ap...@google.com <ap...@google.com> #4
In Custom Notification Layouts section of the Notification API Guides, it states: "The height available for a custom notification layout depends on the notification view. Normal view layouts are limited to 64 dp, and expanded view layouts are limited to 256 dp". I guess it means the width is 512 dp and the height is 256 dp (if following the 2:1 aspect ratio)?
http://developer.android.com/guide/topics/ui/notifiers/notifications.html#CustomNotification
Description
Component used: Fragment
StrictMode
We should build the same type of infrastructure for Fragments so that developers can enable runtime checking for bad behaviors and validate that they (or libraries they depend on) aren't using deprecated APIs or known potential problematic behaviors.
Importantly, this should only be as a second line of defense behind deprecation warnings or Lint warnings to catch these issues at build time or to handle cases where third party libraries / dependencies are triggering these behaviors so that bugs can be filed against them.
We should support at least
penaltyLog()
,penaltyDeath()
, andpenaltyListener()
.Given that we should maintain behavior compatibility, we should not add any
enableDefaults()
ordetectAll()
methods and instead have developers opt into exactly thedetect***()
methods they want. This should also remove the need forpermit***()
methods since they'll all default to off.Ideally, this is something that developers can either:
Set globally via
FragmentStrictMode.setDefaultPolicy(FragmentStrictMode.Policy)
Set on a specific
FragmentManager
(and its childrenFragmentManager
s) viafragmentManager.setStrictModePolicy(FragmentStrictMode.Policy)
(this would override the default policy)This API shouldn't be made public until there is at least two
detect***()
calls added. These will be filed as separate issues.