android - Is it ok to use setContentView() once in OnResume() -
i have heard things how bad use setcontentview() pattern "one activity, multiple views": advantages , disadvantages however wondering, unlikely application cause memory leaks, if use setcontentview() once in onresume() method of activity? whenever user opens app, checks see if has been enabled in settings. if has been enabled app uses different screen compared original screen. therefor code looks this: @override protected void onresume() { super.onresume(); inputmethodmanager im = (inputmethodmanager)getsystemservice(input_method_service); string list = im.getenabledinputmethodlist().tostring(); if(stuff true){ setcontentview(r.layout.activityscreen_enabled); } } } would using setcontentview() unlikely cause memory leaks , other such problems? or there better solution? i'm doing android since few years , have never done because stick pattern having setcontentview in oncreate . however, not ...