0

I am working on an instant app demo app. I used the default template which I extended with a RecyclerView and a custom adapter. My problem is that my layout is totally broken:

Same app

As you see the toolbar is the same, but something does not work correctly regarding the coordinator layout. The floating action button is missing and the navigation drawer is not displayed below the system UI (the notification area) and yep of cause the menu is empty.

The both screens are debug builds so proguard is not messing anything up (I got also release working with proguard, but of cause I still have the same issue). On the left is the result of the gradle task :app:assembleDebug and on the right :instantapp:assembleDebug.

Since I use except of the recycler view the default template for this app I add no code, any idea why my layout is broken in instant apps?

rekire
  • 47,260
  • 30
  • 167
  • 264

1 Answers1

0

Please follow these steps and you should be good to go! https://developer.android.com/topic/instant-apps/getting-started/first-instant-app.html

Note : Please select Navigation Drawer Activity in Step 8

From the shared image, it looks like you have modified some code from the default Navigation Drawer Activity for your IA. If yes, please share the code to investigate.

Also, let me know the device/emulator and the Android studio you are using. I was not able to reproduce the issue with Studio version 3.0.1 on Nexus 5x (Android version 8.0.1). Following is the image of the instant app from my nexus 5x with 8.0.1 build. Let me know if I am missing something! enter image description here

Android4Fun
  • 570
  • 4
  • 18
  • I'm using a Pixel 2 with Android 8.1. I did not touch the navigation bar code and resources, if you mean the square vs round icon that seems to be a device specific thing. Just for sure you deployed the instantApp and not the app? – rekire Feb 14 '18 at 07:09
  • Yes I deployed the instant app. Could you check the default Navigation Drawer Activity and deploy the IA and let us know if there is a problem. – Android4Fun Feb 14 '18 at 23:24
  • I have an idea: I have the "shared" dependencies in the base package. So I guess you don't have in the base module this dependency: `api "com.android.support:support-media-compat:27.0.2"` – rekire Feb 16 '18 at 08:30