Skip to content
This repository has been archived by the owner on Jan 12, 2023. It is now read-only.

Commit

Permalink
Fixes #4068: Wraps menu item text
Browse files Browse the repository at this point in the history
  • Loading branch information
sblatz committed Jan 10, 2019
1 parent 7fb216a commit 5915d58
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

import android.graphics.drawable.Drawable;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import org.mozilla.focus.R;
Expand All @@ -20,6 +21,7 @@
super(itemView);

menuItemView = (TextView) itemView;
menuItemView.setHeight(ViewGroup.LayoutParams.WRAP_CONTENT);
}

/* package-private */ void bind(BrowserMenuAdapter.MenuItem.Default menuItem) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
package org.mozilla.focus.menu.browser

import android.view.View
import android.view.ViewGroup
import android.widget.CheckBox
import android.widget.CompoundButton

Expand All @@ -25,6 +26,7 @@ internal class RequestDesktopCheckItemViewHolder/* package */(
init {
checkbox.isChecked = fragment.session.shouldRequestDesktopSite
checkbox.setOnCheckedChangeListener(this)
checkbox.height = ViewGroup.LayoutParams.WRAP_CONTENT
}

override fun onCheckedChanged(buttonView: CompoundButton, isChecked: Boolean) {
Expand Down
3 changes: 2 additions & 1 deletion app/src/main/res/layout/menu_blocking_switch.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="@dimen/menu_blocking_switch_container_height"
android:layout_height="wrap_content"
android:minHeight="@dimen/menu_blocking_switch_container_height"
android:background="@color/browser_menu_blocking_switch_bg"
android:paddingStart="12dp"
android:paddingEnd="0dp">
Expand Down

0 comments on commit 5915d58

Please sign in to comment.