sdm660-common: DeviceSettings: FPS Info: Redesign FPS Info
This commit is contained in:
parent
cf39246739
commit
d645cc4e2b
1 changed files with 6 additions and 6 deletions
|
@ -90,19 +90,19 @@ public class FPSInfoService extends Service {
|
||||||
FPSView(Context c) {
|
FPSView(Context c) {
|
||||||
super(c);
|
super(c);
|
||||||
float density = c.getResources().getDisplayMetrics().density;
|
float density = c.getResources().getDisplayMetrics().density;
|
||||||
int paddingPx = Math.round(5 * density);
|
int paddingPx = Math.round(10 * density);
|
||||||
setPadding(paddingPx, paddingPx, paddingPx, paddingPx);
|
setPadding(paddingPx, paddingPx, paddingPx, paddingPx);
|
||||||
setBackgroundColor(Color.argb(0x60, 0, 0, 0));
|
setBackgroundColor(Color.argb(0x0, 0, 0, 0));
|
||||||
|
|
||||||
final int textSize = Math.round(12 * density);
|
final int textSize = Math.round(20 * density);
|
||||||
|
|
||||||
Typeface typeface = Typeface.create("sans-serif-condensed", Typeface.BOLD);
|
Typeface typeface = Typeface.create("google-sans", Typeface.BOLD);
|
||||||
|
|
||||||
mOnlinePaint = new Paint();
|
mOnlinePaint = new Paint();
|
||||||
mOnlinePaint.setTypeface(typeface);
|
mOnlinePaint.setTypeface(typeface);
|
||||||
mOnlinePaint.setAntiAlias(true);
|
mOnlinePaint.setAntiAlias(true);
|
||||||
mOnlinePaint.setTextSize(textSize);
|
mOnlinePaint.setTextSize(textSize);
|
||||||
mOnlinePaint.setColor(Color.WHITE);
|
mOnlinePaint.setColor(Color.YELLOW);
|
||||||
mOnlinePaint.setShadowLayer(5.0f, 0.0f, 0.0f, Color.BLACK);
|
mOnlinePaint.setShadowLayer(5.0f, 0.0f, 0.0f, Color.BLACK);
|
||||||
|
|
||||||
mAscent = mOnlinePaint.ascent();
|
mAscent = mOnlinePaint.ascent();
|
||||||
|
@ -163,7 +163,7 @@ public class FPSInfoService extends Service {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
int neededWidth = mPaddingLeft + mPaddingRight + mMaxWidth;
|
int neededWidth = mPaddingLeft + mPaddingRight + mMaxWidth + 40;
|
||||||
int neededHeight = mPaddingTop + mPaddingBottom + 40;
|
int neededHeight = mPaddingTop + mPaddingBottom + 40;
|
||||||
if (neededWidth != mNeededWidth || neededHeight != mNeededHeight) {
|
if (neededWidth != mNeededWidth || neededHeight != mNeededHeight) {
|
||||||
mNeededWidth = neededWidth;
|
mNeededWidth = neededWidth;
|
||||||
|
|
Loading…
Reference in a new issue