Bug 1562301: Stop URL bar hiding tab switcher in GVE. r=geckoview-reviewers,agi

The URL bar was expanding to cover the tab switcher button, meaning that a new tab could not be navigated to after opening.

This is needed so that members of the Gecko media team can replicate an issue in GVE that causes images not to be displayed in Fenix.

Differential Revision: https://phabricator.services.mozilla.com/D39678

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Emily Toop 2019-07-29 15:40:20 +00:00
Родитель 6b02e56439
Коммит 8a99fa75f8
1 изменённых файлов: 3 добавлений и 7 удалений

Просмотреть файл

@ -1,10 +1,8 @@
package org.mozilla.geckoview_example;
import android.content.Context;
import android.graphics.Color;
import android.graphics.Typeface;
import android.support.v4.content.ContextCompat;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.LinearLayout;
@ -28,22 +26,20 @@ public class ToolbarLayout extends LinearLayout {
}
private void initView() {
setLayoutParams(new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT));
setLayoutParams(new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT, 1.0f));
setOrientation(LinearLayout.HORIZONTAL);
mLocationView = new LocationView(getContext());
mLocationView.setLayoutParams(new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.MATCH_PARENT, 1.0f));
mLocationView.setId(R.id.url_bar);
mLocationView.setPadding(11, 27,71, 27);
addView(mLocationView);
mTabsCountButton = getTabsCountButton();
addView(mTabsCountButton);
updateTabCount();
}
private Button getTabsCountButton() {
Button button = new Button(getContext());
button.setLayoutParams(new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.MATCH_PARENT));
button.setLayoutParams(new LayoutParams(150, LayoutParams.MATCH_PARENT));
button.setId(R.id.tabs_button);
button.setOnClickListener(this::onTabButtonClicked);
button.setBackground(ContextCompat.getDrawable(getContext(), R.drawable.tab_number_background));