Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-19766] Android: Modifying current/root activity's content view in app.js gets overwritten by default layout

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2015-10-26T15:01:13.000+0000
Affected Version/sRelease 5.2.0
Fix Version/sRelease 5.4.0
ComponentsAndroid, Hyperloop
Labelsn/a
ReporterChristopher Williams
AssigneeChristopher Williams
Created2015-10-22T17:50:39.000+0000
Updated2016-07-15T18:12:25.000+0000

Description

By default the Android TiBaseActivity will basically load app.js and then set a default layout. When the runtime is executed async (on the runtime thread) then this layout gets set before the user has time to modify the content view. If not using hyperloop, you have no ability to modify the content view. So this issue is specific to hyperloop when running on the UI thread. We should avoid overwriting with a default layout if the user's app has set the content view on the activity.

Comments

  1. Christopher Williams 2015-10-22

    https://github.com/appcelerator/titanium_mobile/pull/7333
  2. Christopher Williams 2016-02-03

    For QE: This was a change made in the SDK to avoid a bug seen only when using hyperloop. From the SDK standpoint the "test" is just to make sure I didn't break loading app.js (i.e. an app still runs) This bug manifested itself if you used hyperloop and called setContentView() on Ti.Activity.currentActivity in your app.js with a custom view. Before the fix it wouldn't show your custom view, it'd show default content because of load order/timing fixed by this ticket.
  3. Lokesh Choudhary 2016-07-15

    Verified that an app.js loads fine when an app is run. Closing. Environment: Appc Studio : 4.7.0.201607111053 Ti SDK : 5.4.0.v20160713141635 Ti CLI : 5.0.9 Alloy : 1.9.1 MAC El Capitan : 10.11.5 Appc NPM : 4.2.8-1 Appc CLI : 5.4.0-33 Node: 4.4.4 Nexus 6 - Android 6.0.1

JSON Source