update
This commit is contained in:
parent
32bbeb25d8
commit
49a53e13e6
@ -185,15 +185,15 @@ class ControlActivity : AppCompatActivity() {
|
||||
controlImage!!.setImageResource(R.drawable.ic_control_circle_standby)
|
||||
|
||||
buttonRotateX!!.backgroundTintList =
|
||||
applicationContext.getColorStateList(R.color.grey_500)
|
||||
applicationContext.getColorStateList(R.color.grey_700)
|
||||
buttonRotateY!!.backgroundTintList =
|
||||
applicationContext.getColorStateList(R.color.grey_500)
|
||||
applicationContext.getColorStateList(R.color.grey_700)
|
||||
buttonRotateZ!!.backgroundTintList =
|
||||
applicationContext.getColorStateList(R.color.grey_500)
|
||||
applicationContext.getColorStateList(R.color.grey_700)
|
||||
buttonClimb!!.backgroundTintList =
|
||||
applicationContext.getColorStateList(R.color.grey_500)
|
||||
applicationContext.getColorStateList(R.color.grey_700)
|
||||
buttonTwist!!.backgroundTintList =
|
||||
applicationContext.getColorStateList(R.color.grey_500)
|
||||
applicationContext.getColorStateList(R.color.grey_700)
|
||||
}
|
||||
} else if (length >= radius / 3 && length < 2 * radius / 3) {
|
||||
val angle = atan2(coorY, coorX)
|
||||
@ -223,15 +223,15 @@ class ControlActivity : AppCompatActivity() {
|
||||
}
|
||||
}
|
||||
buttonRotateX!!.backgroundTintList =
|
||||
applicationContext.getColorStateList(R.color.grey_500)
|
||||
applicationContext.getColorStateList(R.color.grey_700)
|
||||
buttonRotateY!!.backgroundTintList =
|
||||
applicationContext.getColorStateList(R.color.grey_500)
|
||||
applicationContext.getColorStateList(R.color.grey_700)
|
||||
buttonRotateZ!!.backgroundTintList =
|
||||
applicationContext.getColorStateList(R.color.grey_500)
|
||||
applicationContext.getColorStateList(R.color.grey_700)
|
||||
buttonClimb!!.backgroundTintList =
|
||||
applicationContext.getColorStateList(R.color.grey_500)
|
||||
applicationContext.getColorStateList(R.color.grey_700)
|
||||
buttonTwist!!.backgroundTintList =
|
||||
applicationContext.getColorStateList(R.color.grey_500)
|
||||
applicationContext.getColorStateList(R.color.grey_700)
|
||||
} else if (length >= 2 * radius / 3 && length < radius) {
|
||||
val angle = atan2(coorY, coorX)
|
||||
if (angle > -PI / 4 && angle <= PI / 4) {
|
||||
@ -260,15 +260,15 @@ class ControlActivity : AppCompatActivity() {
|
||||
}
|
||||
}
|
||||
buttonRotateX!!.backgroundTintList =
|
||||
applicationContext.getColorStateList(R.color.grey_500)
|
||||
applicationContext.getColorStateList(R.color.grey_700)
|
||||
buttonRotateY!!.backgroundTintList =
|
||||
applicationContext.getColorStateList(R.color.grey_500)
|
||||
applicationContext.getColorStateList(R.color.grey_700)
|
||||
buttonRotateZ!!.backgroundTintList =
|
||||
applicationContext.getColorStateList(R.color.grey_500)
|
||||
applicationContext.getColorStateList(R.color.grey_700)
|
||||
buttonClimb!!.backgroundTintList =
|
||||
applicationContext.getColorStateList(R.color.grey_500)
|
||||
applicationContext.getColorStateList(R.color.grey_700)
|
||||
buttonTwist!!.backgroundTintList =
|
||||
applicationContext.getColorStateList(R.color.grey_500)
|
||||
applicationContext.getColorStateList(R.color.grey_700)
|
||||
}
|
||||
return true
|
||||
}
|
||||
@ -283,13 +283,13 @@ class ControlActivity : AppCompatActivity() {
|
||||
buttonRotateX!!.backgroundTintList =
|
||||
applicationContext.getColorStateList(R.color.purple_500)
|
||||
buttonRotateY!!.backgroundTintList =
|
||||
applicationContext.getColorStateList(R.color.grey_500)
|
||||
applicationContext.getColorStateList(R.color.grey_700)
|
||||
buttonRotateZ!!.backgroundTintList =
|
||||
applicationContext.getColorStateList(R.color.grey_500)
|
||||
applicationContext.getColorStateList(R.color.grey_700)
|
||||
buttonClimb!!.backgroundTintList =
|
||||
applicationContext.getColorStateList(R.color.grey_500)
|
||||
applicationContext.getColorStateList(R.color.grey_700)
|
||||
buttonTwist!!.backgroundTintList =
|
||||
applicationContext.getColorStateList(R.color.grey_500)
|
||||
applicationContext.getColorStateList(R.color.grey_700)
|
||||
}
|
||||
}
|
||||
|
||||
@ -299,15 +299,15 @@ class ControlActivity : AppCompatActivity() {
|
||||
currentState = CMD_ROTATEY
|
||||
controlImage!!.setImageResource(R.drawable.ic_control_circle)
|
||||
buttonRotateX!!.backgroundTintList =
|
||||
applicationContext.getColorStateList(R.color.grey_500)
|
||||
applicationContext.getColorStateList(R.color.grey_700)
|
||||
buttonRotateY!!.backgroundTintList =
|
||||
applicationContext.getColorStateList(R.color.purple_500)
|
||||
buttonRotateZ!!.backgroundTintList =
|
||||
applicationContext.getColorStateList(R.color.grey_500)
|
||||
applicationContext.getColorStateList(R.color.grey_700)
|
||||
buttonClimb!!.backgroundTintList =
|
||||
applicationContext.getColorStateList(R.color.grey_500)
|
||||
applicationContext.getColorStateList(R.color.grey_700)
|
||||
buttonTwist!!.backgroundTintList =
|
||||
applicationContext.getColorStateList(R.color.grey_500)
|
||||
applicationContext.getColorStateList(R.color.grey_700)
|
||||
}
|
||||
}
|
||||
|
||||
@ -317,15 +317,15 @@ class ControlActivity : AppCompatActivity() {
|
||||
currentState = CMD_ROTATEZ
|
||||
controlImage!!.setImageResource(R.drawable.ic_control_circle)
|
||||
buttonRotateX!!.backgroundTintList =
|
||||
applicationContext.getColorStateList(R.color.grey_500)
|
||||
applicationContext.getColorStateList(R.color.grey_700)
|
||||
buttonRotateY!!.backgroundTintList =
|
||||
applicationContext.getColorStateList(R.color.grey_500)
|
||||
applicationContext.getColorStateList(R.color.grey_700)
|
||||
buttonRotateZ!!.backgroundTintList =
|
||||
applicationContext.getColorStateList(R.color.purple_500)
|
||||
buttonClimb!!.backgroundTintList =
|
||||
applicationContext.getColorStateList(R.color.grey_500)
|
||||
applicationContext.getColorStateList(R.color.grey_700)
|
||||
buttonTwist!!.backgroundTintList =
|
||||
applicationContext.getColorStateList(R.color.grey_500)
|
||||
applicationContext.getColorStateList(R.color.grey_700)
|
||||
}
|
||||
}
|
||||
|
||||
@ -335,15 +335,15 @@ class ControlActivity : AppCompatActivity() {
|
||||
currentState = CMD_CLIMBFORWARD
|
||||
controlImage!!.setImageResource(R.drawable.ic_control_circle)
|
||||
buttonRotateX!!.backgroundTintList =
|
||||
applicationContext.getColorStateList(R.color.grey_500)
|
||||
applicationContext.getColorStateList(R.color.grey_700)
|
||||
buttonRotateY!!.backgroundTintList =
|
||||
applicationContext.getColorStateList(R.color.grey_500)
|
||||
applicationContext.getColorStateList(R.color.grey_700)
|
||||
buttonRotateZ!!.backgroundTintList =
|
||||
applicationContext.getColorStateList(R.color.grey_500)
|
||||
applicationContext.getColorStateList(R.color.grey_700)
|
||||
buttonClimb!!.backgroundTintList =
|
||||
applicationContext.getColorStateList(R.color.purple_500)
|
||||
buttonTwist!!.backgroundTintList =
|
||||
applicationContext.getColorStateList(R.color.grey_500)
|
||||
applicationContext.getColorStateList(R.color.grey_700)
|
||||
}
|
||||
}
|
||||
|
||||
@ -353,13 +353,13 @@ class ControlActivity : AppCompatActivity() {
|
||||
currentState = CMD_TWIST
|
||||
controlImage!!.setImageResource(R.drawable.ic_control_circle)
|
||||
buttonRotateX!!.backgroundTintList =
|
||||
applicationContext.getColorStateList(R.color.grey_500)
|
||||
applicationContext.getColorStateList(R.color.grey_700)
|
||||
buttonRotateY!!.backgroundTintList =
|
||||
applicationContext.getColorStateList(R.color.grey_500)
|
||||
applicationContext.getColorStateList(R.color.grey_700)
|
||||
buttonRotateZ!!.backgroundTintList =
|
||||
applicationContext.getColorStateList(R.color.grey_500)
|
||||
applicationContext.getColorStateList(R.color.grey_700)
|
||||
buttonClimb!!.backgroundTintList =
|
||||
applicationContext.getColorStateList(R.color.grey_500)
|
||||
applicationContext.getColorStateList(R.color.grey_700)
|
||||
buttonTwist!!.backgroundTintList =
|
||||
applicationContext.getColorStateList(R.color.purple_500)
|
||||
}
|
||||
@ -431,15 +431,15 @@ class ControlActivity : AppCompatActivity() {
|
||||
controlImage!!.setImageResource(R.drawable.ic_control_circle_standby)
|
||||
|
||||
buttonRotateX!!.backgroundTintList =
|
||||
applicationContext.getColorStateList(R.color.grey_500)
|
||||
applicationContext.getColorStateList(R.color.grey_700)
|
||||
buttonRotateY!!.backgroundTintList =
|
||||
applicationContext.getColorStateList(R.color.grey_500)
|
||||
applicationContext.getColorStateList(R.color.grey_700)
|
||||
buttonRotateZ!!.backgroundTintList =
|
||||
applicationContext.getColorStateList(R.color.grey_500)
|
||||
applicationContext.getColorStateList(R.color.grey_700)
|
||||
buttonClimb!!.backgroundTintList =
|
||||
applicationContext.getColorStateList(R.color.grey_500)
|
||||
applicationContext.getColorStateList(R.color.grey_700)
|
||||
buttonTwist!!.backgroundTintList =
|
||||
applicationContext.getColorStateList(R.color.grey_500)
|
||||
applicationContext.getColorStateList(R.color.grey_700)
|
||||
|
||||
}
|
||||
|
||||
|
@ -9,7 +9,8 @@
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/grey_500">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="0dp"
|
||||
|
@ -7,6 +7,7 @@
|
||||
<color name="grey_200">#FFEEEEEE</color>
|
||||
<color name="grey_500">#FF9E9E9E</color>
|
||||
<color name="grey_700">#FF616161</color>
|
||||
<color name="grey_800">#FF424242</color>
|
||||
<color name="teal_200">#FF03DAC5</color>
|
||||
<color name="teal_700">#FF018786</color>
|
||||
<color name="black">#FF000000</color>
|
||||
|
@ -30,8 +30,8 @@
|
||||
|
||||
<style name="Theme.Hexapod.ButtonInactive" parent="Theme.MaterialComponents.DayNight.DarkActionBar">
|
||||
<!-- Primary brand color. -->
|
||||
<item name="colorPrimary">@color/grey_500</item>
|
||||
<item name="colorPrimaryVariant">@color/grey_700</item>
|
||||
<item name="colorPrimary">@color/grey_700</item>
|
||||
<item name="colorPrimaryVariant">@color/grey_800</item>
|
||||
<item name="colorOnPrimary">@color/white</item>
|
||||
<!-- Secondary brand color. -->
|
||||
<item name="colorSecondary">@color/teal_200</item>
|
||||
|
Loading…
x
Reference in New Issue
Block a user