slight tweaks on wind rose

fix/get-all-stations-hangout
Mateusz Lubecki 2021-12-09 21:38:54 +01:00
rodzic 37fdbc6a58
commit 8c24b0fe7e
5 zmienionych plików z 82 dodań i 27 usunięć

Wyświetl plik

@ -1,17 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="deploymentTargetDropDown">
<targetSelectedWithDropDown>
<runningDeviceTargetSelectedWithDropDown>
<Target>
<type value="QUICK_BOOT_TARGET" />
<type value="RUNNING_DEVICE_TARGET" />
<deviceKey>
<Key>
<type value="VIRTUAL_DEVICE_PATH" />
<value value="$USER_HOME$/.android/avd/Pixel_4_XL_API_28.avd" />
<type value="SERIAL_NUMBER" />
<value value="1640010436" />
</Key>
</deviceKey>
</Target>
</targetSelectedWithDropDown>
<timeTargetWasSelectedWithDropDown value="2021-11-09T11:30:18.926154Z" />
</runningDeviceTargetSelectedWithDropDown>
<timeTargetWasSelectedWithDropDown value="2021-12-09T20:32:06.314818Z" />
</component>
</project>

Wyświetl plik

@ -6,15 +6,19 @@
<entry key="../../../../../layout/custom_preview.xml" value="0.2171875" />
<entry key="app/src/main/res/layout/activity_all_stations.xml" value="0.3651041666666667" />
<entry key="app/src/main/res/layout/activity_all_stations_linear_layout.xml" value="0.3651041666666667" />
<entry key="app/src/main/res/layout/activity_export_data.xml" value="0.67" />
<entry key="app/src/main/res/layout/activity_export_data.xml" value="0.25" />
<entry key="app/src/main/res/layout/activity_favourites.xml" value="0.3651041666666667" />
<entry key="app/src/main/res/layout/activity_favourites_empty.xml" value="0.3651041666666667" />
<entry key="app/src/main/res/layout/activity_favourites_linear_layout.xml" value="0.3651041666666667" />
<entry key="app/src/main/res/layout/activity_favourites_linear_layout_data.xml" value="0.5" />
<entry key="app/src/main/res/layout/activity_main.xml" value="0.3651041666666667" />
<entry key="app/src/main/res/layout/activity_settings.xml" value="0.67" />
<entry key="app/src/main/res/layout/activity_station_details.xml" value="0.3651041666666667" />
<entry key="app/src/main/res/layout/activity_station_details_plots.xml" value="0.3651041666666667" />
<entry key="app/src/main/res/layout/activity_station_details_summary.xml" value="0.3651041666666667" />
<entry key="app/src/main/res/layout/activity_station_details_wind_rose.xml" value="0.5" />
<entry key="app/src/main/res/layout/spinner_item.xml" value="0.28306159420289856" />
<entry key="app/src/main/res/menu/main_activity_menu.xml" value="0.3651041666666667" />
</map>
</option>
</component>
@ -24,4 +28,11 @@
<component name="ProjectType">
<option name="id" value="Android" />
</component>
<component name="VisualizationToolProject">
<option name="state">
<ProjectState>
<option name="scale" value="0.3651041666666667" />
</ProjectState>
</option>
</component>
</project>

Wyświetl plik

@ -38,10 +38,10 @@ public class StationDetailsWindRoseActivity extends AppCompatActivity {
// find all elements in the xml layout file and set the references in a holding object
elements = new StationWindRoseActElements();
elements.windArrow = findViewById(R.id.imageViewWindRoseArrow);
elements.windSpeed = findViewById(R.id.textViewWindRoseWindSpeed);
elements.windGusts = findViewById(R.id.textViewWindRoseWindGusts);
elements.windDirection = findViewById(R.id.textViewWindRoseWindDirection);
elements.temperature = findViewById(R.id.textViewWindRoseTemperatura);
elements.windSpeed = findViewById(R.id.textViewWindRoseWindSpeedValue);
elements.windGusts = findViewById(R.id.textViewWindRoseWindGustsValue);
elements.windDirection = findViewById(R.id.textViewWindRoseWindDirectionValue);
elements.temperature = findViewById(R.id.textViewWindRoseTemperaturaValue);
elements.maxGust = findViewById(R.id.textViewWindRoseMaxHourGust);
elements.minAverage = findViewById(R.id.textViewWindRoseMinHourSpeed);
elements.pressure = findViewById(R.id.textViewWindRosePressure);

Wyświetl plik

@ -110,27 +110,27 @@ public class StationWindRoseActElements implements StationActivityElements {
}
if (!no_data && !data.wind_qf_native.equals(QualityFactor.NOT_AVALIABLE)) {
windSpeed.setText(activity.getResources().getString(R.string.mean_value) + '\n' + average_speed);
windSpeed.setText(average_speed);
} else {
windSpeed.setText(activity.getResources().getString(R.string.mean_value) + '\n' + "---");
windSpeed.setText("---");
}
if (!no_data && !data.wind_qf_native.equals(QualityFactor.NOT_AVALIABLE)) {
windGusts.setText(activity.getResources().getString(R.string.wind_gust_short) + '\n' + gusts_speed);
windGusts.setText(gusts_speed);
} else {
windGusts.setText(activity.getResources().getString(R.string.wind_gust_short) + '\n' + "---");
windGusts.setText("---");
}
if (!no_data && !data.wind_qf_native.equals(QualityFactor.NOT_AVALIABLE)) {
windDirection.setText(activity.getResources().getString(R.string.wind_direction_short) + '\n' + data.direction + activity.getResources().getString(R.string.degrees_sign));
windDirection.setText(String.valueOf(data.direction) + activity.getResources().getString(R.string.degrees_sign));
} else {
windDirection.setText(activity.getResources().getString(R.string.wind_direction_short) + '\n' + "---");
windDirection.setText("---");
}
// check if temperature is avaliable in input data set
if (!no_data) {
temperature.setText(activity.getResources().getString(R.string.temperature_short) + '\n' + String.format("%s", data.getTemperatureStr(true, false)));
temperature.setText(String.format("%s", data.getTemperatureStr(true, false)));
if (!data.temperature_qf_native.equals(QualityFactor.NOT_AVALIABLE) && goodColor != 0) {
temperature.setTextColor(goodColor);
@ -139,7 +139,7 @@ public class StationWindRoseActElements implements StationActivityElements {
temperature.setTextColor(badColor);
}
} else {
temperature.setText(activity.getResources().getString(R.string.temperature_short) + '\n' + "---");
temperature.setText("---");
}
if (!no_data && !old_data) {

Wyświetl plik

@ -47,7 +47,7 @@
<TextView
android:id="@+id/textViewWindRoseWindSpeed"
android:layout_width="152dp"
android:layout_height="69dp"
android:layout_height="40dp"
android:text="@string/mean_value"
android:textAlignment="center"
android:textSize="28sp"
@ -56,12 +56,12 @@
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@id/guidelineRoseNUp"
app:layout_constraintVertical_bias="0.046" />
app:layout_constraintVertical_bias="0.01999998" />
<TextView
android:id="@+id/textViewWindRoseWindDirection"
android:layout_width="152dp"
android:layout_height="69dp"
android:layout_height="40dp"
android:text="@string/wind_direction_short"
android:textAlignment="center"
android:textSize="28sp"
@ -70,12 +70,12 @@
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@id/guidelineRoseNUp"
app:layout_constraintVertical_bias="0.935" />
app:layout_constraintVertical_bias="0.9" />
<TextView
android:id="@+id/textViewWindRoseTemperatura"
android:layout_width="152dp"
android:layout_height="69dp"
android:layout_height="40dp"
android:text="@string/temperature_short"
android:textAlignment="center"
android:textSize="28sp"
@ -84,12 +84,12 @@
app:layout_constraintHorizontal_bias="1.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@id/guidelineRoseNUp"
app:layout_constraintVertical_bias="0.935" />
app:layout_constraintVertical_bias="0.9" />
<TextView
android:id="@+id/textViewWindRoseWindGusts"
android:layout_width="152dp"
android:layout_height="70dp"
android:layout_height="40dp"
android:text="@string/wind_gust_short"
android:textAlignment="center"
android:textSize="28sp"
@ -98,7 +98,7 @@
app:layout_constraintHorizontal_bias="1.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@id/guidelineRoseNUp"
app:layout_constraintVertical_bias="0.046" />
app:layout_constraintVertical_bias="0.01999998" />
<TextView
android:id="@+id/textViewSouth"
@ -216,6 +216,50 @@
app:layout_constraintTop_toBottomOf="@+id/textViewWindRoseMinHourSpeed"
app:layout_constraintVertical_bias="0.0" />
<TextView
android:id="@+id/textViewWindRoseWindSpeedValue"
android:layout_width="152dp"
android:layout_height="wrap_content"
android:text="..."
android:textAlignment="center"
android:textColor="#000000"
android:textSize="28sp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textViewWindRoseWindSpeed" />
<TextView
android:id="@+id/textViewWindRoseWindGustsValue"
android:layout_width="152dp"
android:layout_height="wrap_content"
android:text="..."
android:textAlignment="center"
android:textColor="#000000"
android:textSize="28sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textViewWindRoseWindGusts" />
<TextView
android:id="@+id/textViewWindRoseWindDirectionValue"
android:layout_width="152dp"
android:layout_height="wrap_content"
android:text="..."
android:textAlignment="center"
android:textColor="#000000"
android:textSize="28sp"
app:layout_constraintStart_toStartOf="@+id/textViewWindRoseWindDirection"
app:layout_constraintTop_toBottomOf="@+id/textViewWindRoseWindDirection" />
<TextView
android:id="@+id/textViewWindRoseTemperaturaValue"
android:layout_width="152dp"
android:layout_height="wrap_content"
android:text="..."
android:textAlignment="center"
android:textColor="#000000"
android:textSize="28sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textViewWindRoseTemperatura" />
</androidx.constraintlayout.widget.ConstraintLayout>