AndroidX Webkit: medium interstitials in test app
This adds two variants of medium-sized interstitials to the testapp:
"tall" and "wide". The layout is constructed at runtime to avoid
building two very similar XML files that must stay in-sync.
This includes small cleanups to related parts of the code.
Bug: 124773936
Test: manual
Change-Id: I471e837ced9faad90274e2bdfd3ac457aceeae4e
diff --git a/webkit/integration-tests/testapp/src/main/java/com/example/androidx/webkit/SafeBrowsingActivity.java b/webkit/integration-tests/testapp/src/main/java/com/example/androidx/webkit/SafeBrowsingActivity.java
index 2d2385d..6d7d8b4 100644
--- a/webkit/integration-tests/testapp/src/main/java/com/example/androidx/webkit/SafeBrowsingActivity.java
+++ b/webkit/integration-tests/testapp/src/main/java/com/example/androidx/webkit/SafeBrowsingActivity.java
@@ -67,6 +67,14 @@
new MenuListView.MenuItem(
getResources().getString(R.string.small_interstitial_activity_title),
new Intent(activityContext, SmallInterstitialActivity.class)),
+ new MenuListView.MenuItem(
+ getResources().getString(R.string.medium_wide_interstitial_activity_title),
+ new Intent(activityContext, MediumInterstitialActivity.class)
+ .putExtra(MediumInterstitialActivity.LAYOUT_HORIZONTAL, false)),
+ new MenuListView.MenuItem(
+ getResources().getString(R.string.medium_tall_interstitial_activity_title),
+ new Intent(activityContext, MediumInterstitialActivity.class)
+ .putExtra(MediumInterstitialActivity.LAYOUT_HORIZONTAL, true)),
};
listView.setItems(menuItems);
}