Commit 7a4f791c7b8422fbc982cabd4b79045429e5cd7f
1 parent
983f6243
Allignement des boutons !!!!!!!!!!
Showing
2 changed files
with
26 additions
and
27 deletions
Show diff stats
app/src/main/java/fr/utbm/lo53/p2017/positionningapp/Calibration.java
@@ -13,7 +13,7 @@ import android.view.MenuItem; | @@ -13,7 +13,7 @@ import android.view.MenuItem; | ||
13 | import android.widget.Button; | 13 | import android.widget.Button; |
14 | import android.widget.ImageView; | 14 | import android.widget.ImageView; |
15 | 15 | ||
16 | -public class Calibration extends AppCompatActivity { | 16 | +public class Calibration extends BaseActivity { |
17 | 17 | ||
18 | @Override | 18 | @Override |
19 | protected void onCreate(Bundle savedInstanceState) { | 19 | protected void onCreate(Bundle savedInstanceState) { |
@@ -40,9 +40,7 @@ public class Calibration extends AppCompatActivity { | @@ -40,9 +40,7 @@ public class Calibration extends AppCompatActivity { | ||
40 | 40 | ||
41 | MapMarker.setVisibility(MapMarker.INVISIBLE); | 41 | MapMarker.setVisibility(MapMarker.INVISIBLE); |
42 | cancelButton.setVisibility(cancelButton.INVISIBLE); | 42 | cancelButton.setVisibility(cancelButton.INVISIBLE); |
43 | - cancelButton.setX(50); | ||
44 | measureButton.setVisibility(measureButton.INVISIBLE); | 43 | measureButton.setVisibility(measureButton.INVISIBLE); |
45 | - measureButton.setX(300); | ||
46 | 44 | ||
47 | Map.setOnTouchListener(new View.OnTouchListener() { | 45 | Map.setOnTouchListener(new View.OnTouchListener() { |
48 | @Override | 46 | @Override |
@@ -86,11 +84,12 @@ public class Calibration extends AppCompatActivity { | @@ -86,11 +84,12 @@ public class Calibration extends AppCompatActivity { | ||
86 | } | 84 | } |
87 | }); | 85 | }); |
88 | } | 86 | } |
89 | - | 87 | + |
90 | @Override | 88 | @Override |
91 | public boolean onCreateOptionsMenu(Menu menu) { | 89 | public boolean onCreateOptionsMenu(Menu menu) { |
92 | - // Inflate the menu; this adds items to the action bar if it is present. | ||
93 | - getMenuInflater().inflate(R.menu.menu_calibration, menu); | 90 | + super.onCreateOptionsMenu(menu); |
91 | + MenuItem item = menu.findItem(R.id.open_locate_activity); | ||
92 | + item.setVisible(true); | ||
94 | return true; | 93 | return true; |
95 | } | 94 | } |
96 | 95 |
app/src/main/res/layout/content_calibration.xml
@@ -45,45 +45,45 @@ | @@ -45,45 +45,45 @@ | ||
45 | <Button | 45 | <Button |
46 | android:id="@+id/setPointButton" | 46 | android:id="@+id/setPointButton" |
47 | style="@style/Widget.AppCompat.Button" | 47 | style="@style/Widget.AppCompat.Button" |
48 | - android:layout_width="0dp" | 48 | + android:layout_width="match_parent" |
49 | android:layout_height="wrap_content" | 49 | android:layout_height="wrap_content" |
50 | - android:layout_marginTop="50dp" | ||
51 | - android:text="Set Point" | ||
52 | - app:layout_constraintTop_toBottomOf="@+id/Map" | ||
53 | - android:layout_marginStart="8dp" | ||
54 | android:layout_marginEnd="8dp" | 50 | android:layout_marginEnd="8dp" |
55 | android:layout_marginLeft="8dp" | 51 | android:layout_marginLeft="8dp" |
56 | - app:layout_constraintLeft_toLeftOf="parent" | ||
57 | android:layout_marginRight="8dp" | 52 | android:layout_marginRight="8dp" |
53 | + android:layout_marginStart="8dp" | ||
54 | + android:layout_marginTop="50dp" | ||
55 | + android:text="Set Point" | ||
56 | + app:layout_constraintHorizontal_bias="0.0" | ||
57 | + app:layout_constraintLeft_toLeftOf="parent" | ||
58 | app:layout_constraintRight_toRightOf="parent" | 58 | app:layout_constraintRight_toRightOf="parent" |
59 | - app:layout_constraintHorizontal_bias="0.0" /> | 59 | + app:layout_constraintTop_toBottomOf="@+id/Map" /> |
60 | 60 | ||
61 | <Button | 61 | <Button |
62 | android:id="@+id/cancelButton" | 62 | android:id="@+id/cancelButton" |
63 | - android:layout_width="368dp" | 63 | + android:layout_width="match_parent" |
64 | android:layout_height="wrap_content" | 64 | android:layout_height="wrap_content" |
65 | + android:layout_marginEnd="8dp" | ||
66 | + android:layout_marginLeft="8dp" | ||
67 | + android:layout_marginRight="8dp" | ||
68 | + android:layout_marginStart="8dp" | ||
65 | android:layout_marginTop="8dp" | 69 | android:layout_marginTop="8dp" |
66 | android:text="Cancel" | 70 | android:text="Cancel" |
67 | - app:layout_constraintTop_toBottomOf="@+id/measureButton" | ||
68 | - android:layout_marginLeft="8dp" | ||
69 | app:layout_constraintLeft_toLeftOf="parent" | 71 | app:layout_constraintLeft_toLeftOf="parent" |
70 | - android:layout_marginStart="8dp" | ||
71 | - android:layout_marginEnd="8dp" | ||
72 | - android:layout_marginRight="8dp" | ||
73 | - app:layout_constraintRight_toRightOf="parent" /> | 72 | + app:layout_constraintRight_toRightOf="parent" |
73 | + app:layout_constraintTop_toBottomOf="@+id/measureButton" /> | ||
74 | 74 | ||
75 | <Button | 75 | <Button |
76 | android:id="@+id/measureButton" | 76 | android:id="@+id/measureButton" |
77 | - android:layout_width="0dp" | 77 | + android:layout_width="match_parent" |
78 | android:layout_height="wrap_content" | 78 | android:layout_height="wrap_content" |
79 | - android:layout_marginTop="50dp" | ||
80 | - android:text="Measure" | ||
81 | - app:layout_constraintTop_toBottomOf="@+id/Map" | ||
82 | - android:layout_marginStart="8dp" | ||
83 | android:layout_marginEnd="8dp" | 79 | android:layout_marginEnd="8dp" |
80 | + android:layout_marginLeft="8dp" | ||
84 | android:layout_marginRight="8dp" | 81 | android:layout_marginRight="8dp" |
82 | + android:layout_marginStart="8dp" | ||
83 | + android:layout_marginTop="50dp" | ||
84 | + android:text="Measure" | ||
85 | + app:layout_constraintLeft_toLeftOf="parent" | ||
85 | app:layout_constraintRight_toRightOf="parent" | 86 | app:layout_constraintRight_toRightOf="parent" |
86 | - android:layout_marginLeft="8dp" | ||
87 | - app:layout_constraintLeft_toLeftOf="parent" /> | 87 | + app:layout_constraintTop_toBottomOf="@+id/Map" /> |
88 | 88 | ||
89 | </android.support.constraint.ConstraintLayout> | 89 | </android.support.constraint.ConstraintLayout> |