Removed superfluous method
This commit is contained in:
parent
4c75b9ffb5
commit
2044d89c05
@ -167,7 +167,7 @@ public class BrowserActivity extends Activity implements BrowserController {
|
|||||||
new int[] { android.R.attr.actionBarSize });
|
new int[] { android.R.attr.actionBarSize });
|
||||||
mActionBarSize = (int) styledAttributes.getDimension(0, 0);
|
mActionBarSize = (int) styledAttributes.getDimension(0, 0);
|
||||||
if (pixelsToDp(mActionBarSize) < 48) {
|
if (pixelsToDp(mActionBarSize) < 48) {
|
||||||
mActionBarSize = getDp(48);
|
mActionBarSize = Utils.convertToDensityPixels(mContext, 48);
|
||||||
}
|
}
|
||||||
mActionBarSizeDp = pixelsToDp(mActionBarSize);
|
mActionBarSizeDp = pixelsToDp(mActionBarSize);
|
||||||
styledAttributes.recycle();
|
styledAttributes.recycle();
|
||||||
@ -1378,16 +1378,6 @@ public class BrowserActivity extends Activity implements BrowserController {
|
|||||||
openBookmarks();
|
openBookmarks();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* converts the int num into density pixels
|
|
||||||
*
|
|
||||||
* @return density pixels
|
|
||||||
*/
|
|
||||||
private int getDp(int num) {
|
|
||||||
float scale = getResources().getDisplayMetrics().density;
|
|
||||||
return (int) (num * scale + 0.5f);
|
|
||||||
}
|
|
||||||
|
|
||||||
private int pixelsToDp(int num) {
|
private int pixelsToDp(int num) {
|
||||||
float scale = getResources().getDisplayMetrics().density;
|
float scale = getResources().getDisplayMetrics().density;
|
||||||
return (int) ((num - 0.5f) / scale);
|
return (int) ((num - 0.5f) / scale);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user