Skip to content
Snippets Groups Projects
Commit 2ee84fe7 authored by CHAPUSOT Alexis's avatar CHAPUSOT Alexis
Browse files

modification sensor

parent 4cd3b143
No related branches found
No related tags found
No related merge requests found
......@@ -137,7 +137,7 @@ public class SensorView extends FrameLayout implements SensorEventListener {
// Conversion de l'angle en radians en degrés
inclinaison = (int)Math.toDegrees(angle);
niveauABulle.setRotation((float) inclinaison);
if(inclinaison >= -1 && inclinaison < 2 && direction.equals(getCardinalDirection(azimuth))){
if(inclinaison >= -3 && inclinaison < 4 && direction.equals(getCardinalDirection(azimuth))){
button.setColorFilter(Color.argb(0,0,0,0));
canShoot =true;
}
......
......@@ -22,7 +22,7 @@
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.499"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintBottom_toBottomOf="parent"
android:layout_marginTop="10dp" android:layout_marginStart="300dp"/>
android:layout_marginTop="0dp" android:layout_marginStart="300dp"/>
<ImageView android:layout_width="wrap_content" android:layout_height="30dp" android:backgroundTint="@color/white" app:srcCompat="@android:drawable/bottom_bar"
android:translationX="100dp"
android:id="@+id/niveauabulle"/>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment