放样记录的声音大小,改为通过音频音量控制(原为通过闹钟音量控制的)

main
chenglifeng 6 months ago
parent 71abe1845a
commit 03198a77bf
  1. BIN
      app/libs/base-java-release.aar
  2. BIN
      app/libs/surveyorBase-release.aar
  3. 8
      app/src/main/java/com/project/survey/ui/MainActivityUtils.java
  4. 6
      app/src/main/java/com/project/survey/ui/lofting/pointlofting/PointStakingActivity.java
  5. 6
      app/src/main/java/com/project/survey/ui/lofting/pointlofting/PointStakingActivity1.java
  6. 2
      app/src/main/java/com/project/survey/ui/lofting/pointlofting/PointStakingSettingActivity.java
  7. 2
      app/src/main/java/com/project/survey/ui/pointmeasure/measure/PointSurveyNewActivity.java
  8. 4
      app/src/main/java/com/project/survey/util/SurveyUIUtils.java

Binary file not shown.

Binary file not shown.

@ -129,15 +129,15 @@ public class MainActivityUtils extends AppCompatActivityProviderUtils {
switch (event) { switch (event) {
case ON_CREATE: case ON_CREATE:
EventBus.getDefault().register(MainActivityUtils.this); EventBus.getDefault().register(MainActivityUtils.this);
SoundPoolUtil.getInstance().initHintSing(activity, SoundPoolUtil.TEST, R.raw.savedone); SoundPoolUtil.getInstanceUsageMedia().initHintSing(activity, SoundPoolUtil.TEST, R.raw.savedone);
// SoundPoolUtil.getInstance().initHintSing(activity, SoundPoolUtil.SEPTENTRIO_FILL, R.raw.septentrio_fill); // SoundPoolUtil.getInstance().initHintSing(activity, SoundPoolUtil.SEPTENTRIO_FILL, R.raw.septentrio_fill);
// SoundPoolUtil.getInstance().initHintSing(activity, SoundPoolUtil.SEPTENTRIO_CUT, R.raw.septentrio_cut); // SoundPoolUtil.getInstance().initHintSing(activity, SoundPoolUtil.SEPTENTRIO_CUT, R.raw.septentrio_cut);
SoundPoolUtil.getInstance().initHintSing(activity, SoundPoolUtil.ALPHA_STAKING, R.raw.alphastaking); SoundPoolUtil.getInstanceUsageMedia().initHintSing(activity, SoundPoolUtil.ALPHA_STAKING, R.raw.alphastaking);
SoundPoolUtil.getInstance().initHintSing(activity, SoundPoolUtil.ALPHA_RECORDING, R.raw.alpharecording); SoundPoolUtil.getInstanceUsageMedia().initHintSing(activity, SoundPoolUtil.ALPHA_RECORDING, R.raw.alpharecording);
break; break;
case ON_DESTROY: case ON_DESTROY:
EventBus.getDefault().unregister(MainActivityUtils.this); EventBus.getDefault().unregister(MainActivityUtils.this);
SoundPoolUtil.getInstance().onDestroy(); SoundPoolUtil.getInstanceUsageMedia().onDestroy();
break; break;
case ON_RESUME: case ON_RESUME:
checkGnssServerReady(); checkGnssServerReady();

@ -1028,7 +1028,7 @@ public class PointStakingActivity extends BaseSurveyNewActivity {
effectVerLine.getValues().add(new PointValue(y, (x + disTipsRange2D))); effectVerLine.getValues().add(new PointValue(y, (x + disTipsRange2D)));
} }
if (preferences.getBoolean("key_is_tts_open", true)) { if (preferences.getBoolean("key_is_tts_open", true)) {
SoundPoolUtil.getInstance().play(SoundPoolUtil.ALPHA_STAKING); SoundPoolUtil.getInstanceUsageMedia().play(SoundPoolUtil.ALPHA_STAKING);
} }
} else { } else {
stopSoundPool(); stopSoundPool();
@ -1118,7 +1118,7 @@ public class PointStakingActivity extends BaseSurveyNewActivity {
stopSoundPool(); stopSoundPool();
recordRemarks = ""; recordRemarks = "";
if (preferences.getBoolean("key_is_tts_open", true)) { if (preferences.getBoolean("key_is_tts_open", true)) {
SoundPoolUtil.getInstance().singlePlayStopRecord(); SoundPoolUtil.getInstanceUsageMedia().singlePlayStopRecord();
} }
((LineChartRenderer) binding.lineChartView.getChartRenderer()).calculateMaxViewport(1.5f); ((LineChartRenderer) binding.lineChartView.getChartRenderer()).calculateMaxViewport(1.5f);
binding.lineChartView.onChartDataChange(); binding.lineChartView.onChartDataChange();
@ -1187,7 +1187,7 @@ public class PointStakingActivity extends BaseSurveyNewActivity {
} }
private void stopSoundPool() { private void stopSoundPool() {
SoundPoolUtil.getInstance().stop(); SoundPoolUtil.getInstanceUsageMedia().stop();
} }
@Override @Override

@ -1014,7 +1014,7 @@ public class PointStakingActivity1 extends BaseSurveyNewActivity {
effectVerLine.getValues().add(new PointValue(y, (x + disTipsRange2D))); effectVerLine.getValues().add(new PointValue(y, (x + disTipsRange2D)));
} }
if (preferences.getBoolean("key_is_tts_open", true)) { if (preferences.getBoolean("key_is_tts_open", true)) {
SoundPoolUtil.getInstance().play(SoundPoolUtil.ALPHA_STAKING); SoundPoolUtil.getInstanceUsageMedia().play(SoundPoolUtil.ALPHA_STAKING);
} }
} else { } else {
stopSoundPool(); stopSoundPool();
@ -1104,7 +1104,7 @@ public class PointStakingActivity1 extends BaseSurveyNewActivity {
stopSoundPool(); stopSoundPool();
recordRemarks = ""; recordRemarks = "";
if (preferences.getBoolean("key_is_tts_open", true)) { if (preferences.getBoolean("key_is_tts_open", true)) {
SoundPoolUtil.getInstance().singlePlayStopRecord(); SoundPoolUtil.getInstanceUsageMedia().singlePlayStopRecord();
} }
((LineChartRenderer) binding.lineChartView.getChartRenderer()).calculateMaxViewport(1.5f); ((LineChartRenderer) binding.lineChartView.getChartRenderer()).calculateMaxViewport(1.5f);
binding.lineChartView.onChartDataChange(); binding.lineChartView.onChartDataChange();
@ -1194,7 +1194,7 @@ public class PointStakingActivity1 extends BaseSurveyNewActivity {
} }
private void stopSoundPool() { private void stopSoundPool() {
SoundPoolUtil.getInstance().stop(); SoundPoolUtil.getInstanceUsageMedia().stop();
} }
@Override @Override

@ -325,7 +325,7 @@ public class PointStakingSettingActivity extends BaseSurveyNewActivity {
binding.tvUnitLength.setText(unitLengthList.get(PreferencesCadUtil.getCadDrawingUnitLength())); binding.tvUnitLength.setText(unitLengthList.get(PreferencesCadUtil.getCadDrawingUnitLength()));
binding.rlSelectUnitLength.setOnClickListener(view -> CustomRecycleDialog.showDialog(PointStakingSettingActivity.this, R.string.unit_length, unitLengthList, PreferencesCadUtil.getCadDrawingUnitLength(), false, (index, itemString) -> { binding.rlSelectUnitLength.setOnClickListener(view -> CustomRecycleDialog.showDialog(PointStakingSettingActivity.this, R.string.unit_length, unitLengthList, PreferencesCadUtil.getCadDrawingUnitLength(), false, (index, itemString) -> {
binding.tvUnitLength.setText(unitLengthList.get(index)); binding.tvUnitLength.setText(unitLengthList.get(index));
PreferencesCadUtil.putPreference(ConstUtils.preferConst.cadDrawingUnitLength, index); // PreferencesCadUtil.putPreference(ConstUtils.preferConst.cadDrawingUnitLength, index);
})); }));
} }

