master
Zhengyu Peng 3 years ago
parent ec96c0c8e7
commit 2a924b870e

@ -147,7 +147,7 @@ class ControlActivity : AppCompatActivity() {
controlWindowInsets(true) controlWindowInsets(true)
controlImage = findViewById<ImageView>(R.id.control_image) controlImage = findViewById<ImageView>(R.id.right_control_image)
progressBar = findViewById<ConstraintLayout>(R.id.progressBar) progressBar = findViewById<ConstraintLayout>(R.id.progressBar)
buttonRotateX = findViewById(R.id.button_rotatex) buttonRotateX = findViewById(R.id.button_rotatex)

@ -8,7 +8,7 @@
android:translateY="-33.9187"> android:translateY="-33.9187">
<path <path
android:pathData="M17.62795 33.9187H184.2946A16.66667 16.66667 0 0 1 200.9613 50.58537V317.252A16.66667 16.66667 0 0 1 184.2946 333.9187H17.62795A16.66667 16.66667 0 0 1 0.961289 317.252V50.58537A16.66667 16.66667 0 0 1 17.62795 33.9187Z" android:pathData="M17.62795 33.9187H184.2946A16.66667 16.66667 0 0 1 200.9613 50.58537V317.252A16.66667 16.66667 0 0 1 184.2946 333.9187H17.62795A16.66667 16.66667 0 0 1 0.961289 317.252V50.58537A16.66667 16.66667 0 0 1 17.62795 33.9187Z"
android:fillColor="#323232" /> android:fillColor="#646464" />
<path <path
android:pathData="M0.96128899 134.4187H200.96129" android:pathData="M0.96128899 134.4187H200.96129"
android:strokeColor="#C8C8C8" android:strokeColor="#C8C8C8"

@ -8,7 +8,7 @@
android:translateY="-33.9187"> android:translateY="-33.9187">
<path <path
android:pathData="M17.62795 33.9187H184.2946A16.66667 16.66667 0 0 1 200.9613 50.58537V317.252A16.66667 16.66667 0 0 1 184.2946 333.9187H17.62795A16.66667 16.66667 0 0 1 0.961289 317.252V50.58537A16.66667 16.66667 0 0 1 17.62795 33.9187Z" android:pathData="M17.62795 33.9187H184.2946A16.66667 16.66667 0 0 1 200.9613 50.58537V317.252A16.66667 16.66667 0 0 1 184.2946 333.9187H17.62795A16.66667 16.66667 0 0 1 0.961289 317.252V50.58537A16.66667 16.66667 0 0 1 17.62795 33.9187Z"
android:fillColor="#323232" /> android:fillColor="#646464" />
<group> <group>
<clip-path <clip-path
android:pathData="M101.4563 234.4138H200.4662V333.4237H101.4563V234.4138Z" /> android:pathData="M101.4563 234.4138H200.4662V333.4237H101.4563V234.4138Z" />

@ -8,7 +8,7 @@
android:translateY="-33.9187"> android:translateY="-33.9187">
<path <path
android:pathData="M17.62795 33.9187H184.2946A16.66667 16.66667 0 0 1 200.9613 50.58537V317.252A16.66667 16.66667 0 0 1 184.2946 333.9187H17.62795A16.66667 16.66667 0 0 1 0.961289 317.252V50.58537A16.66667 16.66667 0 0 1 17.62795 33.9187Z" android:pathData="M17.62795 33.9187H184.2946A16.66667 16.66667 0 0 1 200.9613 50.58537V317.252A16.66667 16.66667 0 0 1 184.2946 333.9187H17.62795A16.66667 16.66667 0 0 1 0.961289 317.252V50.58537A16.66667 16.66667 0 0 1 17.62795 33.9187Z"
android:fillColor="#323232" /> android:fillColor="#646464" />
<group> <group>
<clip-path <clip-path
android:pathData="M101.4563 34.41375H200.4662V133.4237H101.4563V34.41375Z" /> android:pathData="M101.4563 34.41375H200.4662V133.4237H101.4563V34.41375Z" />

@ -8,7 +8,7 @@
android:translateY="-33.9187"> android:translateY="-33.9187">
<path <path
android:pathData="M17.62795 33.9187H184.2946A16.66667 16.66667 0 0 1 200.9613 50.58537V317.252A16.66667 16.66667 0 0 1 184.2946 333.9187H17.62795A16.66667 16.66667 0 0 1 0.961289 317.252V50.58537A16.66667 16.66667 0 0 1 17.62795 33.9187Z" android:pathData="M17.62795 33.9187H184.2946A16.66667 16.66667 0 0 1 200.9613 50.58537V317.252A16.66667 16.66667 0 0 1 184.2946 333.9187H17.62795A16.66667 16.66667 0 0 1 0.961289 317.252V50.58537A16.66667 16.66667 0 0 1 17.62795 33.9187Z"
android:fillColor="#323232" /> android:fillColor="#646464" />
<group> <group>
<clip-path <clip-path
android:pathData="M1.456339 134.4138H100.4662V233.4237H1.456339V134.4138Z" /> android:pathData="M1.456339 134.4138H100.4662V233.4237H1.456339V134.4138Z" />

@ -8,7 +8,7 @@
android:translateY="-33.9187"> android:translateY="-33.9187">
<path <path
android:pathData="M17.62795 33.9187H184.2946A16.66667 16.66667 0 0 1 200.9613 50.58537V317.252A16.66667 16.66667 0 0 1 184.2946 333.9187H17.62795A16.66667 16.66667 0 0 1 0.961289 317.252V50.58537A16.66667 16.66667 0 0 1 17.62795 33.9187Z" android:pathData="M17.62795 33.9187H184.2946A16.66667 16.66667 0 0 1 200.9613 50.58537V317.252A16.66667 16.66667 0 0 1 184.2946 333.9187H17.62795A16.66667 16.66667 0 0 1 0.961289 317.252V50.58537A16.66667 16.66667 0 0 1 17.62795 33.9187Z"
android:fillColor="#323232" /> android:fillColor="#646464" />
<group> <group>
<clip-path <clip-path
android:pathData="M1.456339 34.41375H100.4662V133.4237H1.456339V34.41375Z" /> android:pathData="M1.456339 34.41375H100.4662V133.4237H1.456339V34.41375Z" />

@ -8,7 +8,7 @@
android:translateY="-33.9187"> android:translateY="-33.9187">
<path <path
android:pathData="M17.62795 33.9187H184.2946A16.66667 16.66667 0 0 1 200.9613 50.58537V317.252A16.66667 16.66667 0 0 1 184.2946 333.9187H17.62795A16.66667 16.66667 0 0 1 0.961289 317.252V50.58537A16.66667 16.66667 0 0 1 17.62795 33.9187Z" android:pathData="M17.62795 33.9187H184.2946A16.66667 16.66667 0 0 1 200.9613 50.58537V317.252A16.66667 16.66667 0 0 1 184.2946 333.9187H17.62795A16.66667 16.66667 0 0 1 0.961289 317.252V50.58537A16.66667 16.66667 0 0 1 17.62795 33.9187Z"
android:fillColor="#323232" /> android:fillColor="#646464" />
<group> <group>
<clip-path <clip-path
android:pathData="M1.456339 234.4138H100.4662V333.4237H1.456339V234.4138Z" /> android:pathData="M1.456339 234.4138H100.4662V333.4237H1.456339V234.4138Z" />

@ -8,7 +8,7 @@
android:translateY="-33.9187"> android:translateY="-33.9187">
<path <path
android:pathData="M17.62795 33.9187H184.2946A16.66667 16.66667 0 0 1 200.9613 50.58537V317.252A16.66667 16.66667 0 0 1 184.2946 333.9187H17.62795A16.66667 16.66667 0 0 1 0.961289 317.252V50.58537A16.66667 16.66667 0 0 1 17.62795 33.9187Z" android:pathData="M17.62795 33.9187H184.2946A16.66667 16.66667 0 0 1 200.9613 50.58537V317.252A16.66667 16.66667 0 0 1 184.2946 333.9187H17.62795A16.66667 16.66667 0 0 1 0.961289 317.252V50.58537A16.66667 16.66667 0 0 1 17.62795 33.9187Z"
android:fillColor="#323232" /> android:fillColor="#646464" />
<group> <group>
<clip-path <clip-path
android:pathData="M101.4563 134.4138H200.4662V233.4237H101.4563V134.4138Z" /> android:pathData="M101.4563 134.4138H200.4662V233.4237H101.4563V134.4138Z" />

@ -17,126 +17,21 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_weight="1"> android:layout_weight="1">
<TableLayout <ImageView
android:layout_width="0dp" android:id="@+id/left_control_image"
android:layout_height="wrap_content" android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginStart="32dp"
android:layout_marginTop="32dp"
android:layout_marginEnd="32dp"
android:layout_marginBottom="32dp"
android:scaleType="fitStart"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent"
android:layout_marginRight="32dp" app:srcCompat="@drawable/ic_control_left" />
android:layout_marginLeft="32dp">
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content">
<Button
android:id="@+id/button_rotatex"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:paddingTop="24dp"
android:paddingBottom="24dp"
android:layout_margin="16dp"
android:theme="@style/Theme.Hexapod.ButtonInactive"
android:text="Rotate X"
app:layout_constraintBottom_toTopOf="@+id/button_rotatey"
app:layout_constraintEnd_toStartOf="@+id/button_climb"
app:layout_constraintHorizontal_chainStyle="packed"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_chainStyle="packed" />
<Button
android:id="@+id/button_climb"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:paddingTop="24dp"
android:paddingBottom="24dp"
android:layout_margin="16dp"
android:theme="@style/Theme.Hexapod.ButtonInactive"
android:text="Climb"
app:layout_constraintBottom_toTopOf="@+id/button_twist"
app:layout_constraintStart_toEndOf="@+id/button_rotatex"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_chainStyle="packed" />
</TableRow>
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content">
<Button
android:id="@+id/button_rotatey"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:paddingTop="24dp"
android:paddingBottom="24dp"
android:layout_margin="16dp"
android:theme="@style/Theme.Hexapod.ButtonInactive"
android:text="Rotate Y"
app:layout_constraintBottom_toTopOf="@+id/button_rotatez"
app:layout_constraintEnd_toStartOf="@+id/button_twist"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/button_rotatex" />
<Button
android:id="@+id/button_twist"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:paddingTop="24dp"
android:paddingBottom="24dp"
android:layout_margin="16dp"
android:theme="@style/Theme.Hexapod.ButtonInactive"
android:text="Twist"
app:layout_constraintBottom_toTopOf="@+id/button6"
app:layout_constraintStart_toEndOf="@+id/button_rotatey"
app:layout_constraintTop_toBottomOf="@+id/button_climb" />
</TableRow>
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content">
<Button
android:id="@+id/button_rotatez"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:paddingTop="24dp"
android:paddingBottom="24dp"
android:layout_margin="16dp"
android:theme="@style/Theme.Hexapod.ButtonInactive"
android:text="Rotate Z"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/button6"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/button_rotatey" />
<Button
android:id="@+id/button6"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:paddingTop="24dp"
android:paddingBottom="24dp"
android:layout_margin="16dp"
android:theme="@style/Theme.Hexapod.ButtonInactive"
android:text="Button"
android:visibility="invisible"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toEndOf="@+id/button_rotatez"
app:layout_constraintTop_toBottomOf="@+id/button_twist" />
</TableRow>
</TableLayout>
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout <androidx.constraintlayout.widget.ConstraintLayout
@ -145,7 +40,7 @@
android:layout_weight="1"> android:layout_weight="1">
<ImageView <ImageView
android:id="@+id/control_image" android:id="@+id/right_control_image"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_marginStart="32dp" android:layout_marginStart="32dp"

Loading…
Cancel
Save