layout rework etc

This commit is contained in:
root 2018-06-22 22:07:04 +02:00
parent ce9ede75dd
commit ef733af0f0
6 changed files with 125 additions and 82 deletions

View File

@ -11,8 +11,8 @@ import java.util.HashMap;
public class GlobalState extends Application {
private String ipAddress = "192.168.157.16";
private int port = 503;
private String ipAddress = "172.16.202.14";
private int port = 502;
private HashMap<Integer, Integer> mapMappingValue = new HashMap<Integer, Integer>();
//
public enum InputConfig {

View File

@ -57,9 +57,9 @@ public class ManualDriveActivity extends AppCompatActivity {
ToggleButton m2ControlButton = findViewById(R.id.m2_control_button);
mapButtonCoil.put(h1ControlButton, 64);
mapButtonCoil.put(h2ControlButton, 70);
mapButtonCoil.put(h2ControlButton, 72);
mapButtonCoil.put(pu1ControlButton, 65);
mapButtonCoil.put(pu2ControlButton, 71);
mapButtonCoil.put(pu2ControlButton, 73);
mapButtonCoil.put(sp1ControlButton, 68);
mapButtonCoil.put(b1ControlButton, 69);
mapButtonCoil.put(m1ControlButton, 66);

View File

@ -12,19 +12,19 @@
android:pathData="M0 90.32 L81 9.32 L162 90.32 L81 171.32 L0 90.32 Z" />
<path
android:strokeColor="#000000"
android:strokeWidth="1"
android:strokeWidth="2"
android:strokeLineJoin="round"
android:strokeLineCap="round"
android:pathData="M97.2 25.52 L97.2 155.12" />
<path
android:strokeColor="#000000"
android:strokeWidth="1"
android:strokeWidth="2"
android:strokeLineJoin="round"
android:strokeLineCap="round"
android:pathData="M64.8 25.52 L64.8 155.12" />
<path
android:strokeColor="#000000"
android:strokeWidth="1"
android:strokeWidth="2"
android:strokeLineJoin="round"
android:strokeLineCap="round"
android:pathData="M0 90.32 L81 9.32 L162 90.32 L81 171.32 L0 90.32" />

View File

@ -6,11 +6,11 @@
android:viewportHeight="166.782">
<group
android:translateX="0.12"
android:translateY="-29.9325">
android:translateX="0"
android:translateY="-25">
<path
android:strokeColor="#000000"
android:strokeWidth="1"
android:strokeWidth="2"
android:strokeLineJoin="round"
android:strokeLineCap="round"
android:pathData="M 0 47.5325 H 238.5 V 166.7825 H 0 V 47.5325 Z" />
@ -19,14 +19,14 @@
<path
android:fillColor="#000000"
android:strokeColor="#000000"
android:strokeWidth="1"
android:strokeWidth="2"
android:strokeLineJoin="round"
android:strokeLineCap="round"
android:pathData="M33.63 166.78 L67.26 47.53" />
<path
android:fillColor="#000000"
android:strokeColor="#000000"
android:strokeWidth="1"
android:strokeWidth="2"
android:strokeLineJoin="round"
android:strokeLineCap="round"
android:pathData="M100.89 166.78 L134.51 47.53" />
@ -34,7 +34,7 @@
<path
android:fillColor="#ffffff"
android:strokeColor="#000000"
android:strokeWidth="1"
android:strokeWidth="2"
android:strokeLineJoin="round"
android:strokeLineCap="round"
android:pathData="M0 166.78 L11.92 147.7 L23.85 166.78 L0 166.78 Z" />
@ -45,7 +45,7 @@
android:translateX="48.8925"
android:translateY="-47.7">
<path
android:strokeWidth="1"
android:strokeWidth="2"
android:strokeLineJoin="round"
android:strokeLineCap="round"
android:pathData="M 0 142.933 H 238.5 V 166.783 H 0 V 142.933 Z" />
@ -55,28 +55,28 @@
<path
android:fillColor="#000000"
android:strokeColor="#000000"
android:strokeWidth="1"
android:strokeWidth="2"
android:strokeLineJoin="round"
android:strokeLineCap="round"
android:pathData="M21.46 119.08 L238.5 119.08" />
<path
android:fillColor="#000000"
android:strokeColor="#000000"
android:strokeWidth="1"
android:strokeWidth="2"
android:strokeLineJoin="round"
android:strokeLineCap="round"
android:pathData="M21.46 95.23 L238.5 95.23" />
<path
android:fillColor="#000000"
android:strokeColor="#000000"
android:strokeWidth="1"
android:strokeWidth="2"
android:strokeLineJoin="round"
android:strokeLineCap="round"
android:pathData="M21.46 47.53 L21.46 166.78" />
<path
android:fillColor="#000000"
android:strokeColor="#000000"
android:strokeWidth="1"
android:strokeWidth="2"
android:strokeLineJoin="round"
android:strokeLineCap="round"
android:pathData="M0 47.53 L0 166.78" />
@ -86,14 +86,14 @@
<path
android:fillColor="#000000"
android:strokeColor="#000000"
android:strokeWidth="1"
android:strokeWidth="2"
android:strokeLineJoin="round"
android:strokeLineCap="round"
android:pathData="M0 47.53 L33.63 166.78" />
<path
android:fillColor="#000000"
android:strokeColor="#000000"
android:strokeWidth="1"
android:strokeWidth="2"
android:strokeLineJoin="round"
android:strokeLineCap="round"
android:pathData="M67.26 47.53 L100.89 166.78" />
@ -108,14 +108,14 @@
<path
android:fillColor="#000000"
android:strokeColor="#000000"
android:strokeWidth="1"
android:strokeWidth="2"
android:strokeLineJoin="round"
android:strokeLineCap="round"
android:pathData="M11.92 166.78 L11.92 196.59" />
<path
android:fillColor="#000000"
android:strokeColor="#000000"
android:strokeWidth="1"
android:strokeWidth="2"
android:strokeLineJoin="round"
android:strokeLineCap="round"
android:pathData="M226.57 166.78 L226.57 196.59" />

View File

@ -1,16 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="323.633dp"
android:height="202.782dp"
android:viewportWidth="323.633"
android:viewportHeight="202.782">
android:width="287.633dp"
android:height="166.782dp"
android:viewportWidth="287.633"
android:viewportHeight="166.782">
<group
android:translateX="27"
android:translateY="-63">
android:translateX="0"
android:translateY="-60">
<path
android:strokeColor="#000000"
android:strokeWidth="1"
android:strokeWidth="2"
android:strokeLineJoin="round"
android:strokeLineCap="round"
android:pathData="M 0 88.0325 H 229.5 V 202.7825 H 0 V 88.0325 Z" />
@ -18,7 +19,7 @@
android:translateX="47.0475"
android:translateY="-45.9">
<path
android:strokeWidth="1"
android:strokeWidth="2"
android:strokeLineJoin="round"
android:strokeLineCap="round"
android:pathData="M 0 179.833 H 229.5 V 202.783 H 0 V 179.833 Z" />
@ -28,28 +29,28 @@
<path
android:fillColor="#000000"
android:strokeColor="#000000"
android:strokeWidth="1"
android:strokeWidth="2"
android:strokeLineJoin="round"
android:strokeLineCap="round"
android:pathData="M20.65 156.88 L229.5 156.88" />
<path
android:fillColor="#000000"
android:strokeColor="#000000"
android:strokeWidth="1"
android:strokeWidth="2"
android:strokeLineJoin="round"
android:strokeLineCap="round"
android:pathData="M20.65 133.93 L229.5 133.93" />
<path
android:fillColor="#000000"
android:strokeColor="#000000"
android:strokeWidth="1"
android:strokeWidth="2"
android:strokeLineJoin="round"
android:strokeLineCap="round"
android:pathData="M20.65 88.03 L20.65 202.78" />
<path
android:fillColor="#000000"
android:strokeColor="#000000"
android:strokeWidth="1"
android:strokeWidth="2"
android:strokeLineJoin="round"
android:strokeLineCap="round"
android:pathData="M0 88.03 L0 202.78" />
@ -57,7 +58,7 @@
<path
android:fillColor="#ffffff"
android:strokeColor="#000000"
android:strokeWidth="1"
android:strokeWidth="2"
android:strokeLineJoin="round"
android:strokeLineCap="round"
android:pathData="M0 202.78 L11.47 184.42 L22.95 202.78 L0 202.78 Z" />
@ -66,7 +67,7 @@
<path
android:fillColor="#ffffff"
android:strokeColor="#000000"
android:strokeWidth="1"
android:strokeWidth="2"
android:strokeLineJoin="round"
android:strokeLineCap="round"
android:pathData="M0 202.78 L11.47 184.42 L22.95 202.78 L0 202.78 Z" />
@ -78,14 +79,14 @@
<path
android:fillColor="#000000"
android:strokeColor="#000000"
android:strokeWidth="1"
android:strokeWidth="2"
android:strokeLineJoin="round"
android:strokeLineCap="round"
android:pathData="M11.47 202.78 L11.47 231.47" />
<path
android:fillColor="#000000"
android:strokeColor="#000000"
android:strokeWidth="1"
android:strokeWidth="2"
android:strokeLineJoin="round"
android:strokeLineCap="round"
android:pathData="M218.02 202.78 L218.02 231.47" />

View File

@ -34,99 +34,139 @@
android:id="@+id/m2_icon"
android:layout_width="174dp"
android:layout_height="56dp"
app:srcCompat="@drawable/con1"
tools:layout_editor_absoluteX="114dp"
tools:layout_editor_absoluteY="316dp" />
android:layout_marginBottom="120dp"
android:layout_marginEnd="8dp"
android:layout_marginStart="8dp"
app:layout_constraintBottom_toTopOf="@+id/button"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:srcCompat="@drawable/con1" />
<ImageView
android:id="@+id/m1_icon"
android:layout_width="174dp"
android:layout_height="56dp"
app:srcCompat="@drawable/con1"
tools:layout_editor_absoluteX="114dp"
tools:layout_editor_absoluteY="230dp" />
android:layout_marginBottom="60dp"
android:layout_marginEnd="8dp"
android:layout_marginStart="8dp"
app:layout_constraintBottom_toTopOf="@+id/m2_icon"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:srcCompat="@drawable/con1" />
<ImageView
android:id="@+id/pu2_icon"
android:layout_width="62dp"
android:layout_height="21dp"
app:srcCompat="@drawable/zyl1"
tools:layout_editor_absoluteX="91dp"
tools:layout_editor_absoluteY="118dp" />
android:layout_width="77dp"
android:layout_height="33dp"
android:layout_marginBottom="20dp"
android:layout_marginEnd="8dp"
android:layout_marginStart="8dp"
android:adjustViewBounds="true"
app:layout_constraintBottom_toBottomOf="@+id/m2_icon"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/m2_icon"
app:srcCompat="@drawable/zyl1" />
<ImageView
android:id="@+id/b1_icon"
android:layout_width="62dp"
android:layout_height="21dp"
app:srcCompat="@drawable/zyl1"
tools:layout_editor_absoluteX="91dp"
tools:layout_editor_absoluteY="54dp" />
android:layout_marginBottom="50dp"
android:layout_marginStart="8dp"
app:layout_constraintBottom_toTopOf="@+id/m1_icon"
app:layout_constraintStart_toEndOf="@+id/ls5_icon"
app:srcCompat="@drawable/zyl1" />
<ImageView
android:id="@+id/sp1_icon"
android:layout_width="62dp"
android:layout_height="21dp"
app:srcCompat="@drawable/zyl1"
tools:layout_editor_absoluteX="9dp"
tools:layout_editor_absoluteY="54dp" />
android:layout_marginBottom="50dp"
android:layout_marginStart="8dp"
app:layout_constraintBottom_toTopOf="@+id/m1_icon"
app:layout_constraintStart_toEndOf="@+id/ind1_icon"
app:srcCompat="@drawable/zyl1" />
<ImageView
android:id="@+id/pu1_icon"
android:layout_width="62dp"
android:layout_height="21dp"
app:srcCompat="@drawable/zyl1"
tools:layout_editor_absoluteX="9dp"
tools:layout_editor_absoluteY="119dp" />
android:layout_width="77dp"
android:layout_height="33dp"
android:layout_marginBottom="80dp"
android:layout_marginEnd="8dp"
android:layout_marginStart="8dp"
android:adjustViewBounds="true"
app:layout_constraintBottom_toTopOf="@+id/m2_icon"
app:layout_constraintEnd_toStartOf="@+id/m1_icon"
app:layout_constraintStart_toStartOf="parent"
app:srcCompat="@drawable/zyl1" />
<ImageView
android:id="@+id/ls5_icon"
android:layout_width="26dp"
android:layout_height="38dp"
app:srcCompat="@drawable/ls1"
tools:layout_editor_absoluteX="205dp"
tools:layout_editor_absoluteY="54dp" />
android:layout_marginBottom="40dp"
android:layout_marginStart="8dp"
app:layout_constraintBottom_toTopOf="@+id/m1_icon"
app:layout_constraintStart_toEndOf="@+id/sp1_icon"
app:srcCompat="@drawable/ls1" />
<ImageView
android:id="@+id/ind1_icon"
android:layout_width="26dp"
android:layout_height="38dp"
app:srcCompat="@drawable/ls1"
tools:layout_editor_absoluteX="262dp"
tools:layout_editor_absoluteY="54dp" />
android:layout_marginBottom="40dp"
android:layout_marginStart="60dp"
app:layout_constraintBottom_toTopOf="@+id/m1_icon"
app:layout_constraintStart_toStartOf="parent"
app:srcCompat="@drawable/ls1" />
<ImageView
android:id="@+id/h2_icon"
android:layout_width="58dp"
android:layout_height="26dp"
android:layout_marginEnd="244dp"
android:layout_width="77dp"
android:layout_height="33dp"
android:layout_marginBottom="80dp"
android:layout_marginEnd="8dp"
android:layout_marginStart="8dp"
android:adjustViewBounds="true"
app:layout_constraintBottom_toTopOf="@+id/m2_icon"
app:layout_constraintEnd_toEndOf="parent"
app:srcCompat="@drawable/zyl2"
tools:layout_editor_absoluteY="325dp" />
app:layout_constraintStart_toEndOf="@+id/m1_icon"
app:srcCompat="@drawable/zyl2" />
<ImageView
android:id="@+id/h1_icon"
android:layout_width="59dp"
android:layout_height="26dp"
android:layout_marginStart="16dp"
android:layout_width="77dp"
android:layout_height="33dp"
android:layout_marginBottom="20dp"
android:layout_marginEnd="8dp"
android:layout_marginStart="8dp"
android:adjustViewBounds="true"
app:layout_constraintBottom_toBottomOf="@+id/m2_icon"
app:layout_constraintEnd_toStartOf="@+id/m2_icon"
app:layout_constraintStart_toStartOf="parent"
app:srcCompat="@drawable/zyl2"
tools:layout_editor_absoluteY="239dp" />
app:srcCompat="@drawable/zyl2" />
<ImageView
android:id="@+id/ls4_icon"
android:layout_width="26dp"
android:layout_height="38dp"
app:srcCompat="@drawable/ls1"
tools:layout_editor_absoluteX="262dp"
tools:layout_editor_absoluteY="139dp" />
android:layout_marginBottom="45dp"
android:layout_marginEnd="40dp"
app:layout_constraintBottom_toTopOf="@+id/h2_icon"
app:layout_constraintEnd_toEndOf="parent"
app:srcCompat="@drawable/ls1" />
<ImageView
android:id="@+id/ls1_icon"
android:layout_width="26dp"
android:layout_height="38dp"
app:srcCompat="@drawable/ls1"
tools:layout_editor_absoluteX="205dp"
tools:layout_editor_absoluteY="139dp" />
android:layout_marginEnd="8dp"
android:layout_marginStart="8dp"
android:layout_marginTop="50dp"
app:layout_constraintEnd_toStartOf="@+id/m2_icon"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/h1_textview_mainview"
app:srcCompat="@drawable/ls1" />
<ImageView
android:id="@+id/pu1_status_light_off_mainview"
@ -457,8 +497,10 @@
android:layout_height="wrap_content"
android:layout_marginEnd="8dp"
android:layout_marginStart="8dp"
android:layout_marginTop="4dp"
android:text="LS5"
app:layout_constraintEnd_toEndOf="@+id/ls5_icon"
app:layout_constraintHorizontal_bias="0.428"
app:layout_constraintStart_toStartOf="@+id/ls5_icon"
app:layout_constraintTop_toBottomOf="@+id/ls5_icon" />