@ -1039,7 +1039,7 @@ public class PointSurveyNewActivity extends BaseSurveyNewActivity implements Vie
boolean isTTSOpen = preferences.getBoolean("key_is_tts_open", true); boolean isTTSOpen = preferences.getBoolean("key_is_tts_open", true);
if (isTTSOpen) { if (isTTSOpen) {
SoundPoolUtil.getInstance().singlePlayStopRecord(); SoundPoolUtil.getInstanceUsageMedia().singlePlayStopRecord();
} }
} }

@ -27,7 +27,7 @@ public class SurveyUIUtils {
} }
public static void stopSoundPool() { public static void stopSoundPool() {
SoundPoolUtil.getInstance().stop(); SoundPoolUtil.getInstanceUsageMedia().stop();
} }
private static int dip2px(float dpValue) { private static int dip2px(float dpValue) {
@ -102,7 +102,7 @@ public class SurveyUIUtils {
layoutBaseSurveyStakingSettingBinding.tvTiltPrimAuto.setTextColor(activity.getColor(R.color.color_BCBCBC)); layoutBaseSurveyStakingSettingBinding.tvTiltPrimAuto.setTextColor(activity.getColor(R.color.color_BCBCBC));
} }
layoutBaseSurveyStakingSettingBinding.tvTiltPrimAuto.setText(activity.getString(R.string.auto_trun)); layoutBaseSurveyStakingSettingBinding.tvTiltPrimAuto.setText(activity.getString(R.string.auto_turn));
} else { } else {
if (Gnss.getInstance().getDevice().isTiltOpen() && Gnss.getInstance().getDevice().isSupportTilt()) { if (Gnss.getInstance().getDevice().isTiltOpen() && Gnss.getInstance().getDevice().isSupportTilt()) {
layoutBaseSurveyStakingSettingBinding.ivTiltPrimAuto.setImageResource(R.drawable.icon_survey_tilt_black); layoutBaseSurveyStakingSettingBinding.ivTiltPrimAuto.setImageResource(R.drawable.icon_survey_tilt_black);

Loading…
Cancel
Save