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 | 13 | import android.widget.Button; |
14 | 14 | import android.widget.ImageView; |
15 | 15 | |
16 | -public class Calibration extends AppCompatActivity { | |
16 | +public class Calibration extends BaseActivity { | |
17 | 17 | |
18 | 18 | @Override |
19 | 19 | protected void onCreate(Bundle savedInstanceState) { |
... | ... | @@ -40,9 +40,7 @@ public class Calibration extends AppCompatActivity { |
40 | 40 | |
41 | 41 | MapMarker.setVisibility(MapMarker.INVISIBLE); |
42 | 42 | cancelButton.setVisibility(cancelButton.INVISIBLE); |
43 | - cancelButton.setX(50); | |
44 | 43 | measureButton.setVisibility(measureButton.INVISIBLE); |
45 | - measureButton.setX(300); | |
46 | 44 | |
47 | 45 | Map.setOnTouchListener(new View.OnTouchListener() { |
48 | 46 | @Override |
... | ... | @@ -86,11 +84,12 @@ public class Calibration extends AppCompatActivity { |
86 | 84 | } |
87 | 85 | }); |
88 | 86 | } |
89 | - | |
87 | + | |
90 | 88 | @Override |
91 | 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 | 93 | return true; |
95 | 94 | } |
96 | 95 | ... | ... |
app/src/main/res/layout/content_calibration.xml
... | ... | @@ -45,45 +45,45 @@ |
45 | 45 | <Button |
46 | 46 | android:id="@+id/setPointButton" |
47 | 47 | style="@style/Widget.AppCompat.Button" |
48 | - android:layout_width="0dp" | |
48 | + android:layout_width="match_parent" | |
49 | 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 | 50 | android:layout_marginEnd="8dp" |
55 | 51 | android:layout_marginLeft="8dp" |
56 | - app:layout_constraintLeft_toLeftOf="parent" | |
57 | 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 | 58 | app:layout_constraintRight_toRightOf="parent" |
59 | - app:layout_constraintHorizontal_bias="0.0" /> | |
59 | + app:layout_constraintTop_toBottomOf="@+id/Map" /> | |
60 | 60 | |
61 | 61 | <Button |
62 | 62 | android:id="@+id/cancelButton" |
63 | - android:layout_width="368dp" | |
63 | + android:layout_width="match_parent" | |
64 | 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 | 69 | android:layout_marginTop="8dp" |
66 | 70 | android:text="Cancel" |
67 | - app:layout_constraintTop_toBottomOf="@+id/measureButton" | |
68 | - android:layout_marginLeft="8dp" | |
69 | 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 | 75 | <Button |
76 | 76 | android:id="@+id/measureButton" |
77 | - android:layout_width="0dp" | |
77 | + android:layout_width="match_parent" | |
78 | 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 | 79 | android:layout_marginEnd="8dp" |
80 | + android:layout_marginLeft="8dp" | |
84 | 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 | 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 | 89 | </android.support.constraint.ConstraintLayout> | ... | ... |