Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,7 @@ private void writeLogToFile(long timestamp, float readingX, float readingY, floa
}

private void visualizeData() {
if (!isAdded()) return;
for (int i = 0; i < accelerometerViewFragments.size(); i++) {
AccelerometerViewFragment fragment = accelerometerViewFragments.get(i);
long timeElapsed = (System.currentTimeMillis() - startTime) / 1000;
Expand Down
65 changes: 33 additions & 32 deletions app/src/main/res/layout/fragment_accelerometer_data.xml
Original file line number Diff line number Diff line change
@@ -1,40 +1,41 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout android:id="@+id/accelerometer_linearlayout"
xmlns:android="http://schemas.android.com/apk/res/android"
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
android:orientation="vertical"
tools:context="io.pslab.activity.AccelerometerActivity">
android:fitsSystemWindows="true">

<fragment
android:id="@+id/accelerometer_x_axis_fragment"
android:name="io.pslab.fragment.AccelerometerViewFragment"
<LinearLayout
android:id="@+id/accelerometer_linearlayout"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:layout_margin="5dp"
tools:layout="@layout/accelerometer_list_item" />
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="5dp"
tools:context="io.pslab.activity.AccelerometerActivity">

<fragment
android:id="@+id/accelerometer_y_axis_fragment"
android:name="io.pslab.fragment.AccelerometerViewFragment"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:layout_margin="5dp"
tools:layout="@layout/accelerometer_list_item" />
<fragment
android:id="@+id/accelerometer_x_axis_fragment"
android:name="io.pslab.fragment.AccelerometerViewFragment"
android:layout_width="match_parent"
android:layout_height="@dimen/accelerometer_fragment_height"
android:layout_marginBottom="@dimen/accelerometer_fragment_margint"
tools:layout="@layout/accelerometer_list_item" />

<fragment
android:id="@+id/accelerometer_z_axis_fragment"
android:name="io.pslab.fragment.AccelerometerViewFragment"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:layout_marginTop="5dp"
android:layout_marginBottom="10dp"
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp"
tools:layout="@layout/accelerometer_list_item" />
</LinearLayout>
<fragment
android:id="@+id/accelerometer_y_axis_fragment"
android:name="io.pslab.fragment.AccelerometerViewFragment"
android:layout_width="match_parent"
android:layout_height="@dimen/accelerometer_fragment_height"
android:layout_marginBottom="@dimen/accelerometer_fragment_margint"
tools:layout="@layout/accelerometer_list_item" />

<fragment
android:id="@+id/accelerometer_z_axis_fragment"
android:name="io.pslab.fragment.AccelerometerViewFragment"
android:layout_width="match_parent"
android:layout_height="@dimen/accelerometer_fragment_height"
android:layout_marginBottom="@dimen/accelerometer_fragment_margint"
tools:layout="@layout/accelerometer_list_item" />

</LinearLayout>
</ScrollView>
3 changes: 3 additions & 0 deletions app/src/main/res/values/dimens.xml
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,9 @@
<dimen name="text_size_osc">13sp</dimen>
<dimen name="text_size_9sp">9sp</dimen>

<dimen name="accelerometer_fragment_height">200dp</dimen>
<dimen name="accelerometer_fragment_margint">5dp</dimen>

<dimen name="gyroscope_fragment_height">300dp</dimen>
<dimen name="gyroscope_fragment_margin">5dp</dimen>

Expand Down