mirror of https://github.com/M66B/NetGuard.git
Drawing order
This commit is contained in:
parent
00a6bc03fc
commit
f9ebe6f83c
|
@ -405,13 +405,6 @@ public class SinkholeService extends VpnService {
|
|||
// Build paint
|
||||
Paint paint = new Paint(Paint.ANTI_ALIAS_FLAG);
|
||||
paint.setStyle(Paint.Style.STROKE);
|
||||
paint.setStrokeWidth(Util.dips2pixels(2, SinkholeService.this));
|
||||
|
||||
// Draw paths
|
||||
paint.setColor(ContextCompat.getColor(SinkholeService.this, R.color.colorSend));
|
||||
canvas.drawPath(ptx, paint);
|
||||
paint.setColor(ContextCompat.getColor(SinkholeService.this, R.color.colorReceive));
|
||||
canvas.drawPath(prx, paint);
|
||||
|
||||
// Draw base line
|
||||
paint.setStrokeWidth(Util.dips2pixels(1, SinkholeService.this));
|
||||
|
@ -419,6 +412,13 @@ public class SinkholeService extends VpnService {
|
|||
float y = height - height * base / ymax;
|
||||
canvas.drawLine(0, y, width, y, paint);
|
||||
|
||||
// Draw paths
|
||||
paint.setStrokeWidth(Util.dips2pixels(2, SinkholeService.this));
|
||||
paint.setColor(ContextCompat.getColor(SinkholeService.this, R.color.colorSend));
|
||||
canvas.drawPath(ptx, paint);
|
||||
paint.setColor(ContextCompat.getColor(SinkholeService.this, R.color.colorReceive));
|
||||
canvas.drawPath(prx, paint);
|
||||
|
||||
// Update remote view
|
||||
remoteViews.setImageViewBitmap(R.id.ivTraffic, bitmap);
|
||||
if (txsec < 1000 * 1000)
|
||||
|
|
|
@ -4,14 +4,6 @@
|
|||
android:layout_height="match_parent"
|
||||
android:padding="4dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivTraffic"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_alignParentTop="true"
|
||||
android:scaleType="fitXY" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
@ -61,4 +53,12 @@
|
|||
android:singleLine="false"
|
||||
android:textAppearance="@style/TextAppearance.StatusBar.EventContent.Info"
|
||||
android:textSize="10sp" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivTraffic"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_alignParentTop="true"
|
||||
android:scaleType="fitXY" />
|
||||
</RelativeLayout>
|
||||
|
|
Loading…
Reference in New Issue