| @@ -6,6 +6,9 @@ | |||
| <entry key="..\:/Work/Java Projects/Android/RecurveBowSight/V2/app/src/main/res/drawable-v24/avd_anim.xml" value="0.2825" /> | |||
| <entry key="..\:/Work/Java Projects/Android/RecurveBowSight/V2/app/src/main/res/drawable-v24/ic_launcher_foreground.xml" value="0.25" /> | |||
| <entry key="..\:/Work/Java Projects/Android/RecurveBowSight/V2/app/src/main/res/drawable-v24/ic_launcher_round.xml" value="0.25" /> | |||
| <entry key="..\:/Work/Java Projects/Android/RecurveBowSight/V2/app/src/main/res/drawable/evs_background.xml" value="0.279" /> | |||
| <entry key="..\:/Work/Java Projects/Android/RecurveBowSight/V2/app/src/main/res/drawable/evs_nok_background.xml" value="0.279" /> | |||
| <entry key="..\:/Work/Java Projects/Android/RecurveBowSight/V2/app/src/main/res/drawable/evs_ok_background.xml" value="0.279" /> | |||
| <entry key="..\:/Work/Java Projects/Android/RecurveBowSight/V2/app/src/main/res/drawable/ic_baseline_swipe_right_24.xml" value="0.264" /> | |||
| <entry key="..\:/Work/Java Projects/Android/RecurveBowSight/V2/app/src/main/res/drawable/ic_calcsight_parameter.xml" value="0.264" /> | |||
| <entry key="..\:/Work/Java Projects/Android/RecurveBowSight/V2/app/src/main/res/drawable/ic_calcsight_trajectory.xml" value="0.264" /> | |||
| @@ -32,14 +35,14 @@ | |||
| <entry key="..\:/Work/Java Projects/Android/RecurveBowSight/V2/app/src/main/res/drawable/side_nav_bar.xml" value="0.285" /> | |||
| <entry key="..\:/Work/Java Projects/Android/RecurveBowSight/V2/app/src/main/res/layout/activity_equipment_configuration.xml" value="0.1994535519125683" /> | |||
| <entry key="..\:/Work/Java Projects/Android/RecurveBowSight/V2/app/src/main/res/layout/activity_main.xml" value="0.28072916666666664" /> | |||
| <entry key="..\:/Work/Java Projects/Android/RecurveBowSight/V2/app/src/main/res/layout/activity_riser_configuration.xml" value="0.25" /> | |||
| <entry key="..\:/Work/Java Projects/Android/RecurveBowSight/V2/app/src/main/res/layout/activity_riser_configuration.xml" value="0.2" /> | |||
| <entry key="..\:/Work/Java Projects/Android/RecurveBowSight/V2/app/src/main/res/layout/activity_sight_configuration.xml" value="0.1994535519125683" /> | |||
| <entry key="..\:/Work/Java Projects/Android/RecurveBowSight/V2/app/src/main/res/layout/app_bar_main.xml" value="0.15" /> | |||
| <entry key="..\:/Work/Java Projects/Android/RecurveBowSight/V2/app/src/main/res/layout/content_main.xml" value="0.14" /> | |||
| <entry key="..\:/Work/Java Projects/Android/RecurveBowSight/V2/app/src/main/res/layout/fragment_about.xml" value="0.15812841530054644" /> | |||
| <entry key="..\:/Work/Java Projects/Android/RecurveBowSight/V2/app/src/main/res/layout/fragment_calcsight.xml" value="0.15812841530054644" /> | |||
| <entry key="..\:/Work/Java Projects/Android/RecurveBowSight/V2/app/src/main/res/layout/fragment_calcsight_parameters.xml" value="0.16" /> | |||
| <entry key="..\:/Work/Java Projects/Android/RecurveBowSight/V2/app/src/main/res/layout/fragment_calcsight_sightsetting.xml" value="0.1840846994535519" /> | |||
| <entry key="..\:/Work/Java Projects/Android/RecurveBowSight/V2/app/src/main/res/layout/fragment_calcsight_parameters.xml" value="0.2" /> | |||
| <entry key="..\:/Work/Java Projects/Android/RecurveBowSight/V2/app/src/main/res/layout/fragment_calcsight_sightsetting.xml" value="0.22" /> | |||
| <entry key="..\:/Work/Java Projects/Android/RecurveBowSight/V2/app/src/main/res/layout/fragment_calcsight_trajectory.xml" value="0.15" /> | |||
| <entry key="..\:/Work/Java Projects/Android/RecurveBowSight/V2/app/src/main/res/layout/fragment_equipment.xml" value="0.12361111111111112" /> | |||
| <entry key="..\:/Work/Java Projects/Android/RecurveBowSight/V2/app/src/main/res/layout/fragment_equipment_add.xml" value="0.15812841530054644" /> | |||
| @@ -51,6 +54,7 @@ | |||
| <entry key="..\:/Work/Java Projects/Android/RecurveBowSight/V2/app/src/main/res/layout/fragment_slideshow.xml" value="0.1480978260869565" /> | |||
| <entry key="..\:/Work/Java Projects/Android/RecurveBowSight/V2/app/src/main/res/layout/fragment_userguide.xml" value="0.15812841530054644" /> | |||
| <entry key="..\:/Work/Java Projects/Android/RecurveBowSight/V2/app/src/main/res/layout/nav_header_main.xml" value="0.18715277777777778" /> | |||
| <entry key="..\:/Work/Java Projects/Android/RecurveBowSight/V2/app/src/main/res/layout/simple_spinner_line.xml" value="0.16319444444444445" /> | |||
| <entry key="..\:/Work/Java Projects/Android/RecurveBowSight/V2/app/src/main/res/layout/switch_item.xml" value="0.1" /> | |||
| <entry key="..\:/Work/Java Projects/Android/RecurveBowSight/V2/app/src/main/res/menu/activity_main_drawer.xml" value="0.3625" /> | |||
| <entry key="..\:/Work/Java Projects/Android/RecurveBowSight/V2/app/src/main/res/menu/main.xml" value="0.3625" /> | |||
| @@ -21,50 +21,25 @@ | |||
| </component> | |||
| <component name="ChangeListManager"> | |||
| <list default="true" id="41369230-c648-4299-baf3-de5f13bcb18c" name="Changes" comment=""> | |||
| <change afterPath="$PROJECT_DIR$/app/src/main/java/ch/spherIC/recurvebowsight/components/SuspendableTextWatcher.java" afterDir="false" /> | |||
| <change afterPath="$PROJECT_DIR$/app/src/main/res/layout/simple_spinner_line.xml" afterDir="false" /> | |||
| <change beforePath="$PROJECT_DIR$/.gradle/7.3.3/executionHistory/executionHistory.bin" beforeDir="false" afterPath="$PROJECT_DIR$/.gradle/7.3.3/executionHistory/executionHistory.bin" afterDir="false" /> | |||
| <change beforePath="$PROJECT_DIR$/.gradle/7.3.3/executionHistory/executionHistory.lock" beforeDir="false" afterPath="$PROJECT_DIR$/.gradle/7.3.3/executionHistory/executionHistory.lock" afterDir="false" /> | |||
| <change beforePath="$PROJECT_DIR$/.gradle/7.3.3/fileHashes/fileHashes.bin" beforeDir="false" afterPath="$PROJECT_DIR$/.gradle/7.3.3/fileHashes/fileHashes.bin" afterDir="false" /> | |||
| <change beforePath="$PROJECT_DIR$/.gradle/7.3.3/fileHashes/fileHashes.lock" beforeDir="false" afterPath="$PROJECT_DIR$/.gradle/7.3.3/fileHashes/fileHashes.lock" afterDir="false" /> | |||
| <change beforePath="$PROJECT_DIR$/.gradle/7.3.3/fileHashes/resourceHashesCache.bin" beforeDir="false" afterPath="$PROJECT_DIR$/.gradle/7.3.3/fileHashes/resourceHashesCache.bin" afterDir="false" /> | |||
| <change beforePath="$PROJECT_DIR$/.gradle/buildOutputCleanup/buildOutputCleanup.lock" beforeDir="false" afterPath="$PROJECT_DIR$/.gradle/buildOutputCleanup/buildOutputCleanup.lock" afterDir="false" /> | |||
| <change beforePath="$PROJECT_DIR$/.idea/misc.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/misc.xml" afterDir="false" /> | |||
| <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" /> | |||
| <change beforePath="$PROJECT_DIR$/app/src/main/java/ch/spherIC/recurvebowsight/RBSMainActivity.java" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/ch/spherIC/recurvebowsight/RBSMainActivity.java" afterDir="false" /> | |||
| <change beforePath="$PROJECT_DIR$/app/src/main/java/ch/spherIC/recurvebowsight/components/FlightCurveChart.java" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/ch/spherIC/recurvebowsight/components/FlightCurveChart.java" afterDir="false" /> | |||
| <change beforePath="$PROJECT_DIR$/app/src/main/java/ch/spherIC/recurvebowsight/components/FontTextView.java" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/ch/spherIC/recurvebowsight/components/FontTextView.java" afterDir="false" /> | |||
| <change beforePath="$PROJECT_DIR$/app/src/main/java/ch/spherIC/recurvebowsight/components/XTextView.java" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/ch/spherIC/recurvebowsight/components/XTextView.java" afterDir="false" /> | |||
| <change beforePath="$PROJECT_DIR$/app/src/main/java/ch/spherIC/recurvebowsight/database/RBSDatabaseHelper.java" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/ch/spherIC/recurvebowsight/database/RBSDatabaseHelper.java" afterDir="false" /> | |||
| <change beforePath="$PROJECT_DIR$/app/src/main/java/ch/spherIC/recurvebowsight/database/dao/ArcherySetupDao.java" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/ch/spherIC/recurvebowsight/database/dao/ArcherySetupDao.java" afterDir="false" /> | |||
| <change beforePath="$PROJECT_DIR$/app/src/main/java/ch/spherIC/recurvebowsight/database/dao/DAO.java" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/ch/spherIC/recurvebowsight/database/dao/DAO.java" afterDir="false" /> | |||
| <change beforePath="$PROJECT_DIR$/app/src/main/java/ch/spherIC/recurvebowsight/database/dao/RiserDao.java" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/ch/spherIC/recurvebowsight/database/dao/RiserDao.java" afterDir="false" /> | |||
| <change beforePath="$PROJECT_DIR$/app/src/main/java/ch/spherIC/recurvebowsight/database/dao/SightDao.java" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/ch/spherIC/recurvebowsight/database/dao/SightDao.java" afterDir="false" /> | |||
| <change beforePath="$PROJECT_DIR$/app/src/main/java/ch/spherIC/recurvebowsight/database/scheme/data/TblRBSArcherySetup.java" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/ch/spherIC/recurvebowsight/database/scheme/data/TblRBSArcherySetup.java" afterDir="false" /> | |||
| <change beforePath="$PROJECT_DIR$/app/src/main/java/ch/spherIC/recurvebowsight/database/scheme/masterdata/TblRBSRiser.java" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/ch/spherIC/recurvebowsight/database/scheme/masterdata/TblRBSRiser.java" afterDir="false" /> | |||
| <change beforePath="$PROJECT_DIR$/app/src/main/java/ch/spherIC/recurvebowsight/database/scheme/masterdata/TblRBSSight.java" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/ch/spherIC/recurvebowsight/database/scheme/masterdata/TblRBSSight.java" afterDir="false" /> | |||
| <change beforePath="$PROJECT_DIR$/app/src/main/java/ch/spherIC/recurvebowsight/logic/CalculationTask.java" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/ch/spherIC/recurvebowsight/logic/CalculationTask.java" afterDir="false" /> | |||
| <change beforePath="$PROJECT_DIR$/app/src/main/java/ch/spherIC/recurvebowsight/logic/TrajectoryCalculation.java" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/ch/spherIC/recurvebowsight/logic/TrajectoryCalculation.java" afterDir="false" /> | |||
| <change beforePath="$PROJECT_DIR$/app/src/main/java/ch/spherIC/recurvebowsight/logic/TrajectoryCalculator.java" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/ch/spherIC/recurvebowsight/logic/TrajectoryCalculator.java" afterDir="false" /> | |||
| <change beforePath="$PROJECT_DIR$/app/src/main/java/ch/spherIC/recurvebowsight/model/ArcherySetup.java" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/ch/spherIC/recurvebowsight/model/ArcherySetup.java" afterDir="false" /> | |||
| <change beforePath="$PROJECT_DIR$/app/src/main/java/ch/spherIC/recurvebowsight/model/IArcherySetup.java" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/ch/spherIC/recurvebowsight/model/IArcherySetup.java" afterDir="false" /> | |||
| <change beforePath="$PROJECT_DIR$/app/src/main/java/ch/spherIC/recurvebowsight/model/IEntity.java" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/ch/spherIC/recurvebowsight/model/IEntity.java" afterDir="false" /> | |||
| <change beforePath="$PROJECT_DIR$/app/src/main/java/ch/spherIC/recurvebowsight/model/IRiser.java" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/ch/spherIC/recurvebowsight/model/IRiser.java" afterDir="false" /> | |||
| <change beforePath="$PROJECT_DIR$/app/src/main/java/ch/spherIC/recurvebowsight/model/ISight.java" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/ch/spherIC/recurvebowsight/model/ISight.java" afterDir="false" /> | |||
| <change beforePath="$PROJECT_DIR$/app/src/main/java/ch/spherIC/recurvebowsight/model/Riser.java" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/ch/spherIC/recurvebowsight/model/Riser.java" afterDir="false" /> | |||
| <change beforePath="$PROJECT_DIR$/app/src/main/java/ch/spherIC/recurvebowsight/model/Sight.java" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/ch/spherIC/recurvebowsight/model/Sight.java" afterDir="false" /> | |||
| <change beforePath="$PROJECT_DIR$/app/src/main/java/ch/spherIC/recurvebowsight/ui/calcsight/CalculateSightCollectionAdapter.java" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/ch/spherIC/recurvebowsight/ui/calcsight/CalculateSightCollectionAdapter.java" afterDir="false" /> | |||
| <change beforePath="$PROJECT_DIR$/app/src/main/java/ch/spherIC/recurvebowsight/ui/calcsight/CalculateSightFragment.java" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/ch/spherIC/recurvebowsight/ui/calcsight/CalculateSightFragment.java" afterDir="false" /> | |||
| <change beforePath="$PROJECT_DIR$/app/src/main/java/ch/spherIC/recurvebowsight/ui/calcsight/CalculateSightParametersFragment.java" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/ch/spherIC/recurvebowsight/ui/calcsight/CalculateSightParametersFragment.java" afterDir="false" /> | |||
| <change beforePath="$PROJECT_DIR$/app/src/main/java/ch/spherIC/recurvebowsight/ui/calcsight/CalculateSightParametersViewModel.java" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/ch/spherIC/recurvebowsight/ui/calcsight/CalculateSightParametersViewModel.java" afterDir="false" /> | |||
| <change beforePath="$PROJECT_DIR$/app/src/main/java/ch/spherIC/recurvebowsight/ui/calcsight/CalculateSightSightSettingFragment.java" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/ch/spherIC/recurvebowsight/ui/calcsight/CalculateSightSightSettingFragment.java" afterDir="false" /> | |||
| <change beforePath="$PROJECT_DIR$/app/src/main/java/ch/spherIC/recurvebowsight/ui/calcsight/CalculateSightSightSettingViewModel.java" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/ch/spherIC/recurvebowsight/ui/calcsight/CalculateSightSightSettingViewModel.java" afterDir="false" /> | |||
| <change beforePath="$PROJECT_DIR$/app/src/main/java/ch/spherIC/recurvebowsight/ui/calcsight/CalculateSightTrajectoryFragment.java" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/ch/spherIC/recurvebowsight/ui/calcsight/CalculateSightTrajectoryFragment.java" afterDir="false" /> | |||
| <change beforePath="$PROJECT_DIR$/app/src/main/java/ch/spherIC/recurvebowsight/ui/calcsight/CalculateSightTrajectoryViewModel.java" beforeDir="false" /> | |||
| <change beforePath="$PROJECT_DIR$/app/src/main/java/ch/spherIC/recurvebowsight/ui/configuration/ArcherySetupConfigurationActivity.java" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/ch/spherIC/recurvebowsight/ui/configuration/ArcherySetupConfigurationActivity.java" afterDir="false" /> | |||
| <change beforePath="$PROJECT_DIR$/app/src/main/java/ch/spherIC/recurvebowsight/ui/configuration/ArcherySetupConfigurationViewModel.java" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/ch/spherIC/recurvebowsight/ui/configuration/ArcherySetupConfigurationViewModel.java" afterDir="false" /> | |||
| <change beforePath="$PROJECT_DIR$/app/src/main/java/ch/spherIC/recurvebowsight/ui/configuration/RiserConfigurationActivity.java" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/ch/spherIC/recurvebowsight/ui/configuration/RiserConfigurationActivity.java" afterDir="false" /> | |||
| <change beforePath="$PROJECT_DIR$/app/src/main/java/ch/spherIC/recurvebowsight/ui/configuration/RiserConfigurationViewModel.java" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/ch/spherIC/recurvebowsight/ui/configuration/RiserConfigurationViewModel.java" afterDir="false" /> | |||
| <change beforePath="$PROJECT_DIR$/app/src/main/java/ch/spherIC/recurvebowsight/ui/configuration/SightConfigurationActivity.java" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/ch/spherIC/recurvebowsight/ui/configuration/SightConfigurationActivity.java" afterDir="false" /> | |||
| <change beforePath="$PROJECT_DIR$/app/src/main/java/ch/spherIC/recurvebowsight/ui/configuration/SightConfigurationViewModel.java" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/ch/spherIC/recurvebowsight/ui/configuration/SightConfigurationViewModel.java" afterDir="false" /> | |||
| <change beforePath="$PROJECT_DIR$/app/src/main/java/ch/spherIC/recurvebowsight/ui/equipment/AddEquipmentFragment.java" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/ch/spherIC/recurvebowsight/ui/equipment/AddEquipmentFragment.java" afterDir="false" /> | |||
| <change beforePath="$PROJECT_DIR$/app/src/main/java/ch/spherIC/recurvebowsight/ui/equipment/ChooseEquipmentFragment.java" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/ch/spherIC/recurvebowsight/ui/equipment/ChooseEquipmentFragment.java" afterDir="false" /> | |||
| <change beforePath="$PROJECT_DIR$/app/src/main/java/ch/spherIC/recurvebowsight/ui/equipment/EquipmentRecyclerViewAdapter.java" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/ch/spherIC/recurvebowsight/ui/equipment/EquipmentRecyclerViewAdapter.java" afterDir="false" /> | |||
| <change beforePath="$PROJECT_DIR$/app/src/main/java/ch/spherIC/recurvebowsight/utilities/PlatformUtils.java" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/ch/spherIC/recurvebowsight/utilities/PlatformUtils.java" afterDir="false" /> | |||
| <change beforePath="$PROJECT_DIR$/app/src/main/java/ch/spherIC/recurvebowsight/utilities/UnitConverter.java" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/ch/spherIC/recurvebowsight/utilities/UnitConverter.java" afterDir="false" /> | |||
| <change beforePath="$PROJECT_DIR$/app/src/main/res/values/attr.xml" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/res/values/attr.xml" afterDir="false" /> | |||
| <change beforePath="$PROJECT_DIR$/app/src/main/java/ch/spherIC/recurvebowsight/utilities/NoFilterArrayAdapter.java" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/ch/spherIC/recurvebowsight/utilities/NoFilterArrayAdapter.java" afterDir="false" /> | |||
| <change beforePath="$PROJECT_DIR$/app/src/main/res/layout/fragment_calcsight_parameters.xml" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/res/layout/fragment_calcsight_parameters.xml" afterDir="false" /> | |||
| <change beforePath="$PROJECT_DIR$/app/src/main/res/layout/fragment_calcsight_sightsetting.xml" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/res/layout/fragment_calcsight_sightsetting.xml" afterDir="false" /> | |||
| <change beforePath="$PROJECT_DIR$/app/src/main/res/layout/fragment_calcsight_trajectory.xml" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/res/layout/fragment_calcsight_trajectory.xml" afterDir="false" /> | |||
| <change beforePath="$PROJECT_DIR$/app/src/main/res/values-de/strings.xml" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/res/values-de/strings.xml" afterDir="false" /> | |||
| <change beforePath="$PROJECT_DIR$/app/src/main/res/values/colors.xml" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/res/values/colors.xml" afterDir="false" /> | |||
| <change beforePath="$PROJECT_DIR$/app/src/main/res/values/strings.xml" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/res/values/strings.xml" afterDir="false" /> | |||
| </list> | |||
| <option name="SHOW_DIALOG" value="false" /> | |||
| <option name="HIGHLIGHT_CONFLICTS" value="true" /> | |||
| @@ -81,6 +56,7 @@ | |||
| <option name="RECENT_TEMPLATES"> | |||
| <list> | |||
| <option value="resourceFile" /> | |||
| <option value="layoutResourceFile" /> | |||
| <option value="Class" /> | |||
| <option value="valueResourceFile" /> | |||
| </list> | |||
| @@ -120,9 +96,12 @@ | |||
| <property name="android-custom-viewC:/Users/FSmilari/.gradle/caches/modules-2/files-2.1/androidx.recyclerview/recyclerview/1.2.1/f0f93e67af3f7417bdd560d5142f6dec4fe629c3/recyclerview-1.2.1-sources.jar!/androidx/recyclerview/widget/RecyclerView.java_SELECTED" value="RecyclerView" /> | |||
| <property name="android-custom-viewC:/Users/FSmilari/.gradle/caches/modules-2/files-2.1/androidx.viewpager2/viewpager2/1.0.0/3c3569044e6969f1ee5c3aa03b08e6717a2d782f/viewpager2-1.0.0-sources.jar!/androidx/viewpager2/widget/ViewPager2.java_SELECTED" value="ViewPager2" /> | |||
| <property name="android-custom-viewC:/Users/FSmilari/.gradle/caches/modules-2/files-2.1/androidx.viewpager2/viewpager2/1.0.0/3c3569044e6969f1ee5c3aa03b08e6717a2d782f/viewpager2-1.0.0-sources.jar!/androidx/viewpager2/widget/ViewPager2.java_ViewPager2_DIMENSIONS" value="1080 1920" /> | |||
| <property name="android-custom-viewC:/Users/FSmilari/.gradle/caches/modules-2/files-2.1/com.google.android.material/material/1.6.1/d4d703885d24c61bc0ec39a9a705969e41d773ef/material-1.6.1-sources.jar!/com/google/android/material/textfield/TextInputLayout.java_SELECTED" value="TextInputLayout" /> | |||
| <property name="android-custom-viewC:/Users/FSmilari/.gradle/caches/modules-2/files-2.1/com.google.android.material/material/1.6.1/d4d703885d24c61bc0ec39a9a705969e41d773ef/material-1.6.1-sources.jar!/com/google/android/material/textfield/TextInputLayout.java_TextInputLayout_DIMENSIONS" value="1080 1920" /> | |||
| <property name="android-custom-viewC:/Users/FSmilari/.gradle/caches/modules-2/files-2.1/com.google.android.material/material/1.6.1/d4d703885d24c61bc0ec39a9a705969e41d773ef/material-1.6.1-sources.jar!/com/google/android/material/textview/MaterialTextView.java_MaterialTextView_DIMENSIONS" value="1080 1920" /> | |||
| <property name="android-custom-viewC:/Users/FSmilari/.gradle/caches/modules-2/files-2.1/com.google.android.material/material/1.6.1/d4d703885d24c61bc0ec39a9a705969e41d773ef/material-1.6.1-sources.jar!/com/google/android/material/textview/MaterialTextView.java_SELECTED" value="MaterialTextView" /> | |||
| <property name="android-custom-viewC:/Users/FSmilari/AppData/Local/Android/Sdk/sources/android-29/android/view/View.java_SELECTED" value="View" /> | |||
| <property name="android-custom-viewC:/Users/FSmilari/AppData/Local/Android/Sdk/sources/android-29/android/widget/AbsListView.java_SELECTED" value="AbsListView" /> | |||
| <property name="android-custom-viewC:/Users/FSmilari/AppData/Local/Android/Sdk/sources/android-29/android/widget/AutoCompleteTextView.java_SELECTED" value="AutoCompleteTextView" /> | |||
| <property name="android-custom-viewC:/Users/FSmilari/AppData/Local/Android/Sdk/sources/android-29/android/widget/EditText.java_SELECTED" value="EditText" /> | |||
| <property name="android-custom-viewC:/Users/FSmilari/AppData/Local/Android/Sdk/sources/android-29/android/widget/TextView.java_SELECTED" value="TextView" /> | |||
| @@ -140,12 +119,15 @@ | |||
| <property name="android-custom-viewC:/Users/FSmilari/AppData/Local/Android/Sdk/sources/android-32/android/widget/TextView.java_TextView_DIMENSIONS" value="1080 1920" /> | |||
| <property name="android-custom-viewZ:/Work/Java Projects/Android/RecurveBowSight/V2/app/src/main/java/ch/spherIC/recurvebowsight/components/FontTextView.java_FontTextView_DIMENSIONS" value="1080 1920" /> | |||
| <property name="android-custom-viewZ:/Work/Java Projects/Android/RecurveBowSight/V2/app/src/main/java/ch/spherIC/recurvebowsight/components/FontTextView.java_SELECTED" value="FontTextView" /> | |||
| <property name="android-custom-viewZ:/Work/Java Projects/Android/RecurveBowSight/V2/app/src/main/java/ch/spherIC/recurvebowsight/components/NumberAutoCompleteTextView.java_NumberAutoCompleteTextView_DIMENSIONS" value="1080 1920" /> | |||
| <property name="android-custom-viewZ:/Work/Java Projects/Android/RecurveBowSight/V2/app/src/main/java/ch/spherIC/recurvebowsight/components/NumberAutoCompleteTextView.java_SELECTED" value="NumberAutoCompleteTextView" /> | |||
| <property name="android-custom-viewZ:/Work/Java Projects/Android/RecurveBowSight/V2/app/src/main/java/ch/spherIC/recurvebowsight/components/XTextView.java_SELECTED" value="XTextView" /> | |||
| <property name="android-custom-viewZ:/Work/Java Projects/Android/RecurveBowSight/V2/app/src/main/java/ch/spherIC/recurvebowsight/components/XTextView.java_XTextView_DIMENSIONS" value="1080 1920" /> | |||
| <property name="cidr.known.project.marker" value="true" /> | |||
| <property name="code.cleanup.on.save" value="true" /> | |||
| <property name="format.on.save" value="true" /> | |||
| <property name="last_opened_file_path" value="$PROJECT_DIR$/app/src/main/java/ch/spherIC/recurvebowsight/components" /> | |||
| <property name="last_directory_selection" value="$PROJECT_DIR$/app/src/main/res/drawable" /> | |||
| <property name="last_opened_file_path" value="$PROJECT_DIR$/app/src/main/res/drawable" /> | |||
| <property name="optimize.imports.on.save" value="true" /> | |||
| <property name="settings.editor.selected.configurable" value="preferences.sourceCode.Java" /> | |||
| </component> | |||
| @@ -154,8 +136,8 @@ | |||
| <recent name="ch.spherIC.recurvebowsight.ui.configuration" /> | |||
| </key> | |||
| <key name="CopyFile.RECENT_KEYS"> | |||
| <recent name="Z:\Work\Java Projects\Android\RecurveBowSight\V2\app\src\main\java\ch\spherIC\recurvebowsight\components" /> | |||
| <recent name="Z:\Work\Java Projects\Android\RecurveBowSight\V2\app\src\main\res\drawable" /> | |||
| <recent name="Z:\Work\Java Projects\Android\RecurveBowSight\V2\app\src\main\java\ch\spherIC\recurvebowsight\components" /> | |||
| <recent name="Z:\Work\Java Projects\Android\RecurveBowSight\V2\app\src\main\java\ch\spherIC\recurvebowsight\ui\calcsight" /> | |||
| <recent name="Z:\Work\Java Projects\Android\RecurveBowSight\V2\app\src\main\res\layout" /> | |||
| <recent name="Z:\Work\Java Projects\Android\RecurveBowSight\V2\app\src\main\java\ch\spherIC\recurvebowsight\utilities" /> | |||
| @@ -279,24 +261,44 @@ | |||
| <component name="XDebuggerManager"> | |||
| <breakpoint-manager> | |||
| <breakpoints> | |||
| <line-breakpoint enabled="true" suspend="THREAD" type="java-line"> | |||
| <url>file://$PROJECT_DIR$/app/src/main/java/ch/spherIC/recurvebowsight/ui/calcsight/CalculateSightSightSettingFragment.java</url> | |||
| <line>78</line> | |||
| <option name="timeStamp" value="114" /> | |||
| </line-breakpoint> | |||
| <line-breakpoint enabled="true" suspend="THREAD" type="java-line"> | |||
| <url>file://$PROJECT_DIR$/app/src/main/java/ch/spherIC/recurvebowsight/ui/calcsight/CalculateSightSightSettingFragment.java</url> | |||
| <line>67</line> | |||
| <option name="timeStamp" value="115" /> | |||
| </line-breakpoint> | |||
| <line-breakpoint enabled="true" suspend="THREAD" type="java-line"> | |||
| <url>file://$PROJECT_DIR$/app/src/main/java/ch/spherIC/recurvebowsight/ui/calcsight/CalculateSightParametersFragment.java</url> | |||
| <line>247</line> | |||
| <option name="timeStamp" value="110" /> | |||
| <line>99</line> | |||
| <option name="timeStamp" value="116" /> | |||
| </line-breakpoint> | |||
| <line-breakpoint enabled="true" suspend="THREAD" type="java-line"> | |||
| <url>file://$PROJECT_DIR$/app/src/main/java/ch/spherIC/recurvebowsight/ui/calcsight/CalculateSightSightSettingFragment.java</url> | |||
| <line>109</line> | |||
| <properties> | |||
| <option name="lambda-ordinal" value="0" /> | |||
| </properties> | |||
| <option name="timeStamp" value="119" /> | |||
| </line-breakpoint> | |||
| <line-breakpoint enabled="true" suspend="THREAD" type="java-line"> | |||
| <url>file://$PROJECT_DIR$/app/src/main/java/ch/spherIC/recurvebowsight/ui/calcsight/CalculateSightSightSettingFragment.java</url> | |||
| <line>45</line> | |||
| <option name="timeStamp" value="120" /> | |||
| </line-breakpoint> | |||
| <line-breakpoint enabled="true" suspend="THREAD" type="java-line"> | |||
| <url>file://$PROJECT_DIR$/app/src/main/java/ch/spherIC/recurvebowsight/ui/calcsight/CalculateSightSightSettingFragment.java</url> | |||
| <line>96</line> | |||
| <option name="timeStamp" value="122" /> | |||
| </line-breakpoint> | |||
| </breakpoints> | |||
| </breakpoint-manager> | |||
| <watches-manager> | |||
| <configuration name="app"> | |||
| <watch expression="this" /> | |||
| <watch expression="getViewLifecycleOwner()" language="JAVA" /> | |||
| <watch expression="getParentFragment()" language="JAVA" /> | |||
| <watch expression="getParentFragment().getArguments()" language="JAVA" /> | |||
| <watch expression="getActivity()" language="JAVA" /> | |||
| <watch expression="getChildFragmentManager().getFragments()" language="JAVA" /> | |||
| <watch expression="getParentFragment().getView().findViewById(R.id.arrowNockHeightTxt)" language="JAVA" /> | |||
| <watch expression="getParentFragmentManager().getFragments()" language="JAVA" /> | |||
| <watch expression="getParentFragment().getView().findViewById(R.id.fragment_calcsight_parameters).getMeasuredWidth()" language="JAVA" custom="ch.spherIC.recurvebowsight.R" /> | |||
| </configuration> | |||
| </watches-manager> | |||
| </component> | |||
| @@ -0,0 +1,57 @@ | |||
| package ch.spherIC.recurvebowsight.components; | |||
| import android.annotation.SuppressLint; | |||
| import android.content.Context; | |||
| import android.content.res.Resources; | |||
| import android.util.AttributeSet; | |||
| import android.widget.AutoCompleteTextView; | |||
| import java.text.DecimalFormat; | |||
| import ch.spherIC.recurvebowsight.utilities.UnitConverter; | |||
| @SuppressLint("AppCompatCustomView") | |||
| public class NumberAutoCompleteTextView extends AutoCompleteTextView { | |||
| private DecimalFormat formatter; | |||
| public NumberAutoCompleteTextView(Context context) { | |||
| this(context, null); | |||
| } | |||
| public NumberAutoCompleteTextView(Context context, AttributeSet attrs) { | |||
| super(context, attrs); | |||
| } | |||
| public NumberAutoCompleteTextView(Context context, AttributeSet attrs, int defStyleAttr) { | |||
| super(context, attrs, defStyleAttr); | |||
| } | |||
| public NumberAutoCompleteTextView(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) { | |||
| super(context, attrs, defStyleAttr, defStyleRes); | |||
| } | |||
| public NumberAutoCompleteTextView(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes, Resources.Theme popupTheme) { | |||
| super(context, attrs, defStyleAttr, defStyleRes, popupTheme); | |||
| int paddingH = UnitConverter.dpToPxH(16); | |||
| int paddingV = UnitConverter.dpToPxV(16); | |||
| setPadding(paddingH, paddingV, paddingH, paddingV); | |||
| } | |||
| public DecimalFormat getFormatter() { | |||
| return formatter; | |||
| } | |||
| public void setFormatter(DecimalFormat formatter) { | |||
| this.formatter = formatter; | |||
| } | |||
| @Override | |||
| protected CharSequence convertSelectionToString(Object selectedItem) { | |||
| if (this.formatter != null && selectedItem instanceof Double) { | |||
| return this.formatter.format(selectedItem); | |||
| } | |||
| return super.convertSelectionToString(selectedItem); | |||
| } | |||
| } | |||
| @@ -38,7 +38,6 @@ public class CalculateSightParametersFragment extends Fragment implements Trajec | |||
| public static final DecimalFormat DF = new DecimalFormat("0.##"); | |||
| public static final DecimalFormat DF_1 = new DecimalFormat("0.00"); | |||
| public static final DecimalFormat DF_2 = new DecimalFormat("0.0##"); | |||
| public static final DecimalFormat DF_EVS = new DecimalFormat("0.#"); | |||
| private static final double CENTI = 0.01; | |||
| private static final double MILLI = 0.001; | |||
| private static final int MAX_TRAJ_POINTS = 200; | |||
| @@ -76,6 +75,9 @@ public class CalculateSightParametersFragment extends Fragment implements Trajec | |||
| if (getParentFragment() != null && getParentFragment().getArguments() != null && getParentFragment().getArguments().containsKey("setup")) { | |||
| IArcherySetup archerySetup = getParentFragment().getArguments().getParcelable("setup"); | |||
| this.calculateSightViewModel.setSelectedArcherySetup(archerySetup); | |||
| Bundle bundle = new Bundle(); | |||
| bundle.putParcelable("selectedArcherySetup", archerySetup); | |||
| getParentFragmentManager().setFragmentResult("selectedArcherySetup", bundle); | |||
| } | |||
| } | |||
| @@ -95,11 +97,16 @@ public class CalculateSightParametersFragment extends Fragment implements Trajec | |||
| bundle.putParcelable("ballisticResults", ballisticResults); | |||
| getParentFragmentManager().setFragmentResult("ballisticResults", bundle); | |||
| Bundle startAngleBundle = new Bundle(); | |||
| startAngleBundle.putDouble("startAngle", ballisticResults.getStartAngle()); | |||
| startAngleBundle.putDouble("shootingDistance", this.calculateSightViewModel.getShootingDistance().getValue()); | |||
| getParentFragmentManager().setFragmentResult("startAngle", startAngleBundle); | |||
| if (this.progressDialog != null) { | |||
| this.progressDialog.dismiss(); | |||
| } | |||
| ((CalculateSightFragment) getParentFragment()).scrollToTab(1); | |||
| ((CalculateSightFragment) getParentFragment()).scrollToTab(2); | |||
| } | |||
| private void addObservers() { | |||
| @@ -202,25 +209,9 @@ public class CalculateSightParametersFragment extends Fragment implements Trajec | |||
| && !this.binding.arrowNockHeightTxt.getText().toString().isEmpty() | |||
| && !this.binding.targetCenterHeightTxt.getText().toString().isEmpty() | |||
| && !this.binding.deltaTimeTxt.getText().toString().isEmpty() | |||
| && !this.binding.calcPrecisionTxt.getText().toString().isEmpty() | |||
| && allSightParamFieldsValid(); | |||
| } | |||
| private boolean allSightParamFieldsValid() { | |||
| /*return !this.scVvisHTxtFld.getText().toString().isEmpty() | |||
| && !this.scVvisVTxtFld.getText().toString().isEmpty() | |||
| && !this.scaHTxtFld.getText().toString().isEmpty() | |||
| && !this.scaVTxtFld.getText().toString().isEmpty() | |||
| && !this.scVertScaleRngTxtFld.getText().toString().isEmpty() | |||
| && !this.scPointerOffsetTxtFld.getText().toString().isEmpty() | |||
| && ((this.scHeVSSpinner.getVisibility() == View.VISIBLE && this.scHeVSSpinner.getSelectedItem() != null) | |||
| || (this.scHeVSTxtFld.getVisibility() == View.VISIBLE && !this.scHeVSTxtFld.getText().toString().isEmpty())) | |||
| && !this.scVertScaleMiddleTxtFld.getText().toString().isEmpty(); | |||
| */ | |||
| return true; | |||
| && !this.binding.calcPrecisionTxt.getText().toString().isEmpty(); | |||
| } | |||
| private void addValueChangeListeners() { | |||
| this.accuracyOptimizingTextWatcher = new SuspendableTextWatcher() { | |||
| @Override | |||
| @@ -3,34 +3,304 @@ | |||
| */ | |||
| package ch.spherIC.recurvebowsight.ui.calcsight; | |||
| import android.content.Context; | |||
| import android.content.res.ColorStateList; | |||
| import android.os.Bundle; | |||
| import android.view.Gravity; | |||
| import android.view.LayoutInflater; | |||
| import android.view.View; | |||
| import android.view.ViewGroup; | |||
| import android.widget.TextView; | |||
| import android.view.inputmethod.InputMethodManager; | |||
| import android.widget.ArrayAdapter; | |||
| import android.widget.AutoCompleteTextView; | |||
| import android.widget.Toast; | |||
| import java.text.DecimalFormat; | |||
| import java.util.List; | |||
| import androidx.annotation.NonNull; | |||
| import androidx.fragment.app.Fragment; | |||
| import androidx.lifecycle.ViewModelProvider; | |||
| import ch.spherIC.recurvebowsight.R; | |||
| import ch.spherIC.recurvebowsight.components.NumberAutoCompleteTextView; | |||
| import ch.spherIC.recurvebowsight.database.dao.RiserDao; | |||
| import ch.spherIC.recurvebowsight.database.dao.SightDao; | |||
| import ch.spherIC.recurvebowsight.databinding.FragmentCalcsightSightsettingBinding; | |||
| import ch.spherIC.recurvebowsight.model.IArcherySetup; | |||
| import ch.spherIC.recurvebowsight.model.IRiser; | |||
| import ch.spherIC.recurvebowsight.model.ISight; | |||
| import ch.spherIC.recurvebowsight.utilities.NoFilterArrayAdapter; | |||
| import ch.spherIC.recurvebowsight.utilities.PlatformUtils; | |||
| public class CalculateSightSightSettingFragment extends Fragment { | |||
| public static final DecimalFormat DF = new DecimalFormat("0.##"); | |||
| public static final DecimalFormat DF_EVS = new DecimalFormat("0.#"); | |||
| private FragmentCalcsightSightsettingBinding binding; | |||
| private CalculateSightSightSettingViewModel calcSightSettingModel; | |||
| private ColorStateList defaultTextColors; | |||
| private int defaultBoxBackgroundColor; | |||
| public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { | |||
| CalculateSightSightSettingViewModel calculateSightSightSettingViewModel = new ViewModelProvider(this).get(CalculateSightSightSettingViewModel.class); | |||
| binding = FragmentCalcsightSightsettingBinding.inflate(inflater, container, false); | |||
| View root = binding.getRoot(); | |||
| this.calcSightSettingModel = new ViewModelProvider(this).get(CalculateSightSightSettingViewModel.class); | |||
| this.binding = FragmentCalcsightSightsettingBinding.inflate(inflater, container, false); | |||
| View root = this.binding.getRoot(); | |||
| this.defaultTextColors = this.binding.ssEvSTxt.getTextColors(); | |||
| this.defaultBoxBackgroundColor = this.binding.ssEvSLayout.getBoxBackgroundColor(); | |||
| NumberAutoCompleteTextView horizontalSightSettingTxt = root.findViewById(R.id.ssHorizontalSightSettingTxt); | |||
| horizontalSightSettingTxt.setFormatter(new DecimalFormat("0.#")); | |||
| this.binding.fabCalculate.setOnClickListener(new View.OnClickListener() { | |||
| @Override | |||
| public void onClick(View view) { | |||
| updateModelFromUI(); | |||
| calculateSettings(); | |||
| } | |||
| }); | |||
| getParentFragmentManager().setFragmentResultListener("selectedArcherySetup", this, (requestKey, bundle) -> { | |||
| if (requestKey.equals("selectedArcherySetup")) { | |||
| IArcherySetup selectedArcherySetup = bundle.getParcelable("selectedArcherySetup"); | |||
| if (selectedArcherySetup != null) { | |||
| this.calcSightSettingModel.setSelectedArcherySetup(selectedArcherySetup); | |||
| this.calcSightSettingModel.setSelectedRiser(selectedArcherySetup.getRiser()); | |||
| this.calcSightSettingModel.setSelectedSight(selectedArcherySetup.getSight()); | |||
| this.calcSightSettingModel.setHeVis(selectedArcherySetup.getSightHorzSetting()); | |||
| this.calcSightSettingModel.setVertSkalaMiddle(selectedArcherySetup.getSightVertSkalaMiddle()); | |||
| loadHeVis(selectedArcherySetup.getSight()); | |||
| } | |||
| } | |||
| }); | |||
| getParentFragmentManager().setFragmentResultListener("startAngle", this, (requestKey, bundle) -> { | |||
| if (requestKey.equals("startAngle")) { | |||
| Double startAngle = bundle.getDouble("startAngle"); | |||
| Double shootingDist = bundle.getDouble("shootingDistance"); | |||
| this.calcSightSettingModel.setStartAngle(startAngle); | |||
| this.calcSightSettingModel.setShootingDistance(shootingDist); | |||
| } | |||
| }); | |||
| final TextView textView = binding.textCalcsightSightsetting; | |||
| calculateSightSightSettingViewModel.getText().observe(getViewLifecycleOwner(), textView::setText); | |||
| loadRisers(); | |||
| loadSights(); | |||
| addRiserSpinnerListener(); | |||
| addSightSpinnerListener(); | |||
| addHeVisSpinnerListener(); | |||
| addObservers(); | |||
| return root; | |||
| } | |||
| @Override | |||
| public void onResume() { | |||
| super.onResume(); | |||
| calculateSettings(false); | |||
| } | |||
| @Override | |||
| public void onDestroyView() { | |||
| super.onDestroyView(); | |||
| binding = null; | |||
| this.binding = null; | |||
| } | |||
| private void addObservers() { | |||
| this.calcSightSettingModel.getSelectedRiser().observe(getViewLifecycleOwner(), riser -> this.binding.ssRiserSelectionTxt.setText(riser != null ? riser.toString() : "")); | |||
| this.calcSightSettingModel.getSelectedSight().observe(getViewLifecycleOwner(), sight -> this.binding.ssSightSelectionTxt.setText(sight != null ? sight.toString() : "")); | |||
| this.calcSightSettingModel.getVVisV().observe(getViewLifecycleOwner(), vVisV -> this.binding.ssvVisVTxt.setText(vVisV != null ? DF.format(vVisV) : "")); | |||
| this.calcSightSettingModel.getVVisH().observe(getViewLifecycleOwner(), vVisH -> this.binding.ssvVisHTxt.setText(vVisH != null ? DF.format(vVisH) : "")); | |||
| this.calcSightSettingModel.getHeVis().observe(getViewLifecycleOwner(), heVis -> this.binding.ssHorizontalSightSettingTxt.setText(heVis != null ? DF.format(heVis) : "")); | |||
| this.calcSightSettingModel.getAV().observe(getViewLifecycleOwner(), aV -> this.binding.ssaVTxt.setText(aV != null ? DF.format(aV) : "")); | |||
| this.calcSightSettingModel.getAH().observe(getViewLifecycleOwner(), aH -> this.binding.ssaHTxt.setText(aH != null ? DF.format(aH) : "")); | |||
| this.calcSightSettingModel.getVertScaleRngMin().observe(getViewLifecycleOwner(), vertSclRngMin -> this.binding.ssVertScaleRngTxt.setText(getVertScaleRangeText(vertSclRngMin, null))); | |||
| this.calcSightSettingModel.getVertScaleRngMax().observe(getViewLifecycleOwner(), vertSclRngMax -> this.binding.ssVertScaleRngTxt.setText(getVertScaleRangeText(null, vertSclRngMax))); | |||
| this.calcSightSettingModel.getScalePointerOffset().observe(getViewLifecycleOwner(), scalePtrOffset -> this.binding.ssVertScalePointerOffsetTxt.setText(scalePtrOffset != null ? DF.format(scalePtrOffset) : "")); | |||
| this.calcSightSettingModel.getVertSkalaMiddle().observe(getViewLifecycleOwner(), vertScaleMiddle -> this.binding.ssVertSkalaMiddleTxt.setText(vertScaleMiddle != null ? DF.format(vertScaleMiddle) : "")); | |||
| this.calcSightSettingModel.getEvS().observe(getViewLifecycleOwner(), evs -> this.binding.ssEvSTxt.setText(evs != null ? DF_EVS.format(evs) : "")); | |||
| } | |||
| private void updateModelFromUI() { | |||
| this.calcSightSettingModel.setVertSkalaMiddle(PlatformUtils.parseDouble(this.binding.ssVertSkalaMiddleTxt.getText().toString())); | |||
| } | |||
| private String getVertScaleRangeText(Double vertSclRngMin, Double vertSclRngMax) { | |||
| if (vertSclRngMin != null && vertSclRngMax != null) { | |||
| return DF.format(vertSclRngMin) + "-" + DF.format(vertSclRngMax); | |||
| } else if (vertSclRngMin != null && vertSclRngMax == null) { | |||
| return DF.format(vertSclRngMin) + "-" + (this.calcSightSettingModel.getVertScaleRngMax().getValue() != null ? | |||
| DF.format(this.calcSightSettingModel.getVertScaleRngMax().getValue()) : ""); | |||
| } else if (vertSclRngMin == null && vertSclRngMax != null) { | |||
| return (this.calcSightSettingModel.getVertScaleRngMin().getValue() != null ? | |||
| DF.format(this.calcSightSettingModel.getVertScaleRngMin().getValue()) : "") + "-" + DF.format(vertSclRngMax); | |||
| } | |||
| return ""; | |||
| } | |||
| private void loadRisers() { | |||
| List<IRiser> risers = RiserDao.getInstance().loadAll(); | |||
| ArrayAdapter<IRiser> adapter = new NoFilterArrayAdapter<IRiser>(this.binding.getRoot().getContext(), android.R.layout.simple_dropdown_item_1line, risers); | |||
| AutoCompleteTextView textView = this.binding.ssRiserSelectionTxt; | |||
| textView.setAdapter(adapter); | |||
| textView.invalidate(); | |||
| } | |||
| private void loadSights() { | |||
| List<ISight> sights = SightDao.getInstance().loadAll(); | |||
| ArrayAdapter<ISight> adapter = new NoFilterArrayAdapter<ISight>(this.binding.getRoot().getContext(), android.R.layout.simple_dropdown_item_1line, sights); | |||
| AutoCompleteTextView textView = this.binding.ssSightSelectionTxt; | |||
| textView.setAdapter(adapter); | |||
| textView.invalidate(); | |||
| } | |||
| private void loadHeVis(ISight selectedSight) { | |||
| ArrayAdapter<Double> adapter = new NoFilterArrayAdapter<Double>(this.binding.getRoot().getContext(), android.R.layout.simple_dropdown_item_1line, | |||
| selectedSight.getHeVisList(), new DecimalFormat("0.#")); | |||
| AutoCompleteTextView textView = this.binding.ssHorizontalSightSettingTxt; | |||
| textView.setAdapter(adapter); | |||
| textView.invalidate(); | |||
| } | |||
| private void addHeVisSpinnerListener() { | |||
| AutoCompleteTextView textView = this.binding.getRoot().findViewById(R.id.ssHorizontalSightSettingTxt); | |||
| textView.setOnItemClickListener((parent, view, position, id) -> { | |||
| Double selectedHeVis = (Double) textView.getAdapter().getItem(position); | |||
| if (selectedHeVis != null) { | |||
| calcSightSettingModel.setHeVis(selectedHeVis); | |||
| } | |||
| }); | |||
| } | |||
| private void addSightSpinnerListener() { | |||
| AutoCompleteTextView textView = this.binding.getRoot().findViewById(R.id.ssSightSelectionTxt); | |||
| textView.setOnItemClickListener((parent, view, position, id) -> { | |||
| ISight selectedSight = (ISight) textView.getAdapter().getItem(position); | |||
| if (selectedSight != null) { | |||
| loadHeVis(selectedSight); | |||
| calcSightSettingModel.setSelectedSight(selectedSight); | |||
| calcSightSettingModel.setHeVis(selectedSight.getHeVisList().get(0)); | |||
| } | |||
| }); | |||
| } | |||
| private void addRiserSpinnerListener() { | |||
| AutoCompleteTextView textView = this.binding.getRoot().findViewById(R.id.ssRiserSelectionTxt); | |||
| textView.setOnItemClickListener((parent, view, position, id) -> { | |||
| IRiser selectedRiser = (IRiser) textView.getAdapter().getItem(position); | |||
| if (selectedRiser != null) { | |||
| calcSightSettingModel.setSelectedRiser(selectedRiser); | |||
| } | |||
| }); | |||
| } | |||
| /** | |||
| * Berechnet die definitve Visiereinstellung anhand des berechneten Flugbahnwinkels. | |||
| */ | |||
| private void calculateSettings() { | |||
| calculateSettings(true); | |||
| } | |||
| private void calculateSettings(boolean hintOnValidationError) { | |||
| Context context = this.binding.getRoot().getContext(); | |||
| InputMethodManager imm = (InputMethodManager) context.getSystemService(Context.INPUT_METHOD_SERVICE); | |||
| imm.hideSoftInputFromWindow(this.binding.getRoot().getWindowToken(), InputMethodManager.HIDE_NOT_ALWAYS); | |||
| this.binding.ssEvSTxt.requestFocus(); | |||
| if (allSightParamFieldsValid() && this.calcSightSettingModel.getSelectedArcherySetup() != null && this.calcSightSettingModel.getStartAngle() != null | |||
| && this.calcSightSettingModel.getShootingDistance() != null) { | |||
| Double startAngle = this.calcSightSettingModel.getStartAngle(); | |||
| Double x0; | |||
| Double y0; | |||
| Double x1; | |||
| Double y1; | |||
| Double x2; | |||
| Double y2; | |||
| Double x3; | |||
| Double y3; | |||
| Double r; | |||
| Double s; | |||
| Double vVh = this.calcSightSettingModel.getVVisH().getValue() + this.calcSightSettingModel.getAH().getValue(); | |||
| Double vVv = this.calcSightSettingModel.getVVisV().getValue() + this.calcSightSettingModel.getAV().getValue(); | |||
| Double a = this.calcSightSettingModel.getSelectedArcherySetup().getBowPullout() * 10; | |||
| Double heVs = this.calcSightSettingModel.getHeVis().getValue(); | |||
| Double lhNA = this.calcSightSettingModel.getSelectedArcherySetup().getHNA(); | |||
| Double dltH = (this.calcSightSettingModel.getSelectedArcherySetup().getTargetCenterHeight() - this.calcSightSettingModel.getSelectedArcherySetup().getArrowNockHeight()) * Math.pow(10, 3); | |||
| Double ldistH = this.calcSightSettingModel.getShootingDistance() * Math.pow(10, 3); | |||
| Double minSkala = this.calcSightSettingModel.getVertScaleRngMin().getValue(); | |||
| Double maxSkala = this.calcSightSettingModel.getVertScaleRngMax().getValue(); | |||
| Double pointerOffset = this.calcSightSettingModel.getScalePointerOffset().getValue(); | |||
| Double nockRaising = this.calcSightSettingModel.getSelectedArcherySetup().getNockRaising() - this.calcSightSettingModel.getSelectedArcherySetup().getArrowDiameter(); | |||
| Double braceHeight = this.calcSightSettingModel.getSelectedArcherySetup().getBraceHeight(); | |||
| Double phi = -Math.atan(nockRaising / braceHeight); // Winkel des Pfeils zur Auflage infolge Nockpunktüberhöhung | |||
| // PIN auf Höhe UK Vertikalskala Visier, gedreht um den Abschusswinkel... | |||
| Double x01 = a * Math.cos(phi) + vVh + heVs; | |||
| Double y01 = a * Math.sin(phi) + vVv - maxSkala / 2; | |||
| x0 = Math.cos(Math.toRadians(startAngle)) * x01 - Math.sin(Math.toRadians(startAngle)) * y01; | |||
| y0 = Math.sin(Math.toRadians(startAngle)) * x01 + Math.cos(Math.toRadians(startAngle)) * y01; | |||
| // PIN auf Höhe Horizontalschlitten Visier, gedreht um den Abschusswinkel... | |||
| Double x02 = a * Math.cos(phi) + vVh + heVs; | |||
| Double y02 = a * Math.sin(phi) + vVv; | |||
| x2 = Math.cos(Math.toRadians(startAngle)) * x02 - Math.sin(Math.toRadians(startAngle)) * y02; | |||
| y2 = Math.sin(Math.toRadians(startAngle)) * x02 + Math.cos(Math.toRadians(startAngle)) * y02; | |||
| // Schnittpunkt der Achse Horizontalschlitten Visier mit Achse Befestigungslöcher Visier, gedreht um den Abschusswinkel... | |||
| Double x03 = a * Math.cos(phi) + vVh; | |||
| Double y03 = a * Math.sin(phi) + vVv; | |||
| x3 = Math.cos(Math.toRadians(startAngle)) * x03 - Math.sin(Math.toRadians(startAngle)) * y03; | |||
| y3 = Math.sin(Math.toRadians(startAngle)) * x03 + Math.cos(Math.toRadians(startAngle)) * y03; | |||
| // Unbekannte der Vektorgeradengleichung | |||
| r = (lhNA * (x0 - x2) - x0 * y2 + x2 * y0) / (ldistH * (y0 - y2) + (dltH - lhNA) * (x2 - x0)); | |||
| s = -((ldistH * (lhNA - y0) + (dltH - lhNA) * x0) / (ldistH * (y0 - y2) + (dltH - lhNA) * (x2 - x0))); | |||
| // Pin auf Visierlinie | |||
| x1 = r * ldistH; | |||
| y1 = lhNA + r * (dltH - lhNA); | |||
| // Unten (+) oder oben (-) von (x2/y2) ? | |||
| Double n = ((y2 - y3) * (x1 - x3) - (x2 - x3) * (y1 - y3)) < 0 ? -1.0 : 1.0; | |||
| // Abstand P1 - P2 | |||
| Double d = Math.sqrt(Math.pow(x1 - x2, 2) + Math.pow(y1 - y2, 2)) * n; | |||
| // Einstellung auf vert. Skala | |||
| Double sV = this.calcSightSettingModel.getVertSkalaMiddle().getValue() + d - pointerOffset; | |||
| this.binding.ssEvSTxt.setText(DF_EVS.format(sV)); | |||
| if (minSkala <= sV && sV <= maxSkala) { | |||
| this.binding.ssEvSLayout.setBoxBackgroundColor(getResources().getColor(R.color.android_green, this.binding.getRoot().getContext().getTheme())); | |||
| this.binding.ssEvSTxt.setTextColor(getResources().getColor(R.color.black, this.binding.getRoot().getContext().getTheme())); | |||
| } else { | |||
| this.binding.ssEvSLayout.setBoxBackgroundColor(getResources().getColor(R.color.android_red, this.binding.getRoot().getContext().getTheme())); | |||
| this.binding.ssEvSTxt.setTextColor(getResources().getColor(R.color.white, this.binding.getRoot().getContext().getTheme())); | |||
| } | |||
| } else { | |||
| this.binding.ssEvSLayout.setBoxBackgroundColor(this.defaultBoxBackgroundColor); | |||
| this.binding.ssEvSTxt.setTextColor(this.defaultTextColors); | |||
| this.binding.ssEvSTxt.setText(""); | |||
| this.binding.ssEvSTxt.clearFocus(); | |||
| if (hintOnValidationError) { | |||
| Toast toast = Toast.makeText(this.binding.getRoot().getContext(), getResources().getString(R.string.caption_FillAllMandatoryFields), Toast.LENGTH_LONG); | |||
| toast.setGravity(Gravity.CENTER, 0, 0); | |||
| toast.show(); | |||
| } | |||
| } | |||
| } | |||
| } | |||
| private boolean allSightParamFieldsValid() { | |||
| return !this.binding.ssvVisHTxt.getText().toString().isEmpty() | |||
| && !this.binding.ssvVisVTxt.getText().toString().isEmpty() | |||
| && !this.binding.ssHorizontalSightSettingTxt.getText().toString().isEmpty() | |||
| && !this.binding.ssaVTxt.getText().toString().isEmpty() | |||
| && !this.binding.ssaHTxt.getText().toString().isEmpty() | |||
| && !this.binding.ssVertScaleRngTxt.getText().toString().isEmpty() | |||
| && !this.binding.ssVertScalePointerOffsetTxt.getText().toString().isEmpty() | |||
| && !this.binding.ssVertSkalaMiddleTxt.getText().toString().isEmpty(); | |||
| } | |||
| } | |||
| @@ -6,17 +6,138 @@ package ch.spherIC.recurvebowsight.ui.calcsight; | |||
| import androidx.lifecycle.LiveData; | |||
| import androidx.lifecycle.MutableLiveData; | |||
| import androidx.lifecycle.ViewModel; | |||
| import ch.spherIC.recurvebowsight.model.IArcherySetup; | |||
| import ch.spherIC.recurvebowsight.model.IRiser; | |||
| import ch.spherIC.recurvebowsight.model.ISight; | |||
| public class CalculateSightSightSettingViewModel extends ViewModel { | |||
| private final MutableLiveData<String> mText; | |||
| private final MutableLiveData<IRiser> mRiser; | |||
| private final MutableLiveData<Double> mVvisH; | |||
| private final MutableLiveData<Double> mVvisV; | |||
| private final MutableLiveData<ISight> mSight; | |||
| private final MutableLiveData<Double> mHeVis; | |||
| private final MutableLiveData<Double> mAV; | |||
| private final MutableLiveData<Double> mAH; | |||
| private final MutableLiveData<Double> mVertScaleRngMin; | |||
| private final MutableLiveData<Double> mVertScaleRngMax; | |||
| private final MutableLiveData<Double> mScalePointerOffset; | |||
| private final MutableLiveData<Double> mVertSkalaMiddle; | |||
| private final MutableLiveData<Double> mEvS; | |||
| private IArcherySetup selectedArcherySetup; | |||
| private Double startAngle; | |||
| private Double shootingDistance; | |||
| public CalculateSightSightSettingViewModel() { | |||
| mText = new MutableLiveData<>(); | |||
| mText.setValue("This is the \"Calculate Sight Sight Setting\" fragment"); | |||
| this.mRiser = new MutableLiveData<>(); | |||
| this.mSight = new MutableLiveData<>(); | |||
| this.mVvisH = new MutableLiveData<>(); | |||
| this.mVvisV = new MutableLiveData<>(); | |||
| this.mHeVis = new MutableLiveData<>(); | |||
| this.mAV = new MutableLiveData<>(); | |||
| this.mAH = new MutableLiveData<>(); | |||
| this.mVertScaleRngMin = new MutableLiveData<>(); | |||
| this.mVertScaleRngMax = new MutableLiveData<>(); | |||
| this.mScalePointerOffset = new MutableLiveData<>(); | |||
| this.mVertSkalaMiddle = new MutableLiveData<>(); | |||
| this.mEvS = new MutableLiveData<>(); | |||
| this.mRiser.setValue(null); | |||
| this.mSight.setValue(null); | |||
| this.mVvisH.setValue(null); | |||
| this.mVvisV.setValue(null); | |||
| this.mHeVis.setValue(null); | |||
| this.mAV.setValue(null); | |||
| this.mAH.setValue(null); | |||
| this.mVertScaleRngMin.setValue(null); | |||
| this.mVertScaleRngMax.setValue(null); | |||
| this.mScalePointerOffset.setValue(null); | |||
| this.mVertSkalaMiddle.setValue(null); | |||
| this.mEvS.setValue(null); | |||
| } | |||
| public void setSelectedRiser(IRiser aSelectedRiser) { | |||
| this.mRiser.setValue(aSelectedRiser); | |||
| this.mVvisH.setValue(aSelectedRiser != null ? aSelectedRiser.getVVisH() : null); | |||
| this.mVvisV.setValue(aSelectedRiser != null ? aSelectedRiser.getVVisV() : null); | |||
| } | |||
| public void setSelectedSight(ISight aSight) { | |||
| this.mSight.setValue(aSight); | |||
| this.mAV.setValue(aSight != null ? aSight.getAV() : null); | |||
| this.mAH.setValue(aSight != null ? aSight.getAH() : null); | |||
| this.mVertScaleRngMin.setValue(aSight != null ? aSight.getVertSkalaRangeMin() : null); | |||
| this.mVertScaleRngMax.setValue(aSight != null ? aSight.getVertSkalaRangeMax() : null); | |||
| this.mScalePointerOffset.setValue(aSight != null ? aSight.getPointerOffset() : null); | |||
| } | |||
| public void setVertSkalaMiddle(Double vertSkalaMiddle) { | |||
| this.mVertSkalaMiddle.setValue(vertSkalaMiddle); | |||
| } | |||
| public void setStartAngle(Double startAngle) { | |||
| this.startAngle = startAngle; | |||
| } | |||
| public void setSelectedArcherySetup(IArcherySetup selectedArcherySetup) { | |||
| this.selectedArcherySetup = selectedArcherySetup; | |||
| } | |||
| public void setHeVis(Double aHeVis) { | |||
| this.mHeVis.setValue(aHeVis); | |||
| } | |||
| public LiveData<IRiser> getSelectedRiser() { | |||
| return mRiser; | |||
| } | |||
| public LiveData<ISight> getSelectedSight() { | |||
| return mSight; | |||
| } | |||
| public LiveData<Double> getVVisH() { | |||
| return this.mVvisH; | |||
| } | |||
| public LiveData<String> getText() { | |||
| return mText; | |||
| public LiveData<Double> getVVisV() { | |||
| return this.mVvisV; | |||
| } | |||
| public LiveData<Double> getHeVis() { | |||
| return mHeVis; | |||
| } | |||
| public LiveData<Double> getAV() { | |||
| return mAV; | |||
| } | |||
| public LiveData<Double> getAH() { | |||
| return mAH; | |||
| } | |||
| public LiveData<Double> getVertScaleRngMin() { | |||
| return mVertScaleRngMin; | |||
| } | |||
| public LiveData<Double> getVertScaleRngMax() { | |||
| return mVertScaleRngMax; | |||
| } | |||
| public LiveData<Double> getScalePointerOffset() {return mScalePointerOffset;} | |||
| public LiveData<Double> getVertSkalaMiddle() { | |||
| return mVertSkalaMiddle; | |||
| } | |||
| public LiveData<Double> getEvS() { | |||
| return mEvS; | |||
| } | |||
| public Double getStartAngle() {return startAngle;} | |||
| public IArcherySetup getSelectedArcherySetup() {return selectedArcherySetup;} | |||
| public Double getShootingDistance() {return shootingDistance;} | |||
| public void setShootingDistance(Double shootingDistance) {this.shootingDistance = shootingDistance;} | |||
| } | |||
| @@ -1,13 +1,20 @@ | |||
| package ch.spherIC.recurvebowsight.utilities; | |||
| import android.content.Context; | |||
| import android.view.LayoutInflater; | |||
| import android.view.View; | |||
| import android.view.ViewGroup; | |||
| import android.widget.ArrayAdapter; | |||
| import android.widget.Filter; | |||
| import android.widget.TextView; | |||
| import java.text.DecimalFormat; | |||
| import java.util.Arrays; | |||
| import java.util.List; | |||
| import androidx.annotation.NonNull; | |||
| import androidx.annotation.Nullable; | |||
| import ch.spherIC.recurvebowsight.R; | |||
| /** | |||
| * Almost unbelievably, if we want to create a Material Spinner, | |||
| @@ -23,6 +30,8 @@ import androidx.annotation.NonNull; | |||
| public class NoFilterArrayAdapter<T extends Object> extends ArrayAdapter<T> { | |||
| private final List<T> objects; | |||
| private final DecimalFormat formatter; | |||
| private final Filter filter_that_does_nothing = new Filter() { | |||
| @Override | |||
| @@ -42,25 +51,51 @@ public class NoFilterArrayAdapter<T extends Object> extends ArrayAdapter<T> { | |||
| /** | |||
| * Constructor | |||
| * | |||
| * @param context the context | |||
| * @param context the context | |||
| * @param resource the resource | |||
| * @param objects the list of objects | |||
| * @param objects the list of objects | |||
| */ | |||
| public NoFilterArrayAdapter(@NonNull Context context, int resource, @NonNull List<T> objects) { | |||
| this(context, resource, objects, null); | |||
| } | |||
| /** | |||
| * Constructor | |||
| * | |||
| * @param context the context | |||
| * @param resource the resource | |||
| * @param objects the list of objects | |||
| * @param formatter a formatter for the items | |||
| */ | |||
| public NoFilterArrayAdapter(@NonNull Context context, int resource, @NonNull List<T> objects, @Nullable DecimalFormat formatter) { | |||
| super(context, resource, objects); | |||
| this.objects = objects; | |||
| this.formatter = formatter; | |||
| } | |||
| /** | |||
| * Constructor | |||
| * | |||
| * @param context the context | |||
| * @param context the context | |||
| * @param resource the resource | |||
| * @param objects the list of objects | |||
| * @param objects the list of objects | |||
| */ | |||
| public NoFilterArrayAdapter(@NonNull Context context, int resource, @NonNull T[] objects) { | |||
| this(context, resource, objects, null); | |||
| } | |||
| /** | |||
| * Constructor | |||
| * | |||
| * @param context the context | |||
| * @param resource the resource | |||
| * @param objects the list of objects | |||
| * @param formatter a formatter for the items | |||
| */ | |||
| public NoFilterArrayAdapter(@NonNull Context context, int resource, @NonNull T[] objects, @Nullable DecimalFormat formatter) { | |||
| super(context, resource, objects); | |||
| this.objects = Arrays.asList(objects); | |||
| this.formatter = formatter; | |||
| } | |||
| @NonNull | |||
| @@ -68,4 +103,23 @@ public class NoFilterArrayAdapter<T extends Object> extends ArrayAdapter<T> { | |||
| public Filter getFilter() { | |||
| return filter_that_does_nothing; | |||
| } | |||
| @NonNull | |||
| @Override | |||
| public View getView(int position, @Nullable View convertView, @NonNull ViewGroup parent) { | |||
| if (this.formatter == null) { | |||
| return super.getView(position, convertView, parent); | |||
| } else { | |||
| T item = getItem(position); | |||
| if (item instanceof Double) { | |||
| String val = this.formatter.format(item); | |||
| convertView = LayoutInflater.from(getContext()).inflate(R.layout.simple_spinner_line, parent, false); | |||
| TextView tv = convertView.findViewById(R.id.idSimpleLineText); | |||
| tv.setText(val); | |||
| } else { | |||
| return super.getView(position, convertView, parent); | |||
| } | |||
| return convertView; | |||
| } | |||
| } | |||
| } | |||
| @@ -22,7 +22,6 @@ | |||
| android:layout_width="match_parent" | |||
| android:layout_height="wrap_content"> | |||
| <TextView | |||
| android:id="@+id/bowAndArrowParams" | |||
| style="@style/Widget.AppCompat.TextView" | |||
| @@ -424,6 +423,7 @@ | |||
| android:layout_gravity="bottom|end" | |||
| android:layout_marginBottom="8dp" | |||
| android:layout_marginEnd="8dp" | |||
| app:borderWidth="6dp" | |||
| app:fabSize="auto" | |||
| app:layout_constraintBottom_toBottomOf="parent" | |||
| app:layout_constraintEnd_toEndOf="parent" | |||
| @@ -6,27 +6,345 @@ | |||
| android:layout_height="match_parent" | |||
| tools:context=".ui.calcsight.CalculateSightParametersFragment"> | |||
| <TextView | |||
| android:id="@+id/text_calcsight_sightsetting" | |||
| android:layout_width="match_parent" | |||
| <ScrollView | |||
| android:layout_width="0dp" | |||
| android:layout_height="0dp" | |||
| android:layout_marginEnd="8dp" | |||
| android:layout_marginStart="8dp" | |||
| android:layout_marginTop="8dp" | |||
| android:textAlignment="center" | |||
| android:textSize="20sp" | |||
| app:layout_constraintBottom_toBottomOf="parent" | |||
| app:layout_constraintEnd_toEndOf="parent" | |||
| app:layout_constraintHorizontal_bias="0.0" | |||
| app:layout_constraintStart_toStartOf="parent" | |||
| app:layout_constraintTop_toTopOf="parent" /> | |||
| app:layout_constraintTop_toTopOf="parent" | |||
| app:layout_constraintVertical_bias="0.0"> | |||
| <com.google.android.material.textfield.TextInputLayout | |||
| style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox" | |||
| android:layout_width="0dp" | |||
| <androidx.constraintlayout.widget.ConstraintLayout | |||
| android:layout_width="match_parent" | |||
| android:layout_height="wrap_content"> | |||
| <TextView | |||
| android:id="@+id/sightSettings" | |||
| style="@style/Widget.AppCompat.TextView" | |||
| android:layout_width="0dp" | |||
| android:layout_height="wrap_content" | |||
| android:layout_marginEnd="8dp" | |||
| android:layout_marginStart="8dp" | |||
| android:layout_marginTop="16dp" | |||
| android:background="@color/purple_700" | |||
| android:padding="4dp" | |||
| android:text="@string/titleSightConfig" | |||
| android:textAppearance="@style/TextAppearance.AppCompat.Large" | |||
| android:textColor="@color/white" | |||
| app:layout_constraintEnd_toEndOf="parent" | |||
| app:layout_constraintHorizontal_bias="1.0" | |||
| app:layout_constraintStart_toStartOf="parent" | |||
| app:layout_constraintTop_toTopOf="parent" /> | |||
| <com.google.android.material.textfield.TextInputLayout | |||
| android:id="@+id/ssRiserSelectionLayout" | |||
| style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.ExposedDropdownMenu" | |||
| android:layout_width="0dp" | |||
| android:layout_height="wrap_content" | |||
| android:layout_marginEnd="8dp" | |||
| android:layout_marginStart="8dp" | |||
| android:layout_marginTop="8dp" | |||
| app:layout_constraintEnd_toEndOf="parent" | |||
| app:layout_constraintStart_toStartOf="parent" | |||
| app:layout_constraintTop_toBottomOf="@+id/sightSettings"> | |||
| <AutoCompleteTextView | |||
| android:id="@+id/ssRiserSelectionTxt" | |||
| android:layout_width="match_parent" | |||
| android:layout_height="wrap_content" | |||
| android:editable="false" | |||
| android:hint="@string/scRiserLbl" | |||
| android:singleLine="true" /> | |||
| </com.google.android.material.textfield.TextInputLayout> | |||
| <androidx.constraintlayout.helper.widget.Flow | |||
| android:id="@+id/vvisParamsFlow" | |||
| android:layout_width="0dp" | |||
| android:layout_height="wrap_content" | |||
| android:layout_marginEnd="8dp" | |||
| android:layout_marginStart="8dp" | |||
| android:layout_marginTop="9dp" | |||
| app:constraint_referenced_ids="ssvVisHLayout, ssvVisVLayout " | |||
| app:flow_wrapMode="aligned" | |||
| app:layout_constraintEnd_toEndOf="parent" | |||
| app:layout_constraintStart_toStartOf="parent" | |||
| app:layout_constraintTop_toBottomOf="@+id/ssRiserSelectionLayout" /> | |||
| <com.google.android.material.textfield.TextInputLayout | |||
| android:id="@+id/ssvVisHLayout" | |||
| style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox" | |||
| android:layout_width="0dp" | |||
| android:layout_height="wrap_content" | |||
| android:paddingRight="4dp" | |||
| app:layout_constraintTop_toBottomOf="@+id/ssRiserSelectionLayout" | |||
| tools:layout_editor_absoluteX="8dp"> | |||
| <com.google.android.material.textfield.TextInputEditText | |||
| android:id="@+id/ssvVisHTxt" | |||
| android:layout_width="match_parent" | |||
| android:layout_height="wrap_content" | |||
| android:editable="false" | |||
| android:hint="@string/scVvisHLbl" | |||
| android:nextFocusDown="@id/ssvVisVTxt" | |||
| android:singleLine="true" /> | |||
| </com.google.android.material.textfield.TextInputLayout> | |||
| <com.google.android.material.textfield.TextInputLayout | |||
| android:id="@+id/ssvVisVLayout" | |||
| style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox" | |||
| android:layout_width="0dp" | |||
| android:layout_height="wrap_content" | |||
| android:paddingLeft="4dp" | |||
| app:layout_constraintStart_toEndOf="@+id/ssvVisHLayout" | |||
| app:layout_constraintTop_toBottomOf="@+id/ssRiserSelectionLayout"> | |||
| <com.google.android.material.textfield.TextInputEditText | |||
| android:id="@+id/ssvVisVTxt" | |||
| android:layout_width="match_parent" | |||
| android:layout_height="wrap_content" | |||
| android:editable="false" | |||
| android:hint="@string/scVvisVLbl" | |||
| android:nextFocusDown="@id/ssSightSelectionTxt" | |||
| android:singleLine="true" /> | |||
| </com.google.android.material.textfield.TextInputLayout> | |||
| <com.google.android.material.textfield.TextInputLayout | |||
| android:id="@+id/ssSightSelectionLayout" | |||
| style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.ExposedDropdownMenu" | |||
| android:layout_width="0dp" | |||
| android:layout_height="wrap_content" | |||
| android:layout_marginEnd="8dp" | |||
| android:layout_marginStart="8dp" | |||
| android:layout_marginTop="8dp" | |||
| app:layout_constraintEnd_toEndOf="parent" | |||
| app:layout_constraintStart_toStartOf="parent" | |||
| app:layout_constraintTop_toBottomOf="@+id/vvisParamsFlow"> | |||
| <AutoCompleteTextView | |||
| android:id="@+id/ssSightSelectionTxt" | |||
| android:layout_width="match_parent" | |||
| android:layout_height="wrap_content" | |||
| android:editable="false" | |||
| android:hint="@string/scSightLbl" | |||
| android:singleLine="true" /> | |||
| </com.google.android.material.textfield.TextInputLayout> | |||
| <com.google.android.material.textfield.TextInputLayout | |||
| android:id="@+id/ssHorizontalSightSettingLayout" | |||
| style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.ExposedDropdownMenu" | |||
| android:layout_width="0dp" | |||
| android:layout_height="wrap_content" | |||
| android:layout_marginEnd="8dp" | |||
| android:layout_marginStart="8dp" | |||
| android:layout_marginTop="8dp" | |||
| app:layout_constraintEnd_toEndOf="parent" | |||
| app:layout_constraintStart_toStartOf="parent" | |||
| app:layout_constraintTop_toBottomOf="@+id/ssSightSelectionLayout"> | |||
| <ch.spherIC.recurvebowsight.components.NumberAutoCompleteTextView | |||
| android:id="@+id/ssHorizontalSightSettingTxt" | |||
| android:layout_width="match_parent" | |||
| android:layout_height="wrap_content" | |||
| android:editable="false" | |||
| android:hint="@string/scHeVSLbl" | |||
| android:padding="16dp" | |||
| android:singleLine="true" | |||
| android:textSize="16sp" /> | |||
| </com.google.android.material.textfield.TextInputLayout> | |||
| <androidx.constraintlayout.helper.widget.Flow | |||
| android:id="@+id/ssaHVParamsFlow" | |||
| android:layout_width="0dp" | |||
| android:layout_height="wrap_content" | |||
| android:layout_marginEnd="8dp" | |||
| android:layout_marginStart="8dp" | |||
| android:layout_marginTop="8dp" | |||
| app:constraint_referenced_ids="ssaVLayout,ssaHLayout " | |||
| app:flow_wrapMode="aligned" | |||
| app:layout_constraintEnd_toEndOf="parent" | |||
| app:layout_constraintStart_toStartOf="parent" | |||
| app:layout_constraintTop_toBottomOf="@+id/ssHorizontalSightSettingLayout" /> | |||
| <com.google.android.material.textfield.TextInputLayout | |||
| android:id="@+id/ssaVLayout" | |||
| style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox" | |||
| android:layout_width="0dp" | |||
| android:layout_height="wrap_content" | |||
| android:paddingRight="4dp" | |||
| tools:layout_editor_absoluteX="8dp" | |||
| tools:layout_editor_absoluteY="339dp"> | |||
| <com.google.android.material.textfield.TextInputEditText | |||
| android:id="@+id/ssaVTxt" | |||
| android:layout_width="match_parent" | |||
| android:layout_height="wrap_content" | |||
| android:editable="false" | |||
| android:hint="@string/scaVLbl" | |||
| android:nextFocusDown="@id/ssVertScaleRngTxt" | |||
| android:singleLine="true" /> | |||
| </com.google.android.material.textfield.TextInputLayout> | |||
| <com.google.android.material.textfield.TextInputLayout | |||
| android:id="@+id/ssaHLayout" | |||
| style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox" | |||
| android:layout_width="0dp" | |||
| android:layout_height="wrap_content" | |||
| android:paddingLeft="4dp" | |||
| app:layout_constraintStart_toEndOf="@+id/ssaVLayout" | |||
| app:layout_constraintTop_toBottomOf="@+id/ssHorizontalSightSettingLayout"> | |||
| <com.google.android.material.textfield.TextInputEditText | |||
| android:id="@+id/ssaHTxt" | |||
| android:layout_width="match_parent" | |||
| android:layout_height="wrap_content" | |||
| android:editable="false" | |||
| android:hint="@string/scaHLbl" | |||
| android:nextFocusDown="@id/ssVertScaleRngTxt" | |||
| android:singleLine="true" /> | |||
| </com.google.android.material.textfield.TextInputLayout> | |||
| <androidx.constraintlayout.helper.widget.Flow | |||
| android:id="@+id/ssScaleParamsFlow" | |||
| android:layout_width="0dp" | |||
| android:layout_height="wrap_content" | |||
| android:layout_marginEnd="8dp" | |||
| android:layout_marginStart="8dp" | |||
| android:layout_marginTop="8dp" | |||
| app:constraint_referenced_ids="ssVertScaleRngLayout,ssVertScalePointerOffsetLayout" | |||
| app:flow_wrapMode="aligned" | |||
| app:layout_constraintEnd_toEndOf="parent" | |||
| app:layout_constraintStart_toStartOf="parent" | |||
| app:layout_constraintTop_toBottomOf="@+id/ssaHVParamsFlow" /> | |||
| <com.google.android.material.textfield.TextInputLayout | |||
| android:id="@+id/ssVertScaleRngLayout" | |||
| style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox" | |||
| android:layout_width="0dp" | |||
| android:layout_height="wrap_content" | |||
| android:paddingRight="4dp" | |||
| tools:layout_editor_absoluteX="8dp" | |||
| tools:layout_editor_absoluteY="339dp"> | |||
| <com.google.android.material.textfield.TextInputEditText | |||
| android:id="@+id/ssVertScaleRngTxt" | |||
| android:layout_width="match_parent" | |||
| android:layout_height="wrap_content" | |||
| android:editable="false" | |||
| android:hint="@string/scVertScaleRngLbl" | |||
| android:nextFocusDown="@id/ssVertSkalaMiddleTxt" | |||
| android:singleLine="true" /> | |||
| </com.google.android.material.textfield.TextInputLayout> | |||
| <com.google.android.material.textfield.TextInputLayout | |||
| android:id="@+id/ssVertScalePointerOffsetLayout" | |||
| style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox" | |||
| android:layout_width="0dp" | |||
| android:layout_height="wrap_content" | |||
| android:paddingLeft="4dp" | |||
| app:layout_constraintStart_toEndOf="@+id/ssVertScaleRngLayout" | |||
| app:layout_constraintTop_toBottomOf="@+id/ssaHLayout"> | |||
| <com.google.android.material.textfield.TextInputEditText | |||
| android:id="@+id/ssVertScalePointerOffsetTxt" | |||
| android:layout_width="match_parent" | |||
| android:layout_height="wrap_content" | |||
| android:editable="false" | |||
| android:hint="@string/scVertScalePointerOffsetLbl" | |||
| android:nextFocusDown="@id/ssVertSkalaMiddleTxt" | |||
| android:singleLine="true" /> | |||
| </com.google.android.material.textfield.TextInputLayout> | |||
| <com.google.android.material.textfield.TextInputLayout | |||
| android:id="@+id/ssVertSkalaMiddleLayout" | |||
| style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox" | |||
| android:layout_width="match_parent" | |||
| android:layout_height="wrap_content" | |||
| android:layout_marginEnd="8dp" | |||
| android:layout_marginStart="8dp" | |||
| android:layout_marginTop="8dp" | |||
| android:layout_weight="1" | |||
| app:layout_constraintEnd_toEndOf="parent" | |||
| app:layout_constraintStart_toStartOf="parent" | |||
| app:layout_constraintTop_toBottomOf="@+id/ssScaleParamsFlow"> | |||
| <com.google.android.material.textfield.TextInputEditText | |||
| android:id="@+id/ssVertSkalaMiddleTxt" | |||
| android:layout_width="match_parent" | |||
| android:layout_height="wrap_content" | |||
| android:hint="@string/scVertSkalaMiddleLbl" | |||
| android:singleLine="true" /> | |||
| </com.google.android.material.textfield.TextInputLayout> | |||
| <LinearLayout | |||
| android:layout_width="match_parent" | |||
| android:layout_height="wrap_content" | |||
| android:layout_marginBottom="72dp" | |||
| android:layout_marginEnd="8dp" | |||
| android:layout_marginStart="8dp" | |||
| android:layout_marginTop="8dp" | |||
| android:orientation="horizontal" | |||
| android:weightSum="2" | |||
| app:layout_constraintBottom_toBottomOf="parent" | |||
| app:layout_constraintEnd_toEndOf="parent" | |||
| app:layout_constraintStart_toStartOf="parent" | |||
| app:layout_constraintTop_toBottomOf="@+id/ssVertSkalaMiddleLayout"> | |||
| <Space | |||
| android:layout_width="0dp" | |||
| android:layout_height="match_parent" | |||
| android:layout_weight="1" /> | |||
| <com.google.android.material.textfield.TextInputLayout | |||
| android:id="@+id/ssEvSLayout" | |||
| style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox" | |||
| android:layout_width="0dp" | |||
| android:layout_height="wrap_content" | |||
| android:layout_marginStart="8dp" | |||
| android:layout_weight="1" | |||
| app:boxCornerRadiusBottomEnd="8dp" | |||
| app:boxCornerRadiusBottomStart="8dp" | |||
| app:boxCornerRadiusTopEnd="8dp" | |||
| app:boxCornerRadiusTopStart="8dp" | |||
| app:boxStrokeWidth="2.5dp" | |||
| app:layout_constraintEnd_toEndOf="parent" | |||
| app:layout_constraintStart_toStartOf="parent" | |||
| app:layout_constraintTop_toBottomOf="@+id/ssScaleParamsFlow"> | |||
| <com.google.android.material.textfield.TextInputEditText | |||
| android:id="@+id/ssEvSTxt" | |||
| android:layout_width="match_parent" | |||
| android:layout_height="wrap_content" | |||
| android:layout_weight="1" | |||
| android:editable="false" | |||
| android:fontFamily="sans-serif-medium" | |||
| android:hint="@string/scEvSLbl" | |||
| android:paddingVertical="15dp" | |||
| android:singleLine="true" | |||
| android:textSize="20sp" /> | |||
| </com.google.android.material.textfield.TextInputLayout> | |||
| </LinearLayout> | |||
| </androidx.constraintlayout.widget.ConstraintLayout> | |||
| </ScrollView> | |||
| <com.google.android.material.floatingactionbutton.FloatingActionButton | |||
| android:id="@+id/fab_calculate" | |||
| android:layout_width="wrap_content" | |||
| android:layout_height="wrap_content" | |||
| android:layout_gravity="bottom|end" | |||
| android:layout_marginBottom="8dp" | |||
| android:layout_marginEnd="8dp" | |||
| android:layout_marginStart="8dp" | |||
| app:borderWidth="6dp" | |||
| app:fabSize="auto" | |||
| app:layout_constraintBottom_toBottomOf="parent" | |||
| app:layout_constraintEnd_toEndOf="parent" | |||
| app:layout_constraintStart_toStartOf="parent" | |||
| app:layout_constraintTop_toBottomOf="@+id/text_calcsight_sightsetting" /> | |||
| app:maxImageSize="36dp" | |||
| app:srcCompat="@drawable/ic_icon_calculate" | |||
| tools:ignore="SpeakableTextPresentCheck" /> | |||
| </androidx.constraintlayout.widget.ConstraintLayout> | |||
| @@ -22,7 +22,7 @@ | |||
| android:layout_height="match_parent" | |||
| android:layout_marginHorizontal="8dp" | |||
| android:layout_marginTop="8dp" | |||
| android:background="@color/light_gray" | |||
| android:background="@color/gray_light" | |||
| android:ems="10" | |||
| android:inputType="textMultiLine" | |||
| android:padding="4dp" | |||
| @@ -0,0 +1,9 @@ | |||
| <?xml version="1.0" encoding="utf-8"?> | |||
| <TextView xmlns:android="http://schemas.android.com/apk/res/android" | |||
| android:id="@+id/idSimpleLineText" | |||
| style="?android:attr/dropDownItemStyle" | |||
| android:layout_width="match_parent" | |||
| android:layout_height="?android:attr/listPreferredItemHeight" | |||
| android:ellipsize="marquee" | |||
| android:singleLine="true" | |||
| android:textAppearance="?android:attr/textAppearanceLargePopupMenu" /> | |||
| @@ -64,12 +64,18 @@ | |||
| <string name="rcVvisVLbl">VvisV [mm]</string> | |||
| <string name="scTitleSightConfig">Konfiguration Visier</string> | |||
| <string name="rcSightLbl">Visier</string> | |||
| <string name="titleSightConfig">Visiereinstellung</string> | |||
| <string name="scRiserLbl">Griffstück</string> | |||
| <string name="scVvisHLbl">VvisH [mm]</string> | |||
| <string name="scVvisVLbl">VvisV [mm]</string> | |||
| <string name="scSightLbl">Visier</string> | |||
| <string name="scManufacturerLbl">Hersteller</string> | |||
| <string name="scModelLbl">Modell</string> | |||
| <string name="scHeVSLbl">Horz. Einst. Visierschlitten [mm]</string> | |||
| <string name="scaHLbl">aH [mm]</string> | |||
| <string name="scaVLbl">aV [mm]</string> | |||
| <string name="scVertScaleRngLbl">Bereich vert. Skala [mm] /\nSkalenversatz [mm]</string> | |||
| <string name="scVertScaleRngLbl">Bereich vert. Skala [mm]</string> | |||
| <string name="scVertScalePointerOffsetLbl">Skalenversatz [mm]</string> | |||
| <string name="scVertScaleRngMinLbl">Min. Bereich vert. Skala [mm]</string> | |||
| <string name="scVertScaleRngMaxLbl">Max. Bereich vert. Skala [mm]</string> | |||
| <string name="scVertSkalaMiddleLbl">Mittelstellung M vert. Skala [mm]</string> | |||
| @@ -7,7 +7,15 @@ | |||
| <color name="teal_700">#FF018786</color> | |||
| <color name="black">#FF000000</color> | |||
| <color name="white">#FFFFFFFF</color> | |||
| <color name="light_gray">#EBF1F8</color> | |||
| <color name="gray_light">#EBF1F8</color> | |||
| <color name="gray_medium">#FFA0A0A0</color> | |||
| <color name="qrt_translucent_white">#BDFFFFFF</color> | |||
| <color name="semi_translucent_black">#80000000</color> | |||
| <color name="android_green">#FF99CC00</color> | |||
| <color name="android_green_dark">#FF669900</color> | |||
| <color name="android_yellow">#FFFFBB33</color> | |||
| <color name="android_yellow_dark">#FFFF8800</color> | |||
| <color name="android_red">#FFFF4444</color> | |||
| <color name="android_red_dark">#FFCC0000</color> | |||
| </resources> | |||
| @@ -64,12 +64,18 @@ | |||
| <string name="rcVvisVLbl">VvisV [mm]</string> | |||
| <string name="scTitleSightConfig">Sight Configuration</string> | |||
| <string name="rcSightLbl">Sight</string> | |||
| <string name="titleSightConfig">Sight Setting</string> | |||
| <string name="scRiserLbl">Riser</string> | |||
| <string name="scVvisHLbl">VvisH [mm]</string> | |||
| <string name="scVvisVLbl">VvisV [mm]</string> | |||
| <string name="scSightLbl">Sight</string> | |||
| <string name="scManufacturerLbl">Manufacturer</string> | |||
| <string name="scModelLbl">Model</string> | |||
| <string name="scHeVSLbl">Horz. Sight Sliding Carriage [mm]</string> | |||
| <string name="scaHLbl">aH [mm]</string> | |||
| <string name="scaVLbl">aV [mm]</string> | |||
| <string name="scVertScaleRngLbl">Vert. Scale Range [mm] /\nScale Pointer Offset [mm]</string> | |||
| <string name="scVertScaleRngLbl">Vert. Scale Range [mm]</string> | |||
| <string name="scVertScalePointerOffsetLbl">Scale Pointer Offset [mm]</string> | |||
| <string name="scVertScaleRngMinLbl">Vert. Scale Range Min. [mm]</string> | |||
| <string name="scVertScaleRngMaxLbl">Vert. Scale Range Max. [mm]</string> | |||
| <string name="scVertSkalaMiddleLbl">Vert. Scale Middle Setting M [mm]</string> | |||
| @@ -107,4 +113,5 @@ | |||
| <string name="fcChart_TitleLable">Trajectory</string> | |||
| <string name="fcChart_TitleXAxis">Distance [m]</string> | |||
| <string name="fcChart_TitleYAxis">Height [m]</string> | |||
| </resources> | |||