mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-04 18:06:48 +00:00
Ensuring that we use the screen width more optimally in AllApps.
- Fixing issue with prediction bar height being calculated incorrectly - Fixing issue where the prediction bar divider was not drawn exactly between the bar and the first row of apps - Removing padding to allow scrollbars to reach full height Bug: 20222023 Bug: 21335377 Change-Id: I2c0614a36e2294d0d6184a6bff4847876ffe971e
This commit is contained in:
@@ -54,7 +54,6 @@ import android.util.SparseArray;
|
||||
import android.util.TypedValue;
|
||||
import android.view.View;
|
||||
import android.widget.Toast;
|
||||
|
||||
import junit.framework.Assert;
|
||||
|
||||
import java.io.ByteArrayOutputStream;
|
||||
@@ -625,6 +624,16 @@ public final class Utilities {
|
||||
return m.replaceAll("$1");
|
||||
}
|
||||
|
||||
/**
|
||||
* Calculates the height of a given string at a specific text size.
|
||||
*/
|
||||
public static float calculateTextHeight(float textSizePx) {
|
||||
Paint p = new Paint();
|
||||
p.setTextSize(textSizePx);
|
||||
Paint.FontMetrics fm = p.getFontMetrics();
|
||||
return -fm.top + fm.bottom;
|
||||
}
|
||||
|
||||
@TargetApi(Build.VERSION_CODES.JELLY_BEAN_MR1)
|
||||
public static boolean isRtl(Resources res) {
|
||||
return (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) &&
|
||||
|
||||
Reference in New Issue
Block a user