diff options
| author | bt <bt@rctt.net> | 2026-05-07 01:02:21 +0200 |
|---|---|---|
| committer | bt <bt@rctt.net> | 2026-05-07 01:02:21 +0200 |
| commit | e81ce6af3d97a51e51f676f32e739d0f174323c7 (patch) | |
| tree | 9a45cac8bdd1fefb82fcb01cf2221dcbe5a3b6f8 /app/src/main/res/layout | |
| parent | f4c07069c1604c45a6a57b30338bd5a32887e24a (diff) | |
| download | netmon-e81ce6af3d97a51e51f676f32e739d0f174323c7.tar.gz netmon-e81ce6af3d97a51e51f676f32e739d0f174323c7.zip | |
Add power graph
Diffstat (limited to 'app/src/main/res/layout')
| -rw-r--r-- | app/src/main/res/layout/activity_main.xml | 30 | ||||
| -rw-r--r-- | app/src/main/res/layout/cell_view.xml | 88 |
2 files changed, 75 insertions, 43 deletions
diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml index f3a3014..993e933 100644 --- a/app/src/main/res/layout/activity_main.xml +++ b/app/src/main/res/layout/activity_main.xml @@ -9,12 +9,13 @@ tools:context=".MainActivity"> <LinearLayout - android:layout_width="match_parent" + android:layout_width="0dp" android:layout_height="match_parent" android:orientation="vertical" + app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toTopOf="parent" > + app:layout_constraintTop_toTopOf="parent"> <TextView android:id="@+id/haederCell" @@ -25,7 +26,7 @@ <ScrollView android:layout_width="match_parent" - android:layout_height="400dp"> + android:layout_height="wrap_content"> <LinearLayout android:id="@+id/cellsList" @@ -34,29 +35,6 @@ android:orientation="vertical" /> </ScrollView> - <View - android:id="@+id/divider" - android:layout_width="match_parent" - android:layout_height="1dp" - android:background="?android:attr/listDivider" /> - - <TextView - android:id="@+id/headerStatus" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:text="Status" - android:textSize="20sp" /> - - <ScrollView - android:layout_width="match_parent" - android:layout_height="match_parent"> - - <LinearLayout - android:id="@+id/statusView" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:orientation="vertical"/> - </ScrollView> </LinearLayout> </androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file diff --git a/app/src/main/res/layout/cell_view.xml b/app/src/main/res/layout/cell_view.xml index 4b58958..7361930 100644 --- a/app/src/main/res/layout/cell_view.xml +++ b/app/src/main/res/layout/cell_view.xml @@ -1,32 +1,86 @@ <?xml version="1.0" encoding="utf-8"?> <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" - xmlns:app="http://schemas.android.com/apk/res-auto" + xmlns:ap="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" - android:layout_width="match_parent" - android:layout_height="match_parent"> + android:layout_width="wrap_content" + android:layout_height="wrap_content" + tools:ignore="HardcodedText"> <LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> - <TextView - android:id="@+id/type" - android:layout_width="wrap_content" + <LinearLayout + android:layout_width="match_parent" android:layout_height="wrap_content" - android:text="TextView" /> + android:orientation="horizontal"> - <TextView - android:id="@+id/id" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:text="TextView" /> + <LinearLayout + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginEnd="10dp" + android:orientation="vertical"> - <TextView - android:id="@+id/power" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:text="TextView" /> + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="Type" /> + + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="Id" /> + + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="Power" /> + + </LinearLayout> + + <LinearLayout + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:orientation="vertical"> + + <TextView + android:id="@+id/type" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="type" /> + + <TextView + android:id="@+id/id" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="id" /> + + <TextView + android:id="@+id/power" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="power" /> + + </LinearLayout> + + <com.androidplot.xy.XYPlot + style="@style/APDefacto.Dark" + android:id="@+id/power_chart" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:layout_marginHorizontal="10dp" + ap:graphHeightMode="fill" + ap:graphWidthMode="fill" + ap:legendVisible="false" + ap:graphMarginTop="0dp" + ap:graphMarginBottom="-20dp" + ap:graphMarginLeft="-20dp" + ap:graphMarginRight="10dp" + ap:lineLabels="" + /> + + </LinearLayout> <View android:id="@+id/divider2" |
