Showing
2 changed files
with
205 additions
and
180 deletions
... | @@ -15,6 +15,7 @@ import android.location.LocationManager; | ... | @@ -15,6 +15,7 @@ import android.location.LocationManager; |
15 | import android.os.Bundle; | 15 | import android.os.Bundle; |
16 | import android.os.Environment; | 16 | import android.os.Environment; |
17 | import android.os.Handler; | 17 | import android.os.Handler; |
18 | +import android.text.TextUtils; | ||
18 | import android.view.MotionEvent; | 19 | import android.view.MotionEvent; |
19 | import android.view.View; | 20 | import android.view.View; |
20 | import android.view.WindowManager; | 21 | import android.view.WindowManager; |
... | @@ -88,7 +89,7 @@ public class TelematicsActivity extends Activity implements View.OnClickListener | ... | @@ -88,7 +89,7 @@ public class TelematicsActivity extends Activity implements View.OnClickListener |
88 | final long REFRESH_TIME = 100; // miliseconds | 89 | final long REFRESH_TIME = 100; // miliseconds |
89 | private String mStartTimestamp = "", mStopTimestamp = ""; | 90 | private String mStartTimestamp = "", mStopTimestamp = ""; |
90 | private final int RECORDS_INTERVAL = 5000; | 91 | private final int RECORDS_INTERVAL = 5000; |
91 | - private EditText mEtLimit; | 92 | + private EditText mEtLimit, mEtSampleTime; |
92 | 93 | ||
93 | 94 | ||
94 | // =========================================================== | 95 | // =========================================================== |
... | @@ -114,6 +115,7 @@ public class TelematicsActivity extends Activity implements View.OnClickListener | ... | @@ -114,6 +115,7 @@ public class TelematicsActivity extends Activity implements View.OnClickListener |
114 | mTvOrientationCount = findViewById(R.id.tv_orientation); | 115 | mTvOrientationCount = findViewById(R.id.tv_orientation); |
115 | mTvTouchCount = findViewById(R.id.tv_touch); | 116 | mTvTouchCount = findViewById(R.id.tv_touch); |
116 | mEtLimit = findViewById(R.id.et_acceleration); | 117 | mEtLimit = findViewById(R.id.et_acceleration); |
118 | + mEtSampleTime = findViewById(R.id.et_save); | ||
117 | 119 | ||
118 | locationManager = (LocationManager) getSystemService(Context.LOCATION_SERVICE); | 120 | locationManager = (LocationManager) getSystemService(Context.LOCATION_SERVICE); |
119 | previousLocation = null; | 121 | previousLocation = null; |
... | @@ -176,8 +178,9 @@ public class TelematicsActivity extends Activity implements View.OnClickListener | ... | @@ -176,8 +178,9 @@ public class TelematicsActivity extends Activity implements View.OnClickListener |
176 | velocity = acceleration * time; | 178 | velocity = acceleration * time; |
177 | } | 179 | } |
178 | // Convert velocity to km/h | 180 | // Convert velocity to km/h |
179 | - mAcceleration = velocity * 3.6f; // Convert to km/h | 181 | +// mAcceleration = velocity * 3.6f; // Convert to km/h |
180 | - mTvVelocity.setText(String.format("%.1f", mAcceleration) + " km/h"); | 182 | + mAcceleration = velocity; // Convert to km/h |
183 | + mTvVelocity.setText(String.format("%.1f", velocity) + " m/s^2"); | ||
181 | // Update last values | 184 | // Update last values |
182 | lastX = filteredX; | 185 | lastX = filteredX; |
183 | lastY = filteredY; | 186 | lastY = filteredY; |
... | @@ -253,7 +256,7 @@ public class TelematicsActivity extends Activity implements View.OnClickListener | ... | @@ -253,7 +256,7 @@ public class TelematicsActivity extends Activity implements View.OnClickListener |
253 | //TODO: comment the first block and uncomment the second block if needs revert to handler implementation | 256 | //TODO: comment the first block and uncomment the second block if needs revert to handler implementation |
254 | if (mLatitude != 0 && mLongitude != 0) { | 257 | if (mLatitude != 0 && mLongitude != 0) { |
255 | mSpeed = calculateSpeed(mLatitude, mLongitude, location.getLatitude(), location.getLongitude(), (LOCATION_UPDATE_INTERVAL / 1000)); | 258 | mSpeed = calculateSpeed(mLatitude, mLongitude, location.getLatitude(), location.getLongitude(), (LOCATION_UPDATE_INTERVAL / 1000)); |
256 | - mTvAvgVelocity.setText(String.format("%.1f", Math.floor(mSpeed)) + " km/h"); | 259 | + mTvAvgVelocity.setText(String.format("%.1f", Math.floor(mSpeed)) + " m/s^2"); |
257 | } | 260 | } |
258 | 261 | ||
259 | 262 | ||
... | @@ -317,8 +320,8 @@ public class TelematicsActivity extends Activity implements View.OnClickListener | ... | @@ -317,8 +320,8 @@ public class TelematicsActivity extends Activity implements View.OnClickListener |
317 | // =========================================================== | 320 | // =========================================================== |
318 | 321 | ||
319 | private void initViews() { | 322 | private void initViews() { |
320 | - mTvVelocity.setText("0.0 km/h"); | 323 | + mTvVelocity.setText("0.0 m/s^2"); |
321 | - mTvAvgVelocity.setText("0.0 km/h"); | 324 | + mTvAvgVelocity.setText("0.0 m/s^2"); |
322 | } | 325 | } |
323 | 326 | ||
324 | private void requestLocationUpdates() { | 327 | private void requestLocationUpdates() { |
... | @@ -349,7 +352,7 @@ public class TelematicsActivity extends Activity implements View.OnClickListener | ... | @@ -349,7 +352,7 @@ public class TelematicsActivity extends Activity implements View.OnClickListener |
349 | @Override | 352 | @Override |
350 | public void run() { | 353 | public void run() { |
351 | double speed = calculateSpeed(mLatitude, mLongitude, location.getLatitude(), location.getLongitude(), (LOCATION_UPDATE_INTERVAL / 1000)); | 354 | double speed = calculateSpeed(mLatitude, mLongitude, location.getLatitude(), location.getLongitude(), (LOCATION_UPDATE_INTERVAL / 1000)); |
352 | - mTvAvgVelocity.setText(String.format("%.1f", Math.floor(speed)) + " km/h"); | 355 | + mTvAvgVelocity.setText(String.format("%.1f", Math.floor(speed)) + " m/s^2"); |
353 | mLocationHandler.postDelayed(this, LOCATION_UPDATE_INTERVAL); | 356 | mLocationHandler.postDelayed(this, LOCATION_UPDATE_INTERVAL); |
354 | } | 357 | } |
355 | }; | 358 | }; |
... | @@ -365,7 +368,8 @@ public class TelematicsActivity extends Activity implements View.OnClickListener | ... | @@ -365,7 +368,8 @@ public class TelematicsActivity extends Activity implements View.OnClickListener |
365 | // Function to calculate speed in meters per second | 368 | // Function to calculate speed in meters per second |
366 | private double calculateSpeed(double lat1, double lon1, double lat2, double lon2, double timeDifferenceInSeconds) { | 369 | private double calculateSpeed(double lat1, double lon1, double lat2, double lon2, double timeDifferenceInSeconds) { |
367 | double distance = calculateDistance(lat1, lon1, lat2, lon2); | 370 | double distance = calculateDistance(lat1, lon1, lat2, lon2); |
368 | - return (distance / timeDifferenceInSeconds) * 3.6f; // Convert to km/h; | 371 | +// return (distance / timeDifferenceInSeconds) * 3.6f; // Convert to km/h; |
372 | + return (distance / timeDifferenceInSeconds); // Convert to km/h; | ||
369 | } | 373 | } |
370 | 374 | ||
371 | private void requestSingleLocationUpdate() { | 375 | private void requestSingleLocationUpdate() { |
... | @@ -430,10 +434,10 @@ public class TelematicsActivity extends Activity implements View.OnClickListener | ... | @@ -430,10 +434,10 @@ public class TelematicsActivity extends Activity implements View.OnClickListener |
430 | e.printStackTrace(); | 434 | e.printStackTrace(); |
431 | Snackbar.make(mLlTelematicsMain, "Runnable Failed", Snackbar.LENGTH_SHORT).show(); | 435 | Snackbar.make(mLlTelematicsMain, "Runnable Failed", Snackbar.LENGTH_SHORT).show(); |
432 | } | 436 | } |
433 | - mHandler.postDelayed(this, RECORDS_INTERVAL); | 437 | + mHandler.postDelayed(this, TextUtils.isEmpty(mEtSampleTime.getText()) ? RECORDS_INTERVAL : Integer.valueOf(mEtSampleTime.getText().toString())); |
434 | } | 438 | } |
435 | }; | 439 | }; |
436 | - mHandler.postDelayed(mRunnable, RECORDS_INTERVAL); | 440 | + mHandler.postDelayed(mRunnable, TextUtils.isEmpty(mEtSampleTime.getText()) ? RECORDS_INTERVAL : Integer.valueOf(mEtSampleTime.getText().toString())); |
437 | } | 441 | } |
438 | 442 | ||
439 | private void unregisterSensor() { | 443 | private void unregisterSensor() { |
... | @@ -441,8 +445,8 @@ public class TelematicsActivity extends Activity implements View.OnClickListener | ... | @@ -441,8 +445,8 @@ public class TelematicsActivity extends Activity implements View.OnClickListener |
441 | orientationCount = 0; | 445 | orientationCount = 0; |
442 | touchCount = 0; | 446 | touchCount = 0; |
443 | mSensorManager.unregisterListener(this); | 447 | mSensorManager.unregisterListener(this); |
444 | - mTvVelocity.setText("0.0 km/h"); | 448 | + mTvVelocity.setText("0.0 m/s^2"); |
445 | - mTvAvgVelocity.setText("0.0 km/h"); | 449 | + mTvAvgVelocity.setText("0.0 m/s^2"); |
446 | Snackbar.make(mLlTelematicsMain, "Sensor Unregistered", Snackbar.LENGTH_SHORT).show(); | 450 | Snackbar.make(mLlTelematicsMain, "Sensor Unregistered", Snackbar.LENGTH_SHORT).show(); |
447 | if (mHandler != null) | 451 | if (mHandler != null) |
448 | mHandler.removeCallbacks(mRunnable); | 452 | mHandler.removeCallbacks(mRunnable); | ... | ... |
... | @@ -39,190 +39,211 @@ | ... | @@ -39,190 +39,211 @@ |
39 | app:layout_constraintTop_toTopOf="parent" /> | 39 | app:layout_constraintTop_toTopOf="parent" /> |
40 | </androidx.constraintlayout.widget.ConstraintLayout> | 40 | </androidx.constraintlayout.widget.ConstraintLayout> |
41 | 41 | ||
42 | - <RelativeLayout | 42 | + <ScrollView |
43 | - android:layout_width="match_parent" | 43 | + android:fillViewport="true" |
44 | - android:layout_height="match_parent" | 44 | + android:layout_width="wrap_content" |
45 | - android:background="@color/cos_light_grey3" | 45 | + android:layout_height="match_parent"> |
46 | - android:gravity="center_horizontal"> | ||
47 | 46 | ||
48 | - <TextView | 47 | + <RelativeLayout |
49 | - android:id="@+id/tv_sensor_data_label" | 48 | + android:layout_width="match_parent" |
50 | - fontPath="fonts/PeridotPE-Regular.ttf" | 49 | + android:layout_height="match_parent" |
51 | - android:layout_width="wrap_content" | 50 | + android:background="@color/cos_light_grey3" |
52 | - android:layout_height="wrap_content" | 51 | + android:gravity="center_horizontal"> |
53 | - android:layout_centerHorizontal="true" | ||
54 | - android:layout_marginTop="24dp" | ||
55 | - android:text="Sensor Data" | ||
56 | - android:textColor="@color/blue_dark" | ||
57 | - android:textSize="16sp" /> | ||
58 | 52 | ||
59 | - <TextView | 53 | + <TextView |
60 | - android:id="@+id/tv_sensor_data" | 54 | + android:id="@+id/tv_sensor_data_label" |
61 | - fontPath="fonts/PeridotPE-Bold.ttf" | 55 | + fontPath="fonts/PeridotPE-Regular.ttf" |
62 | - android:layout_width="wrap_content" | 56 | + android:layout_width="wrap_content" |
63 | - android:layout_height="wrap_content" | 57 | + android:layout_height="wrap_content" |
64 | - android:layout_below="@+id/tv_sensor_data_label" | 58 | + android:layout_centerHorizontal="true" |
65 | - android:layout_centerHorizontal="true" | 59 | + android:layout_marginTop="24dp" |
66 | - android:layout_marginTop="24dp" | 60 | + android:text="Sensor Data" |
67 | - android:textColor="@color/blue_dark" | 61 | + android:textColor="@color/blue_dark" |
68 | - android:textSize="16sp" /> | 62 | + android:textSize="16sp" /> |
69 | 63 | ||
70 | - <TextView | 64 | + <TextView |
71 | - android:id="@+id/tv_velocity_label" | 65 | + android:id="@+id/tv_sensor_data" |
72 | - fontPath="fonts/PeridotPE-Regular.ttf" | 66 | + fontPath="fonts/PeridotPE-Bold.ttf" |
73 | - android:layout_width="wrap_content" | 67 | + android:layout_width="wrap_content" |
74 | - android:layout_height="wrap_content" | 68 | + android:layout_height="wrap_content" |
75 | - android:layout_centerHorizontal="true" | 69 | + android:layout_below="@+id/tv_sensor_data_label" |
76 | - android:layout_marginTop="24dp" | 70 | + android:layout_centerHorizontal="true" |
77 | - android:text="Acceleration" | 71 | + android:layout_marginTop="24dp" |
78 | - android:layout_below="@+id/tv_sensor_data" | 72 | + android:textColor="@color/blue_dark" |
79 | - android:textColor="@color/blue_dark" | 73 | + android:textSize="16sp" /> |
80 | - android:textSize="16sp" /> | ||
81 | 74 | ||
82 | - <TextView | 75 | + <TextView |
83 | - android:id="@+id/tv_velocity" | 76 | + android:id="@+id/tv_velocity_label" |
84 | - fontPath="fonts/PeridotPE-Bold.ttf" | 77 | + fontPath="fonts/PeridotPE-Regular.ttf" |
85 | - android:layout_width="wrap_content" | 78 | + android:layout_width="wrap_content" |
86 | - android:layout_height="wrap_content" | 79 | + android:layout_height="wrap_content" |
87 | - android:layout_below="@+id/tv_velocity_label" | 80 | + android:layout_below="@+id/tv_sensor_data" |
88 | - android:layout_centerHorizontal="true" | 81 | + android:layout_centerHorizontal="true" |
89 | - android:layout_marginTop="24dp" | 82 | + android:layout_marginTop="24dp" |
90 | - android:textColor="@color/blue_dark" | 83 | + android:text="Acceleration" |
91 | - android:textSize="16sp" /> | 84 | + android:textColor="@color/blue_dark" |
85 | + android:textSize="16sp" /> | ||
92 | 86 | ||
93 | - <TextView | 87 | + <TextView |
94 | - android:id="@+id/tv_avg_label" | 88 | + android:id="@+id/tv_velocity" |
95 | - fontPath="fonts/PeridotPE-Regular.ttf" | 89 | + fontPath="fonts/PeridotPE-Bold.ttf" |
96 | - android:layout_width="wrap_content" | 90 | + android:layout_width="wrap_content" |
97 | - android:layout_height="wrap_content" | 91 | + android:layout_height="wrap_content" |
98 | - android:layout_centerHorizontal="true" | 92 | + android:layout_below="@+id/tv_velocity_label" |
99 | - android:layout_marginTop="24dp" | 93 | + android:layout_centerHorizontal="true" |
100 | - android:text="Velocity" | 94 | + android:layout_marginTop="24dp" |
101 | - android:layout_below="@+id/tv_velocity" | 95 | + android:textColor="@color/blue_dark" |
102 | - android:textColor="@color/blue_dark" | 96 | + android:textSize="20sp" /> |
103 | - android:textSize="16sp" /> | ||
104 | 97 | ||
105 | - <TextView | 98 | + <TextView |
106 | - android:id="@+id/tv_avg" | 99 | + android:id="@+id/tv_avg_label" |
107 | - fontPath="fonts/PeridotPE-Bold.ttf" | 100 | + fontPath="fonts/PeridotPE-Regular.ttf" |
108 | - android:layout_width="wrap_content" | 101 | + android:layout_width="wrap_content" |
109 | - android:layout_height="wrap_content" | 102 | + android:layout_height="wrap_content" |
110 | - android:layout_below="@+id/tv_avg_label" | 103 | + android:layout_below="@+id/tv_velocity" |
111 | - android:layout_centerHorizontal="true" | 104 | + android:layout_centerHorizontal="true" |
112 | - android:layout_marginTop="24dp" | 105 | + android:layout_marginTop="24dp" |
113 | - android:textColor="@color/blue_dark" | 106 | + android:text="Velocity" |
114 | - android:textSize="16sp" /> | 107 | + android:textColor="@color/blue_dark" |
108 | + android:textSize="16sp" /> | ||
115 | 109 | ||
116 | - <TextView | 110 | + <TextView |
117 | - android:id="@+id/tv_orientation_label" | 111 | + android:id="@+id/tv_avg" |
118 | - fontPath="fonts/PeridotPE-Regular.ttf" | 112 | + fontPath="fonts/PeridotPE-Bold.ttf" |
119 | - android:layout_width="wrap_content" | 113 | + android:layout_width="wrap_content" |
120 | - android:layout_height="wrap_content" | 114 | + android:layout_height="wrap_content" |
121 | - android:layout_alignParentStart="true" | 115 | + android:layout_below="@+id/tv_avg_label" |
122 | - android:layout_marginTop="24dp" | 116 | + android:layout_centerHorizontal="true" |
123 | - android:layout_marginStart="24dp" | 117 | + android:layout_marginTop="24dp" |
124 | - android:text="Orientation Count" | 118 | + android:textColor="@color/blue_dark" |
125 | - android:layout_below="@+id/tv_avg" | 119 | + android:textSize="20sp" /> |
126 | - android:textColor="@color/blue_dark" | ||
127 | - android:textSize="16sp" /> | ||
128 | 120 | ||
129 | - <TextView | 121 | + <TextView |
130 | - android:id="@+id/tv_orientation" | 122 | + android:id="@+id/tv_orientation_label" |
131 | - fontPath="fonts/PeridotPE-Bold.ttf" | 123 | + fontPath="fonts/PeridotPE-Regular.ttf" |
132 | - android:layout_width="wrap_content" | 124 | + android:layout_width="wrap_content" |
133 | - android:layout_height="wrap_content" | 125 | + android:layout_height="wrap_content" |
134 | - android:layout_below="@+id/tv_orientation_label" | 126 | + android:layout_below="@+id/tv_avg" |
135 | - android:layout_alignStart="@+id/tv_orientation_label" | 127 | + android:layout_alignParentStart="true" |
136 | - android:layout_alignEnd="@+id/tv_orientation_label" | 128 | + android:layout_marginStart="24dp" |
137 | - android:layout_marginTop="24dp" | 129 | + android:layout_marginTop="24dp" |
138 | - android:gravity="center" | 130 | + android:text="Orientation Count" |
139 | - android:textColor="@color/blue_dark" | 131 | + android:textColor="@color/blue_dark" |
140 | - android:textSize="16sp" /> | 132 | + android:textSize="16sp" /> |
141 | 133 | ||
142 | - <TextView | 134 | + <TextView |
143 | - android:id="@+id/tv_touch_label" | 135 | + android:id="@+id/tv_orientation" |
144 | - fontPath="fonts/PeridotPE-Regular.ttf" | 136 | + fontPath="fonts/PeridotPE-Bold.ttf" |
145 | - android:layout_width="wrap_content" | 137 | + android:layout_width="wrap_content" |
146 | - android:layout_height="wrap_content" | 138 | + android:layout_height="wrap_content" |
147 | - android:layout_marginTop="24dp" | 139 | + android:layout_below="@+id/tv_orientation_label" |
148 | - android:layout_marginEnd="24dp" | 140 | + android:layout_alignStart="@+id/tv_orientation_label" |
149 | - android:layout_alignParentEnd="true" | 141 | + android:layout_alignEnd="@+id/tv_orientation_label" |
150 | - android:text="Touch Count" | 142 | + android:layout_marginTop="24dp" |
151 | - android:layout_below="@+id/tv_avg" | 143 | + android:gravity="center" |
152 | - android:layout_alignEnd="@+id/tv_orientation_label" | 144 | + android:textColor="@color/blue_dark" |
153 | - android:textColor="@color/blue_dark" | 145 | + android:textSize="16sp" /> |
154 | - android:textSize="16sp" /> | ||
155 | 146 | ||
156 | - <TextView | 147 | + <TextView |
157 | - android:id="@+id/tv_touch" | 148 | + android:id="@+id/tv_touch_label" |
158 | - fontPath="fonts/PeridotPE-Bold.ttf" | 149 | + fontPath="fonts/PeridotPE-Regular.ttf" |
159 | - android:layout_width="wrap_content" | 150 | + android:layout_width="wrap_content" |
160 | - android:layout_height="wrap_content" | 151 | + android:layout_height="wrap_content" |
161 | - android:layout_below="@+id/tv_touch_label" | 152 | + android:layout_below="@+id/tv_avg" |
162 | - android:layout_alignStart="@+id/tv_touch_label" | 153 | + android:layout_alignParentEnd="true" |
163 | - android:layout_alignEnd="@+id/tv_touch_label" | 154 | + android:layout_marginTop="24dp" |
164 | - android:layout_marginTop="24dp" | 155 | + android:paddingEnd="24dp" |
165 | - android:gravity="center" | 156 | + android:layout_marginEnd="24dp" |
166 | - android:textColor="@color/blue_dark" | 157 | + android:text="Touch Count" |
167 | - android:textSize="16sp" /> | 158 | + android:textColor="@color/blue_dark" |
159 | + android:textSize="16sp" /> | ||
168 | 160 | ||
169 | - <TextView | 161 | + <TextView |
170 | - android:id="@+id/tv_records_label" | 162 | + android:id="@+id/tv_touch" |
171 | - fontPath="fonts/PeridotPE-Regular.ttf" | 163 | + fontPath="fonts/PeridotPE-Bold.ttf" |
172 | - android:layout_width="wrap_content" | 164 | + android:layout_width="wrap_content" |
173 | - android:layout_height="wrap_content" | 165 | + android:layout_height="wrap_content" |
174 | - android:layout_centerHorizontal="true" | 166 | + android:layout_below="@+id/tv_touch_label" |
175 | - android:layout_marginTop="24dp" | 167 | + android:layout_alignStart="@+id/tv_touch_label" |
176 | - android:text="Records Saved" | 168 | + android:layout_alignEnd="@+id/tv_touch_label" |
177 | - android:layout_below="@+id/tv_orientation" | 169 | + android:layout_marginTop="24dp" |
178 | - android:textColor="@color/blue_dark" | 170 | + android:gravity="center" |
179 | - android:textSize="16sp" /> | 171 | + android:textColor="@color/blue_dark" |
172 | + android:textSize="16sp" /> | ||
180 | 173 | ||
181 | - <TextView | 174 | + <TextView |
182 | - android:id="@+id/tv_records" | 175 | + android:id="@+id/tv_records_label" |
183 | - fontPath="fonts/PeridotPE-Bold.ttf" | 176 | + fontPath="fonts/PeridotPE-Regular.ttf" |
184 | - android:layout_width="wrap_content" | 177 | + android:layout_width="wrap_content" |
185 | - android:layout_height="wrap_content" | 178 | + android:layout_height="wrap_content" |
186 | - android:layout_below="@+id/tv_records_label" | 179 | + android:layout_below="@+id/tv_orientation" |
187 | - android:layout_centerHorizontal="true" | 180 | + android:layout_centerHorizontal="true" |
188 | - android:layout_marginTop="24dp" | 181 | + android:layout_marginTop="24dp" |
189 | - android:textColor="@color/blue_dark" | 182 | + android:text="Records Saved" |
190 | - android:textSize="16sp" /> | 183 | + android:textColor="@color/blue_dark" |
191 | - | 184 | + android:textSize="16sp" /> |
192 | - <EditText | ||
193 | - android:id="@+id/et_acceleration" | ||
194 | - fontPath="fonts/PeridotPE-Bold.ttf" | ||
195 | - android:layout_width="wrap_content" | ||
196 | - android:layout_height="wrap_content" | ||
197 | - android:layout_centerHorizontal="true" | ||
198 | - android:textColor="@color/blue_dark" | ||
199 | - android:textSize="16sp" | ||
200 | - android:inputType="phone" | ||
201 | - android:layout_marginTop="24dp" | ||
202 | - android:hint="Cut off in km/h" | ||
203 | - android:layout_below="@+id/tv_records"/> | ||
204 | - | ||
205 | - <LinearLayout | ||
206 | - android:id="@+id/ll_activate_button" | ||
207 | - android:layout_width="match_parent" | ||
208 | - android:layout_height="55dp" | ||
209 | - android:layout_alignParentBottom="true" | ||
210 | - android:layout_marginHorizontal="24dp" | ||
211 | - android:layout_marginBottom="56dp" | ||
212 | - android:background="@drawable/selector_button_green_border" | ||
213 | - android:gravity="center" | ||
214 | - android:orientation="horizontal"> | ||
215 | 185 | ||
216 | <TextView | 186 | <TextView |
217 | - android:id="@+id/tv_trip_button" | 187 | + android:id="@+id/tv_records" |
218 | - fontPath="fonts/PeridotPE-SemiBold.ttf" | 188 | + fontPath="fonts/PeridotPE-Bold.ttf" |
219 | android:layout_width="wrap_content" | 189 | android:layout_width="wrap_content" |
220 | android:layout_height="wrap_content" | 190 | android:layout_height="wrap_content" |
221 | - android:gravity="center" | 191 | + android:layout_below="@+id/tv_records_label" |
222 | - android:includeFontPadding="false" | 192 | + android:layout_centerHorizontal="true" |
223 | - android:text="@string/cos_dlg_start_trip" | 193 | + android:layout_marginTop="24dp" |
194 | + android:textColor="@color/blue_dark" | ||
195 | + android:textSize="16sp" /> | ||
196 | + | ||
197 | + <EditText | ||
198 | + android:id="@+id/et_acceleration" | ||
199 | + fontPath="fonts/PeridotPE-Bold.ttf" | ||
200 | + android:layout_width="wrap_content" | ||
201 | + android:layout_height="wrap_content" | ||
202 | + android:layout_below="@+id/tv_records" | ||
203 | + android:layout_alignParentStart="true" | ||
204 | + android:layout_marginTop="24dp" | ||
205 | + android:layout_marginStart="24dp" | ||
206 | + android:hint="Cut off in m/s^2" | ||
207 | + android:inputType="phone" | ||
224 | android:textColor="@color/blue_dark" | 208 | android:textColor="@color/blue_dark" |
225 | android:textSize="16sp" /> | 209 | android:textSize="16sp" /> |
226 | - </LinearLayout> | 210 | + |
227 | - </RelativeLayout> | 211 | + <EditText |
212 | + android:id="@+id/et_save" | ||
213 | + fontPath="fonts/PeridotPE-Bold.ttf" | ||
214 | + android:layout_width="wrap_content" | ||
215 | + android:layout_height="wrap_content" | ||
216 | + android:layout_below="@+id/tv_records" | ||
217 | + android:layout_alignParentEnd="true" | ||
218 | + android:paddingEnd="24dp" | ||
219 | + android:layout_marginTop="24dp" | ||
220 | + android:hint="Sample Interval in ms" | ||
221 | + android:inputType="phone" | ||
222 | + android:textColor="@color/blue_dark" | ||
223 | + android:textSize="16sp" /> | ||
224 | + | ||
225 | + <LinearLayout | ||
226 | + android:id="@+id/ll_activate_button" | ||
227 | + android:layout_width="match_parent" | ||
228 | + android:layout_height="55dp" | ||
229 | + android:layout_below="@+id/et_acceleration" | ||
230 | + android:layout_marginHorizontal="24dp" | ||
231 | + android:layout_marginVertical="56dp" | ||
232 | + android:background="@drawable/selector_button_green_border" | ||
233 | + android:gravity="center" | ||
234 | + android:orientation="horizontal"> | ||
235 | + | ||
236 | + <TextView | ||
237 | + android:id="@+id/tv_trip_button" | ||
238 | + fontPath="fonts/PeridotPE-SemiBold.ttf" | ||
239 | + android:layout_width="wrap_content" | ||
240 | + android:layout_height="wrap_content" | ||
241 | + android:gravity="center" | ||
242 | + android:includeFontPadding="false" | ||
243 | + android:text="@string/cos_dlg_start_trip" | ||
244 | + android:textColor="@color/blue_dark" | ||
245 | + android:textSize="16sp" /> | ||
246 | + </LinearLayout> | ||
247 | + </RelativeLayout> | ||
248 | + </ScrollView> | ||
228 | </LinearLayout> | 249 | </LinearLayout> |
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
-
Please register or login to post a comment