Browse Source

压力锅界面开发

压力锅
pry 6 months ago
parent
commit
4cb3b95b3b
4 changed files with 85 additions and 79 deletions
  1. +9
    -8
      app/src/main/java/com/bonait/bnframework/MainActivity.java
  2. BIN
     
  3. BIN
     
  4. +76
    -71
      app/src/main/res/layout/datatab/layout/activity_main.xml

+ 9
- 8
app/src/main/java/com/bonait/bnframework/MainActivity.java View File

@@ -1,28 +1,29 @@
package com.bonait.bnframework;

import androidx.appcompat.app.AppCompatActivity;
//import androidx.appcompat.app.AppCompatActivity;

import android.graphics.Color;
import android.os.Bundle;

import com.bonait.bnframework.common.DashboardView;
import com.bonait.bnframework.common.base.BaseActivity;

public class MainActivity extends AppCompatActivity {
public class MainActivity extends BaseActivity {

DashboardView dv;
// DashboardView dv;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
dv=findViewById(R.id.dv);
// dv=findViewById(R.id.dv);
Init();
}

public void Init(){
dv.setMaxValue(400);
dv.setHeaderText("锅体压力");
dv.setUnity(" pa");
dv.setBackgroundColor(Color.TRANSPARENT);
// dv.setMaxValue(400);
// dv.setHeaderText("锅体压力");
// dv.setUnity(" pa");
// dv.setBackgroundColor(Color.TRANSPARENT);
}
}

BIN
View File


BIN
View File


+ 76
- 71
app/src/main/res/layout/datatab/layout/activity_main.xml View File

@@ -7,87 +7,92 @@
android:background="#FFFFFF"
tools:context=".MainActivity">

<androidx.core.widget.NestedScrollView
android:id="@+id/scrollView"
<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true"
android:fillViewport="true"
android:scrollbarThumbVertical="@android:color/transparent"
android:scrollbars="vertical">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
android:src="@drawable/yaliguoh"/>

<RelativeLayout
android:layout_width="match_parent"
android:background="#3D7B97"
android:layout_height="30dp">
<TextView
android:gravity="center"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:textColor="@color/white"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="黑菠萝压力锅监控系统"></TextView>
</RelativeLayout>
<!-- <androidx.core.widget.NestedScrollView-->
<!-- android:id="@+id/scrollView"-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="match_parent"-->
<!-- android:layout_alignParentStart="true"-->
<!-- android:layout_alignParentTop="true"-->
<!-- android:fillViewport="true"-->
<!-- android:scrollbarThumbVertical="@android:color/transparent"-->
<!-- android:scrollbars="vertical">-->
<!-- <RelativeLayout-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="match_parent">-->

<RelativeLayout
android:layout_width="match_parent"
android:layout_marginTop="40dp"
android:layout_height="300dp">
<!-- <RelativeLayout-->
<!-- android:layout_width="match_parent"-->
<!-- android:background="#3D7B97"-->
<!-- android:layout_height="30dp">-->
<!-- <TextView-->
<!-- android:gravity="center"-->
<!-- android:layout_centerHorizontal="true"-->
<!-- android:layout_centerVertical="true"-->
<!-- android:textColor="@color/white"-->
<!-- android:layout_width="wrap_content"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:text="黑菠萝压力锅监控系统"></TextView>-->
<!-- </RelativeLayout>-->

<com.bonait.bnframework.common.ShadowContainer
android:layout_width="match_parent"
android:layout_height="300dp"
android:layout_margin="10dp"
android:layout_columnWeight="1"
android:layout_rowWeight="1"
android:layout_alignParentTop="true"
android:layout_column="0"
android:layout_row="0"
app:containerCornerRadius="10dp"
app:containerDeltaLength="20px"
app:containerShadowColor="#68676A"
app:containerShadowRadius="20px"
tools:ignore="Pxusage,RtlHardcoded">
<!-- <RelativeLayout-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_marginTop="40dp"-->
<!-- android:layout_height="300dp">-->

<com.bonait.bnframework.common.DashboardView
android:id="@+id/dv"
android:layout_width="300dp"
android:layout_height="match_parent"/>
<!-- <com.bonait.bnframework.common.ShadowContainer-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="300dp"-->
<!-- android:layout_margin="10dp"-->
<!-- android:layout_columnWeight="1"-->
<!-- android:layout_rowWeight="1"-->
<!-- android:layout_alignParentTop="true"-->
<!-- android:layout_column="0"-->
<!-- android:layout_row="0"-->
<!-- app:containerCornerRadius="10dp"-->
<!-- app:containerDeltaLength="20px"-->
<!-- app:containerShadowColor="#68676A"-->
<!-- app:containerShadowRadius="20px"-->
<!-- tools:ignore="Pxusage,RtlHardcoded">-->

</com.bonait.bnframework.common.ShadowContainer>
<!-- <com.bonait.bnframework.common.DashboardView-->
<!-- android:id="@+id/dv"-->
<!-- android:layout_width="300dp"-->
<!-- android:layout_height="match_parent"/>-->

</RelativeLayout>
<!-- </com.bonait.bnframework.common.ShadowContainer>-->

<ImageView
android:layout_width="match_parent"
android:layout_height="400dp"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_marginBottom="50dp"
android:scaleType="fitCenter"
app:srcCompat="@drawable/ylg"></ImageView>
<!-- </RelativeLayout>-->

<RelativeLayout
android:layout_alignParentBottom="true"
android:layout_width="match_parent"
android:background="#5B9BB8"
android:layout_height="30dp">
<TextView
android:gravity="center"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:textColor="@color/white"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="黑菠萝科技 copyright@2022"></TextView>
</RelativeLayout>
<!-- <ImageView-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="400dp"-->
<!-- android:layout_alignParentBottom="true"-->
<!-- android:layout_centerHorizontal="true"-->
<!-- android:layout_marginBottom="50dp"-->
<!-- android:scaleType="fitCenter"-->
<!-- app:srcCompat="@drawable/ylg"></ImageView>-->

</RelativeLayout>
<!-- <RelativeLayout-->
<!-- android:layout_alignParentBottom="true"-->
<!-- android:layout_width="match_parent"-->
<!-- android:background="#5B9BB8"-->
<!-- android:layout_height="30dp">-->
<!-- <TextView-->
<!-- android:gravity="center"-->
<!-- android:layout_centerHorizontal="true"-->
<!-- android:layout_centerVertical="true"-->
<!-- android:textColor="@color/white"-->
<!-- android:layout_width="wrap_content"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:text="黑菠萝科技 copyright@2022"></TextView>-->
<!-- </RelativeLayout>-->

</androidx.core.widget.NestedScrollView>
<!-- </RelativeLayout>-->

<!-- </androidx.core.widget.NestedScrollView>-->
</com.qmuiteam.qmui.widget.QMUIWindowInsetLayout>

Loading…
Cancel
Save