From 60de48a04f35b8e6dfa242dd264f6a2e0f24a2f8 Mon Sep 17 00:00:00 2001 From: samartnik Date: Thu, 20 Aug 2020 12:53:37 -0400 Subject: [PATCH] [Android] Added new view for new tab page This is is to avoid null pointer exception Chromium change: https://chromium.googlesource.com/chromium/src/+/efb886565e933f36643147e9c9ee7ce19dc17bce Cryptids: Injecting view into NTP logo space This adds a GIF view that will eventually be used for cryptid rendering. The general approach is: * The existing logo is wrapped in a FrameLayout with a new ViewStub. * When we get a callback indicating that no doodle is present, the NTP requests a drawable from the PCR and injects it into an ImageView inflated from the ViewStub. Out-of-scope for this CL is to actually populate the GIF image data; I have been testing locally with a res/raw file read into a byte array. Change-Id: Ib5deae5322856c9d8e8a68f0fd46cdb2aaadbe79 Bug: 1061949 --- .../java/res/layout/new_tab_page_layout.xml | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/android/java/res/layout/new_tab_page_layout.xml b/android/java/res/layout/new_tab_page_layout.xml index f54a03dacc3..e6043fac3f0 100644 --- a/android/java/res/layout/new_tab_page_layout.xml +++ b/android/java/res/layout/new_tab_page_layout.xml @@ -48,6 +48,30 @@ + + + + + + + +