mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 998426 - Ensure shrunken toolbar consistency across API levels. r=wesj
This commit is contained in:
parent
a8d40c0ff2
commit
2421cb59dc
@ -50,6 +50,7 @@ import android.view.LayoutInflater;
|
||||
import android.view.MenuInflater;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.animation.AccelerateInterpolator;
|
||||
import android.view.animation.Interpolator;
|
||||
import android.view.inputmethod.InputMethodManager;
|
||||
@ -190,7 +191,10 @@ public class BrowserToolbar extends ThemedRelativeLayout
|
||||
urlEditLayout = (ToolbarEditLayout) findViewById(R.id.edit_layout);
|
||||
|
||||
urlBarEntryDefaultLayoutParams = (RelativeLayout.LayoutParams) urlBarEntry.getLayoutParams();
|
||||
urlBarEntryShrunkenLayoutParams = new RelativeLayout.LayoutParams(urlBarEntryDefaultLayoutParams);
|
||||
// API level 19 adds a RelativeLayout.LayoutParams copy constructor, so we explicitly cast
|
||||
// to ViewGroup.MarginLayoutParams to ensure consistency across platforms.
|
||||
urlBarEntryShrunkenLayoutParams = new RelativeLayout.LayoutParams(
|
||||
(ViewGroup.MarginLayoutParams) urlBarEntryDefaultLayoutParams);
|
||||
urlBarEntryShrunkenLayoutParams.addRule(RelativeLayout.ALIGN_RIGHT, R.id.edit_layout);
|
||||
urlBarEntryShrunkenLayoutParams.rightMargin = 0;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user