| @@ -303,7 +303,7 @@ | |||
| <PersistentState> | |||
| <option name="values"> | |||
| <map> | |||
| <entry key="url" value="file:/$USER_HOME$/AppData/Local/Android/Sdk/icons/material/materialicons/terrain/baseline_terrain_24.xml" /> | |||
| <entry key="url" value="file:/$USER_HOME$/AppData/Local/Android/Sdk/icons/material/materialiconsoutlined/thumb_up/outline_thumb_up_24.xml" /> | |||
| </map> | |||
| </option> | |||
| </PersistentState> | |||
| @@ -313,7 +313,7 @@ | |||
| </option> | |||
| <option name="values"> | |||
| <map> | |||
| <entry key="outputName" value="ic_calcsight_trajectory" /> | |||
| <entry key="outputName" value="ic_outline_thumb_up_24" /> | |||
| <entry key="sourceFile" value="Z:\Work\Java Projects\Android\RecurveBowSight\archery_equipment_choose.svg" /> | |||
| </map> | |||
| </option> | |||
| @@ -17,15 +17,20 @@ | |||
| <entry key="..\:/Work/Java Projects/Android/RecurveBowSight/V2/app/src/main/res/drawable/ic_menu_new_equipment.xml" value="0.284" /> | |||
| <entry key="..\:/Work/Java Projects/Android/RecurveBowSight/V2/app/src/main/res/drawable/ic_menu_slideshow.xml" value="0.285" /> | |||
| <entry key="..\:/Work/Java Projects/Android/RecurveBowSight/V2/app/src/main/res/drawable/ic_menu_userguide.xml" value="0.248" /> | |||
| <entry key="..\:/Work/Java Projects/Android/RecurveBowSight/V2/app/src/main/res/drawable/ic_outline_handshake_24.xml" value="0.2675" /> | |||
| <entry key="..\:/Work/Java Projects/Android/RecurveBowSight/V2/app/src/main/res/drawable/ic_outline_thumb_up_24.xml" value="0.2675" /> | |||
| <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_main.xml" value="0.28072916666666664" /> | |||
| <entry key="..\:/Work/Java Projects/Android/RecurveBowSight/V2/app/src/main/res/layout/app_bar_main.xml" value="0.1480978260869565" /> | |||
| <entry key="..\:/Work/Java Projects/Android/RecurveBowSight/V2/app/src/main/res/layout/content_main.xml" value="0.3625" /> | |||
| <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.18194444444444444" /> | |||
| <entry key="..\:/Work/Java Projects/Android/RecurveBowSight/V2/app/src/main/res/layout/fragment_calcsight_parameters.xml" value="0.175" /> | |||
| <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_trajectory.xml" value="0.1840846994535519" /> | |||
| <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" /> | |||
| <entry key="..\:/Work/Java Projects/Android/RecurveBowSight/V2/app/src/main/res/layout/fragment_equipment_add_list.xml" value="0.25" /> | |||
| <entry key="..\:/Work/Java Projects/Android/RecurveBowSight/V2/app/src/main/res/layout/fragment_equipment_choose.xml" value="0.33" /> | |||
| <entry key="..\:/Work/Java Projects/Android/RecurveBowSight/V2/app/src/main/res/layout/fragment_equipment_choose_list.xml" value="0.25" /> | |||
| <entry key="..\:/Work/Java Projects/Android/RecurveBowSight/V2/app/src/main/res/layout/fragment_gallery.xml" value="0.1480978260869565" /> | |||
| @@ -21,13 +21,14 @@ | |||
| </component> | |||
| <component name="ChangeListManager"> | |||
| <list default="true" id="41369230-c648-4299-baf3-de5f13bcb18c" name="Changes" comment=""> | |||
| <change afterPath="$PROJECT_DIR$/.idea/saveactions_settings.xml" afterDir="false" /> | |||
| <change afterPath="$PROJECT_DIR$/app/src/main/java/ch/spherIC/recurvebowsight/ui/calcsight/CalculateSightCollectionAdapter.java" afterDir="false" /> | |||
| <change afterPath="$PROJECT_DIR$/app/src/main/java/ch/spherIC/recurvebowsight/ui/calcsight/CalculateSightParametersFragment.java" afterDir="false" /> | |||
| <change afterPath="$PROJECT_DIR$/app/src/main/java/ch/spherIC/recurvebowsight/ui/calcsight/CalculateSightParametersViewModel.java" afterDir="false" /> | |||
| <change afterPath="$PROJECT_DIR$/app/src/main/res/drawable/ic_calcsight_parameter.xml" afterDir="false" /> | |||
| <change afterPath="$PROJECT_DIR$/app/src/main/res/drawable/ic_calcsight_trajectory.xml" afterDir="false" /> | |||
| <change afterPath="$PROJECT_DIR$/app/src/main/res/layout/fragment_calcsight_parameters.xml" afterDir="false" /> | |||
| <change afterPath="$PROJECT_DIR$/app/src/main/java/ch/spherIC/recurvebowsight/ui/calcsight/CalculateSightSightSettingFragment.java" afterDir="false" /> | |||
| <change afterPath="$PROJECT_DIR$/app/src/main/java/ch/spherIC/recurvebowsight/ui/calcsight/CalculateSightSightSettingViewModel.java" afterDir="false" /> | |||
| <change afterPath="$PROJECT_DIR$/app/src/main/java/ch/spherIC/recurvebowsight/ui/calcsight/CalculateSightTrajectoryFragment.java" afterDir="false" /> | |||
| <change afterPath="$PROJECT_DIR$/app/src/main/java/ch/spherIC/recurvebowsight/ui/calcsight/CalculateSightTrajectoryViewModel.java" afterDir="false" /> | |||
| <change afterPath="$PROJECT_DIR$/app/src/main/res/drawable/ic_cfg_riser.xml" afterDir="false" /> | |||
| <change afterPath="$PROJECT_DIR$/app/src/main/res/layout/fragment_calcsight_sightsetting.xml" afterDir="false" /> | |||
| <change afterPath="$PROJECT_DIR$/app/src/main/res/layout/fragment_calcsight_trajectory.xml" afterDir="false" /> | |||
| <change afterPath="$PROJECT_DIR$/app/src/main/res/values/string_arrays.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" /> | |||
| @@ -37,10 +38,20 @@ | |||
| <change beforePath="$PROJECT_DIR$/.idea/assetWizardSettings.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/assetWizardSettings.xml" 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/ui/about/AboutFragment.java" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/ch/spherIC/recurvebowsight/ui/about/AboutFragment.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/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/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/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/EquipmentFragment.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/res/drawable/ic_menu_calcsight.xml" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/res/drawable/ic_menu_calcsight.xml" afterDir="false" /> | |||
| <change beforePath="$PROJECT_DIR$/app/src/main/res/layout/fragment_calcsight.xml" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/res/layout/fragment_calcsight.xml" 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_equipment_add.xml" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/res/layout/fragment_equipment_add_list.xml" afterDir="false" /> | |||
| <change beforePath="$PROJECT_DIR$/app/src/main/res/layout/fragment_equipment_choose_list.xml" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/res/layout/fragment_equipment_choose_list.xml" afterDir="false" /> | |||
| <change beforePath="$PROJECT_DIR$/app/src/main/res/navigation/mobile_navigation.xml" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/res/navigation/mobile_navigation.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/dimens.xml" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/res/values/dimens.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" /> | |||
| @@ -58,8 +69,8 @@ | |||
| <option name="RECENT_TEMPLATES"> | |||
| <list> | |||
| <option value="resourceFile" /> | |||
| <option value="valueResourceFile" /> | |||
| <option value="Class" /> | |||
| <option value="valueResourceFile" /> | |||
| </list> | |||
| </option> | |||
| </component> | |||
| @@ -78,6 +89,7 @@ | |||
| <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/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-32/android/view/View.java_SELECTED" value="View" /> | |||
| <property name="android-custom-viewC:/Users/FSmilari/AppData/Local/Android/Sdk/sources/android-32/android/view/View.java_View_DIMENSIONS" value="1080 1920" /> | |||
| <property name="android-custom-viewC:/Users/FSmilari/AppData/Local/Android/Sdk/sources/android-32/android/view/ViewGroup.java_SELECTED" value="ViewGroup" /> | |||
| @@ -87,17 +99,17 @@ | |||
| <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/res/layout" /> | |||
| <property name="last_opened_file_path" value="$PROJECT_DIR$/app/src/main/java/ch/spherIC/recurvebowsight/ui/calcsight" /> | |||
| <property name="optimize.imports.on.save" value="true" /> | |||
| <property name="settings.editor.selected.configurable" value="preferences.keymap" /> | |||
| </component> | |||
| <component name="RecentsManager"> | |||
| <key name="CopyFile.RECENT_KEYS"> | |||
| <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" /> | |||
| <recent name="Z:\Work\Java Projects\Android\RecurveBowSight\V2\app\src\main\java\ch\spherIC\recurvebowsight\database" /> | |||
| <recent name="Z:\Work\Java Projects\Android\RecurveBowSight\V2\app\src\main\java\ch\spherIC\recurvebowsight\database\scheme\masterdata" /> | |||
| <recent name="Z:\Work\Java Projects\Android\RecurveBowSight\V2\app\src\main\java\ch\spherIC\recurvebowsight\database\scheme\data" /> | |||
| </key> | |||
| <key name="android.template.1093395407"> | |||
| <recent name="ch.spherIC.recurvebowsight" /> | |||
| @@ -217,13 +229,23 @@ | |||
| </line-breakpoint> | |||
| <line-breakpoint enabled="true" suspend="THREAD" type="java-line"> | |||
| <url>file://$PROJECT_DIR$/app/src/main/java/ch/spherIC/recurvebowsight/ui/equipment/EquipmentRecyclerViewAdapter.java</url> | |||
| <line>73</line> | |||
| <option name="timeStamp" value="6" /> | |||
| <line>48</line> | |||
| <option name="timeStamp" value="10" /> | |||
| </line-breakpoint> | |||
| <line-breakpoint enabled="true" suspend="THREAD" type="java-line"> | |||
| <url>file://$PROJECT_DIR$/app/src/main/java/ch/spherIC/recurvebowsight/ui/calcsight/CalculateSightViewModel.java</url> | |||
| <url>file://$PROJECT_DIR$/app/src/main/java/ch/spherIC/recurvebowsight/ui/equipment/AddEquipmentFragment.java</url> | |||
| <line>26</line> | |||
| <option name="timeStamp" value="9" /> | |||
| <option name="timeStamp" value="11" /> | |||
| </line-breakpoint> | |||
| <line-breakpoint enabled="true" suspend="THREAD" type="java-line"> | |||
| <url>file://$PROJECT_DIR$/app/src/main/java/ch/spherIC/recurvebowsight/ui/equipment/AddEquipmentFragment.java</url> | |||
| <line>30</line> | |||
| <option name="timeStamp" value="12" /> | |||
| </line-breakpoint> | |||
| <line-breakpoint enabled="true" suspend="THREAD" type="java-line"> | |||
| <url>file://$PROJECT_DIR$/app/src/main/java/ch/spherIC/recurvebowsight/ui/equipment/EquipmentRecyclerViewAdapter.java</url> | |||
| <line>51</line> | |||
| <option name="timeStamp" value="13" /> | |||
| </line-breakpoint> | |||
| </breakpoints> | |||
| </breakpoint-manager> | |||
| @@ -232,6 +254,7 @@ | |||
| <watch expression="getArguments()" /> | |||
| <watch expression="this.selectedArcherySetup.getName()" language="JAVA" /> | |||
| <watch expression="tab.getPosition()" language="JAVA" /> | |||
| <watch expression="v.findViewById(R.id.card_view_riser_setup)" language="JAVA" /> | |||
| </configuration> | |||
| </watches-manager> | |||
| </component> | |||
| @@ -17,11 +17,19 @@ public class CalculateSightCollectionAdapter extends FragmentStateAdapter { | |||
| @Override | |||
| public Fragment createFragment(int position) { | |||
| // Return a NEW fragment instance in createFragment(int) | |||
| Fragment fragment = new CalculateSightParametersFragment(position); | |||
| //Bundle args = new Bundle(); | |||
| // Our object is just an integer :-P | |||
| // args.putInt(DemoObjectFragment.ARG_OBJECT, position + 1); | |||
| // fragment.setArguments(args); | |||
| Fragment fragment = null; | |||
| switch (position) { | |||
| case 0: | |||
| fragment = new CalculateSightParametersFragment(); | |||
| break; | |||
| case 1: | |||
| fragment = new CalculateSightTrajectoryFragment(); | |||
| break; | |||
| case 2: | |||
| fragment = new CalculateSightSightSettingFragment(); | |||
| break; | |||
| } | |||
| return fragment; | |||
| } | |||
| @@ -4,30 +4,30 @@ import android.os.Bundle; | |||
| import android.view.LayoutInflater; | |||
| import android.view.View; | |||
| import android.view.ViewGroup; | |||
| import android.widget.ArrayAdapter; | |||
| import android.widget.AutoCompleteTextView; | |||
| import android.widget.TextView; | |||
| import androidx.annotation.NonNull; | |||
| import androidx.fragment.app.Fragment; | |||
| import androidx.lifecycle.ViewModelProvider; | |||
| import ch.spherIC.recurvebowsight.R; | |||
| import ch.spherIC.recurvebowsight.databinding.FragmentCalcsightParametersBinding; | |||
| public class CalculateSightParametersFragment extends Fragment { | |||
| private final int position; | |||
| private FragmentCalcsightParametersBinding binding; | |||
| public CalculateSightParametersFragment(int position) { | |||
| this.position = position; | |||
| } | |||
| public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { | |||
| CalculateSightParametersViewModel galleryViewModel = new ViewModelProvider(this).get(CalculateSightParametersViewModel.class); | |||
| CalculateSightParametersViewModel calculateSightParametersViewModel = new ViewModelProvider(this).get(CalculateSightParametersViewModel.class); | |||
| binding = FragmentCalcsightParametersBinding.inflate(inflater, container, false); | |||
| View root = binding.getRoot(); | |||
| loadCalculationAccuracies(root); | |||
| loadCalculationTimeIntervals(root); | |||
| final TextView textView = binding.textCalcsightParams; | |||
| galleryViewModel.setText(position); | |||
| galleryViewModel.getText().observe(getViewLifecycleOwner(), textView::setText); | |||
| calculateSightParametersViewModel.getText().observe(getViewLifecycleOwner(), textView::setText); | |||
| return root; | |||
| } | |||
| @@ -36,4 +36,18 @@ public class CalculateSightParametersFragment extends Fragment { | |||
| super.onDestroyView(); | |||
| binding = null; | |||
| } | |||
| private void loadCalculationAccuracies(View root) { | |||
| String[] accuracies = root.getResources().getStringArray(R.array.CalculationAccuracies); | |||
| ArrayAdapter<String> adapter = new ArrayAdapter<String>(root.getContext(), android.R.layout.simple_dropdown_item_1line, accuracies); | |||
| AutoCompleteTextView textView = root.findViewById(R.id.calcPrecisionTxt); | |||
| textView.setAdapter(adapter); | |||
| } | |||
| private void loadCalculationTimeIntervals(View root) { | |||
| String[] timeDeltas = root.getResources().getStringArray(R.array.CalculationTimeIntervals); | |||
| ArrayAdapter<String> adapter = new ArrayAdapter<String>(root.getContext(), android.R.layout.simple_dropdown_item_1line, timeDeltas); | |||
| AutoCompleteTextView textView = root.findViewById(R.id.deltaTimeTxt); | |||
| textView.setAdapter(adapter); | |||
| } | |||
| } | |||
| @@ -13,10 +13,6 @@ public class CalculateSightParametersViewModel extends ViewModel { | |||
| mText.setValue("This is the \"Calculate Sight Params\" fragment"); | |||
| } | |||
| public void setText(int position) { | |||
| mText.setValue(mText.getValue() + position); | |||
| } | |||
| public LiveData<String> getText() { | |||
| return mText; | |||
| } | |||
| @@ -0,0 +1,33 @@ | |||
| package ch.spherIC.recurvebowsight.ui.calcsight; | |||
| import android.os.Bundle; | |||
| import android.view.LayoutInflater; | |||
| import android.view.View; | |||
| import android.view.ViewGroup; | |||
| import android.widget.TextView; | |||
| import androidx.annotation.NonNull; | |||
| import androidx.fragment.app.Fragment; | |||
| import androidx.lifecycle.ViewModelProvider; | |||
| import ch.spherIC.recurvebowsight.databinding.FragmentCalcsightSightsettingBinding; | |||
| public class CalculateSightSightSettingFragment extends Fragment { | |||
| private FragmentCalcsightSightsettingBinding binding; | |||
| 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(); | |||
| final TextView textView = binding.textCalcsightSightsetting; | |||
| calculateSightSightSettingViewModel.getText().observe(getViewLifecycleOwner(), textView::setText); | |||
| return root; | |||
| } | |||
| @Override | |||
| public void onDestroyView() { | |||
| super.onDestroyView(); | |||
| binding = null; | |||
| } | |||
| } | |||
| @@ -0,0 +1,19 @@ | |||
| package ch.spherIC.recurvebowsight.ui.calcsight; | |||
| import androidx.lifecycle.LiveData; | |||
| import androidx.lifecycle.MutableLiveData; | |||
| import androidx.lifecycle.ViewModel; | |||
| public class CalculateSightSightSettingViewModel extends ViewModel { | |||
| private final MutableLiveData<String> mText; | |||
| public CalculateSightSightSettingViewModel() { | |||
| mText = new MutableLiveData<>(); | |||
| mText.setValue("This is the \"Calculate Sight Sight Setting\" fragment"); | |||
| } | |||
| public LiveData<String> getText() { | |||
| return mText; | |||
| } | |||
| } | |||
| @@ -0,0 +1,33 @@ | |||
| package ch.spherIC.recurvebowsight.ui.calcsight; | |||
| import android.os.Bundle; | |||
| import android.view.LayoutInflater; | |||
| import android.view.View; | |||
| import android.view.ViewGroup; | |||
| import android.widget.TextView; | |||
| import androidx.annotation.NonNull; | |||
| import androidx.fragment.app.Fragment; | |||
| import androidx.lifecycle.ViewModelProvider; | |||
| import ch.spherIC.recurvebowsight.databinding.FragmentCalcsightTrajectoryBinding; | |||
| public class CalculateSightTrajectoryFragment extends Fragment { | |||
| private FragmentCalcsightTrajectoryBinding binding; | |||
| public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { | |||
| CalculateSightTrajectoryViewModel calculateSightTrajectoryViewModel = new ViewModelProvider(this).get(CalculateSightTrajectoryViewModel.class); | |||
| binding = FragmentCalcsightTrajectoryBinding.inflate(inflater, container, false); | |||
| View root = binding.getRoot(); | |||
| final TextView textView = binding.textCalcsightTrajectory; | |||
| calculateSightTrajectoryViewModel.getText().observe(getViewLifecycleOwner(), textView::setText); | |||
| return root; | |||
| } | |||
| @Override | |||
| public void onDestroyView() { | |||
| super.onDestroyView(); | |||
| binding = null; | |||
| } | |||
| } | |||
| @@ -0,0 +1,19 @@ | |||
| package ch.spherIC.recurvebowsight.ui.calcsight; | |||
| import androidx.lifecycle.LiveData; | |||
| import androidx.lifecycle.MutableLiveData; | |||
| import androidx.lifecycle.ViewModel; | |||
| public class CalculateSightTrajectoryViewModel extends ViewModel { | |||
| private final MutableLiveData<String> mText; | |||
| public CalculateSightTrajectoryViewModel() { | |||
| mText = new MutableLiveData<>(); | |||
| mText.setValue("This is the \"Calculate Sight Trajectory\" fragment"); | |||
| } | |||
| public LiveData<String> getText() { | |||
| return mText; | |||
| } | |||
| } | |||
| @@ -2,25 +2,51 @@ package ch.spherIC.recurvebowsight.ui.equipment; | |||
| import android.os.Bundle; | |||
| import android.view.LayoutInflater; | |||
| import android.view.MotionEvent; | |||
| import android.view.View; | |||
| import android.view.ViewGroup; | |||
| import android.widget.TextView; | |||
| import androidx.annotation.NonNull; | |||
| import androidx.constraintlayout.widget.ConstraintLayout; | |||
| import androidx.fragment.app.Fragment; | |||
| import androidx.lifecycle.ViewModelProvider; | |||
| import ch.spherIC.recurvebowsight.databinding.FragmentEquipmentAddBinding; | |||
| import ch.spherIC.recurvebowsight.R; | |||
| import ch.spherIC.recurvebowsight.databinding.FragmentEquipmentAddListBinding; | |||
| public class AddEquipmentFragment extends Fragment { | |||
| private FragmentEquipmentAddBinding binding; | |||
| private FragmentEquipmentAddListBinding binding; | |||
| public View onCreateView(@NonNull LayoutInflater inflater, | |||
| ViewGroup container, Bundle savedInstanceState) { | |||
| AddEquipmentViewModel homeViewModel = new ViewModelProvider(this).get(AddEquipmentViewModel.class); | |||
| binding = FragmentEquipmentAddBinding.inflate(inflater, container, false); | |||
| binding = FragmentEquipmentAddListBinding.inflate(inflater, container, false); | |||
| View root = binding.getRoot(); | |||
| View view = root.findViewById(R.id.card_view_riser_border); | |||
| view.setOnTouchListener(new View.OnTouchListener() { | |||
| @Override | |||
| public boolean onTouch(View v, MotionEvent event) { | |||
| float alpha = 1.0f; | |||
| int horzMargin = v.getResources().getDimensionPixelSize(R.dimen.nav_header_horizontal_spacing); | |||
| int vertMargin = v.getResources().getDimensionPixelSize(R.dimen.nav_header_vertical_spacing); | |||
| if (event.getAction() == MotionEvent.ACTION_DOWN) { | |||
| alpha = 0.9f; | |||
| horzMargin = v.getResources().getDimensionPixelSize(R.dimen.nav_header_horizontal_spacing_onclick); | |||
| vertMargin = v.getResources().getDimensionPixelSize(R.dimen.nav_header_vertical_spacing_onclick); | |||
| } | |||
| View setupCardView = v.findViewById(R.id.card_view_riser_setup); | |||
| setupCardView.setAlpha(alpha); | |||
| ConstraintLayout.LayoutParams layoutParams = (ConstraintLayout.LayoutParams) v.getLayoutParams(); | |||
| layoutParams.setMargins(horzMargin, vertMargin, horzMargin, vertMargin); | |||
| v.requestLayout(); | |||
| return true; | |||
| } | |||
| }); | |||
| final TextView textView = binding.textEquipment; | |||
| homeViewModel.getText().observe(getViewLifecycleOwner(), textView::setText); | |||
| return root; | |||
| @@ -31,4 +57,6 @@ public class AddEquipmentFragment extends Fragment { | |||
| super.onDestroyView(); | |||
| binding = null; | |||
| } | |||
| } | |||
| @@ -21,7 +21,7 @@ import ch.spherIC.recurvebowsight.model.IArcherySetup; | |||
| /** | |||
| * A fragment representing a list of Items. | |||
| */ | |||
| public class EquipmentFragment extends Fragment { | |||
| public class ChooseEquipmentFragment extends Fragment { | |||
| // TODO: Customize parameter argument names | |||
| private static final String ARG_COLUMN_COUNT = "column-count"; | |||
| @@ -32,13 +32,13 @@ public class EquipmentFragment extends Fragment { | |||
| * Mandatory empty constructor for the fragment manager to instantiate the | |||
| * fragment (e.g. upon screen orientation changes). | |||
| */ | |||
| public EquipmentFragment() { | |||
| public ChooseEquipmentFragment() { | |||
| } | |||
| // TODO: Customize parameter initialization | |||
| @SuppressWarnings("unused") | |||
| public static EquipmentFragment newInstance(int columnCount) { | |||
| EquipmentFragment fragment = new EquipmentFragment(); | |||
| public static ChooseEquipmentFragment newInstance(int columnCount) { | |||
| ChooseEquipmentFragment fragment = new ChooseEquipmentFragment(); | |||
| Bundle args = new Bundle(); | |||
| args.putInt(ARG_COLUMN_COUNT, columnCount); | |||
| fragment.setArguments(args); | |||
| @@ -107,9 +107,9 @@ public class EquipmentRecyclerViewAdapter extends RecyclerView.Adapter<Equipment | |||
| public ViewHolder(FragmentEquipmentChooseBinding binding) { | |||
| super(binding.getRoot()); | |||
| mSetupNameView = binding.setupName; | |||
| mRiserNameView = binding.riserName; | |||
| mSightNameView = binding.sightName; | |||
| mSetupNameView = binding.setupName; | |||
| } | |||
| @Override | |||
| @@ -0,0 +1,25 @@ | |||
| <vector xmlns:android="http://schemas.android.com/apk/res/android" | |||
| android:tint="#000000" | |||
| android:height="24dp" | |||
| android:width="24dp" | |||
| android:viewportHeight="24" | |||
| android:viewportWidth="24"> | |||
| <group | |||
| android:translateX="3.0" | |||
| android:translateY="3.0" | |||
| android:scaleX="0.75" | |||
| android:scaleY="0.75"> | |||
| <path | |||
| android:fillColor="@android:color/white" | |||
| android:pathData="M9,21h9c0.83,0 1.54,-0.5 1.84,-1.22l3.02,-7.05c0.09,-0.23 0.14,-0.47 0.14,-0.73v-2c0,-1.1 -0.9,-2 -2,-2h-6.31l0.95,-4.57 0.03,-0.32c0,-0.41 -0.17,-0.79 -0.44,-1.06L14.17,1 7.58,7.59C7.22,7.95 7,8.45 7,9v10c0,1.1 0.9,2 2,2zM9,9l4.34,-4.34L12,10h9v2l-3,7H9V9zM1,9h4v12H1z" /> | |||
| </group> | |||
| <path | |||
| android:fillColor="@android:color/white" | |||
| android:pathData="M12,0 l4,0 l2,8 l-4,0 Z | |||
| M14,8 l4,0 l-1,2 l-4,0 Z | |||
| M11.7,18 l4,0 l-3.2,5.9 l-4,0 Z | |||
| M13.7,12 l6.5,0 l-1,1 l-6,0 Z | |||
| M12.7,14.5 l6.5,0 l-1,1 l-6,0 Z" /> | |||
| </vector> | |||
| @@ -5,9 +5,9 @@ | |||
| android:viewportHeight="24" | |||
| android:tint="#000000"> | |||
| <path | |||
| android:fillColor="@android:color/black" | |||
| android:fillColor="@android:color/white" | |||
| android:pathData="M12,8c-2.21,0 -4,1.79 -4,4s1.79,4 4,4 4,-1.79 4,-4 -1.79,-4 -4,-4zM20.94,11c-0.46,-4.17 -3.77,-7.48 -7.94,-7.94L13,1h-2v2.06C6.83,3.52 3.52,6.83 3.06,11L1,11v2h2.06c0.46,4.17 3.77,7.48 7.94,7.94L11,23h2v-2.06c4.17,-0.46 7.48,-3.77 7.94,-7.94L23,13v-2h-2.06zM12,19c-3.87,0 -7,-3.13 -7,-7s3.13,-7 7,-7 7,3.13 7,7 -3.13,7 -7,7z" /> | |||
| <path | |||
| android:fillColor="@android:color/black" | |||
| android:fillColor="@android:color/white" | |||
| android:pathData="M1,13 l22,0 l0,-2 l-22,0z M13,1 l0,22 l-2,0 l0,-22z" /> | |||
| </vector> | |||
| @@ -11,9 +11,12 @@ | |||
| android:id="@+id/calcSight_tabLayout" | |||
| android:layout_width="0dp" | |||
| android:layout_height="wrap_content" | |||
| android:background="@drawable/side_nav_bar" | |||
| 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:tabIconTint="@color/white"> | |||
| <com.google.android.material.tabs.TabItem | |||
| android:layout_width="match_parent" | |||
| @@ -4,19 +4,427 @@ | |||
| xmlns:tools="http://schemas.android.com/tools" | |||
| android:layout_width="match_parent" | |||
| android:layout_height="match_parent" | |||
| android:isScrollContainer="true" | |||
| tools:context=".ui.calcsight.CalculateSightParametersFragment"> | |||
| <TextView | |||
| android:id="@+id/text_calcsight_params" | |||
| android:layout_width="match_parent" | |||
| android:layout_height="wrap_content" | |||
| android:layout_marginEnd="8dp" | |||
| android:layout_marginStart="8dp" | |||
| android:layout_marginTop="8dp" | |||
| android:textAlignment="center" | |||
| android:textSize="20sp" | |||
| <ScrollView | |||
| android:layout_width="0dp" | |||
| android:layout_height="0dp" | |||
| app:layout_constraintBottom_toBottomOf="parent" | |||
| app:layout_constraintEnd_toEndOf="parent" | |||
| app:layout_constraintStart_toStartOf="parent" | |||
| app:layout_constraintTop_toTopOf="parent" /> | |||
| </androidx.constraintlayout.widget.ConstraintLayout> | |||
| app:layout_constraintTop_toTopOf="parent"> | |||
| <androidx.constraintlayout.widget.ConstraintLayout | |||
| android:layout_width="match_parent" | |||
| android:layout_height="wrap_content"> | |||
| <TextView | |||
| android:id="@+id/text_calcsight_params" | |||
| android:layout_width="match_parent" | |||
| android:layout_height="0dp" | |||
| android:layout_marginEnd="8dp" | |||
| android:layout_marginStart="8dp" | |||
| android:layout_marginTop="8dp" | |||
| android:textAlignment="viewStart" | |||
| android:textSize="20sp" | |||
| app:layout_constraintEnd_toEndOf="parent" | |||
| app:layout_constraintHorizontal_bias="1.0" | |||
| app:layout_constraintStart_toStartOf="parent" | |||
| app:layout_constraintTop_toTopOf="parent" /> | |||
| <TextView | |||
| android:id="@+id/bowAndArrowParams" | |||
| 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="8dp" | |||
| android:background="@color/purple_700" | |||
| android:padding="4dp" | |||
| android:text="@string/titleBowAndArrowParams" | |||
| 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_toBottomOf="@+id/text_calcsight_params" /> | |||
| <TextView | |||
| android:id="@+id/atmosphericalParams" | |||
| 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/titleAtmosphericalParams" | |||
| 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_toBottomOf="@+id/bowParamsFlow" /> | |||
| <androidx.constraintlayout.helper.widget.Flow | |||
| android:id="@+id/bowParamsFlow" | |||
| 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="hNALayout,nockRaisingLayout,braceHeightLayout" | |||
| app:flow_wrapMode="aligned" | |||
| app:layout_constraintEnd_toEndOf="parent" | |||
| app:layout_constraintStart_toStartOf="parent" | |||
| app:layout_constraintTop_toBottomOf="@+id/arrowV0Layout" /> | |||
| <com.google.android.material.textfield.TextInputLayout | |||
| android:id="@+id/arrowDiameterLayout" | |||
| style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox" | |||
| 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/bowAndArrowParams"> | |||
| <com.google.android.material.textfield.TextInputEditText | |||
| android:id="@+id/arrowDiameterTxt" | |||
| android:layout_width="match_parent" | |||
| android:layout_height="wrap_content" | |||
| android:hint="@string/arrowDiameterLbl" | |||
| android:singleLine="true" /> | |||
| </com.google.android.material.textfield.TextInputLayout> | |||
| <com.google.android.material.textfield.TextInputLayout | |||
| android:id="@+id/arrowCwLayout" | |||
| style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox" | |||
| 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/arrowDiameterLayout"> | |||
| <com.google.android.material.textfield.TextInputEditText | |||
| android:id="@+id/arrowCwTxt" | |||
| android:layout_width="match_parent" | |||
| android:layout_height="wrap_content" | |||
| android:hint="@string/arrowCwLbl" | |||
| android:singleLine="true" /> | |||
| </com.google.android.material.textfield.TextInputLayout> | |||
| <com.google.android.material.textfield.TextInputLayout | |||
| android:id="@+id/arrowWeightLayout" | |||
| style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox" | |||
| 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/arrowCwLayout"> | |||
| <com.google.android.material.textfield.TextInputEditText | |||
| android:id="@+id/arrowWeightTxt" | |||
| android:layout_width="match_parent" | |||
| android:layout_height="wrap_content" | |||
| android:hint="@string/arrowWeightLbl" | |||
| android:singleLine="true" /> | |||
| </com.google.android.material.textfield.TextInputLayout> | |||
| <com.google.android.material.textfield.TextInputLayout | |||
| android:id="@+id/bowPulloutLayout" | |||
| style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox" | |||
| 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/arrowWeightLayout"> | |||
| <com.google.android.material.textfield.TextInputEditText | |||
| android:id="@+id/bowPulloutTxt" | |||
| android:layout_width="match_parent" | |||
| android:layout_height="wrap_content" | |||
| android:hint="@string/bowPulloutLbl" | |||
| android:singleLine="true" /> | |||
| </com.google.android.material.textfield.TextInputLayout> | |||
| <com.google.android.material.textfield.TextInputLayout | |||
| android:id="@+id/arrowV0Layout" | |||
| style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox" | |||
| 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/bowPulloutLayout"> | |||
| <com.google.android.material.textfield.TextInputEditText | |||
| android:id="@+id/arrowV0Txt" | |||
| android:layout_width="match_parent" | |||
| android:layout_height="wrap_content" | |||
| android:hint="@string/arrowV0Lbl" | |||
| android:singleLine="true" /> | |||
| </com.google.android.material.textfield.TextInputLayout> | |||
| <com.google.android.material.textfield.TextInputLayout | |||
| android:id="@+id/hNALayout" | |||
| style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox" | |||
| android:layout_width="0dp" | |||
| android:layout_height="wrap_content" | |||
| android:paddingRight="4dp" | |||
| tools:layout_editor_absoluteX="61dp" | |||
| tools:layout_editor_absoluteY="435dp"> | |||
| <com.google.android.material.textfield.TextInputEditText | |||
| android:id="@+id/hNATxt" | |||
| android:layout_width="match_parent" | |||
| android:layout_height="wrap_content" | |||
| android:hint="@string/bowParamhNALbl" | |||
| android:nextFocusDown="@id/nockRaisingTxt" | |||
| android:singleLine="true" /> | |||
| </com.google.android.material.textfield.TextInputLayout> | |||
| <com.google.android.material.textfield.TextInputLayout | |||
| android:id="@+id/nockRaisingLayout" | |||
| style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox" | |||
| android:layout_width="0dp" | |||
| android:layout_height="wrap_content" | |||
| android:paddingHorizontal="4dp" | |||
| tools:layout_editor_absoluteX="140dp" | |||
| tools:layout_editor_absoluteY="435dp"> | |||
| <com.google.android.material.textfield.TextInputEditText | |||
| android:id="@+id/nockRaisingTxt" | |||
| android:layout_width="match_parent" | |||
| android:layout_height="wrap_content" | |||
| android:hint="@string/bowParamNockRaisingLbl" | |||
| android:nextFocusDown="@id/braceHeightTxt" | |||
| android:singleLine="true" /> | |||
| </com.google.android.material.textfield.TextInputLayout> | |||
| <com.google.android.material.textfield.TextInputLayout | |||
| android:id="@+id/braceHeightLayout" | |||
| style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox" | |||
| android:layout_width="0dp" | |||
| android:layout_height="wrap_content" | |||
| android:paddingLeft="4dp" | |||
| tools:layout_editor_absoluteX="355dp" | |||
| tools:layout_editor_absoluteY="435dp"> | |||
| <com.google.android.material.textfield.TextInputEditText | |||
| android:id="@+id/braceHeightTxt" | |||
| android:layout_width="match_parent" | |||
| android:layout_height="wrap_content" | |||
| android:hint="@string/bowParamBraceHeightLbl" | |||
| android:nextFocusDown="@id/airTemperatureTxt" | |||
| android:singleLine="true" /> | |||
| </com.google.android.material.textfield.TextInputLayout> | |||
| <com.google.android.material.textfield.TextInputLayout | |||
| android:id="@+id/airTemperatureLayout" | |||
| style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox" | |||
| 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/atmosphericalParams"> | |||
| <com.google.android.material.textfield.TextInputEditText | |||
| android:id="@+id/airTemperatureTxt" | |||
| android:layout_width="match_parent" | |||
| android:layout_height="wrap_content" | |||
| android:hint="@string/airTemperatureLbl" | |||
| android:singleLine="true" /> | |||
| </com.google.android.material.textfield.TextInputLayout> | |||
| <com.google.android.material.textfield.TextInputLayout | |||
| android:id="@+id/airRelativeHumidityLayout" | |||
| style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox" | |||
| 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/airTemperatureLayout"> | |||
| <com.google.android.material.textfield.TextInputEditText | |||
| android:id="@+id/airRelativeHumidityTxt" | |||
| android:layout_width="match_parent" | |||
| android:layout_height="wrap_content" | |||
| android:hint="@string/airRelativeHumidityLbl" | |||
| android:singleLine="true" /> | |||
| </com.google.android.material.textfield.TextInputLayout> | |||
| <TextView | |||
| android:id="@+id/shootingParams" | |||
| 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/titleShootingParams" | |||
| 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_toBottomOf="@+id/airRelativeHumidityLayout" /> | |||
| <com.google.android.material.textfield.TextInputLayout | |||
| android:id="@+id/shootingDistanzLayout" | |||
| style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox" | |||
| 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/shootingParams"> | |||
| <com.google.android.material.textfield.TextInputEditText | |||
| android:id="@+id/shootingDistanzTxt" | |||
| android:layout_width="match_parent" | |||
| android:layout_height="wrap_content" | |||
| android:hint="@string/shootingDistanzLbl" | |||
| android:singleLine="true" /> | |||
| </com.google.android.material.textfield.TextInputLayout> | |||
| <com.google.android.material.textfield.TextInputLayout | |||
| android:id="@+id/arrowNockHeightLayout" | |||
| style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox" | |||
| 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/shootingDistanzLayout"> | |||
| <com.google.android.material.textfield.TextInputEditText | |||
| android:id="@+id/arrowNockHeightTxt" | |||
| android:layout_width="match_parent" | |||
| android:layout_height="wrap_content" | |||
| android:hint="@string/arrowNockHeightLbl" | |||
| android:singleLine="true" /> | |||
| </com.google.android.material.textfield.TextInputLayout> | |||
| <com.google.android.material.textfield.TextInputLayout | |||
| android:id="@+id/targetCenterHeightLayout" | |||
| style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox" | |||
| 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/arrowNockHeightLayout"> | |||
| <com.google.android.material.textfield.TextInputEditText | |||
| android:id="@+id/targetCenterHeightTxt" | |||
| android:layout_width="match_parent" | |||
| android:layout_height="wrap_content" | |||
| android:hint="@string/targetCenterHeightLbl" | |||
| android:singleLine="true" /> | |||
| </com.google.android.material.textfield.TextInputLayout> | |||
| <TextView | |||
| android:id="@+id/calculationParams" | |||
| 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/titleCalculationParams" | |||
| 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_toBottomOf="@+id/targetCenterHeightLayout" /> | |||
| <com.google.android.material.textfield.TextInputLayout | |||
| style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.ExposedDropdownMenu" | |||
| android:id="@+id/deltaTimeLayout" | |||
| 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/calculationParams"> | |||
| <AutoCompleteTextView | |||
| android:id="@+id/deltaTimeTxt" | |||
| android:layout_width="match_parent" | |||
| android:layout_height="wrap_content" | |||
| android:hint="@string/deltaTimeLbl" | |||
| android:nextFocusDown="@id/calcPrecisionTxt" | |||
| android:nextFocusForward="@id/calcPrecisionTxt" | |||
| android:nextFocusRight="@id/calcPrecisionTxt" | |||
| android:singleLine="true" /> | |||
| </com.google.android.material.textfield.TextInputLayout> | |||
| <com.google.android.material.textfield.TextInputLayout | |||
| android:id="@+id/calcPrecisionLayout" | |||
| style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.ExposedDropdownMenu" | |||
| android:layout_width="0dp" | |||
| android:layout_height="wrap_content" | |||
| android:layout_marginBottom="8dp" | |||
| android:layout_marginEnd="8dp" | |||
| android:layout_marginStart="8dp" | |||
| android:layout_marginTop="8dp" | |||
| app:layout_constraintBottom_toBottomOf="parent" | |||
| app:layout_constraintEnd_toEndOf="parent" | |||
| app:layout_constraintStart_toStartOf="parent" | |||
| app:layout_constraintTop_toBottomOf="@+id/deltaTimeLayout"> | |||
| <AutoCompleteTextView | |||
| android:id="@+id/calcPrecisionTxt" | |||
| android:layout_width="match_parent" | |||
| android:layout_height="wrap_content" | |||
| android:hint="@string/calcPrecisionLbl" | |||
| android:nextFocusDown="@id/arrowDiameterTxt" | |||
| android:nextFocusForward="@id/arrowDiameterTxt" | |||
| android:nextFocusRight="@id/arrowDiameterTxt" | |||
| android:singleLine="true" /> | |||
| </com.google.android.material.textfield.TextInputLayout> | |||
| </androidx.constraintlayout.widget.ConstraintLayout> | |||
| </ScrollView> | |||
| </androidx.constraintlayout.widget.ConstraintLayout> | |||
| @@ -0,0 +1,32 @@ | |||
| <?xml version="1.0" encoding="utf-8"?> | |||
| <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" | |||
| xmlns:app="http://schemas.android.com/apk/res-auto" | |||
| xmlns:tools="http://schemas.android.com/tools" | |||
| android:layout_width="match_parent" | |||
| android:layout_height="match_parent" | |||
| tools:context=".ui.calcsight.CalculateSightParametersFragment"> | |||
| <TextView | |||
| android:id="@+id/text_calcsight_sightsetting" | |||
| android:layout_width="match_parent" | |||
| android:layout_height="0dp" | |||
| android:layout_marginEnd="8dp" | |||
| android:layout_marginStart="8dp" | |||
| android:layout_marginTop="8dp" | |||
| android:textAlignment="center" | |||
| android:textSize="20sp" | |||
| app:layout_constraintEnd_toEndOf="parent" | |||
| app:layout_constraintStart_toStartOf="parent" | |||
| app:layout_constraintTop_toTopOf="parent" /> | |||
| <com.google.android.material.textfield.TextInputLayout | |||
| style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox" | |||
| android:layout_width="0dp" | |||
| android:layout_height="wrap_content" | |||
| android:layout_marginEnd="8dp" | |||
| android:layout_marginStart="8dp" | |||
| app:layout_constraintEnd_toEndOf="parent" | |||
| app:layout_constraintStart_toStartOf="parent" | |||
| app:layout_constraintTop_toBottomOf="@+id/text_calcsight_sightsetting" /> | |||
| </androidx.constraintlayout.widget.ConstraintLayout> | |||
| @@ -4,19 +4,29 @@ | |||
| xmlns:tools="http://schemas.android.com/tools" | |||
| android:layout_width="match_parent" | |||
| android:layout_height="match_parent" | |||
| tools:context=".ui.equipment.AddEquipmentFragment"> | |||
| tools:context=".ui.calcsight.CalculateSightParametersFragment"> | |||
| <TextView | |||
| android:id="@+id/text_equipment" | |||
| android:id="@+id/text_calcsight_trajectory" | |||
| android:layout_width="match_parent" | |||
| android:layout_height="wrap_content" | |||
| 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_constraintStart_toStartOf="parent" | |||
| app:layout_constraintTop_toTopOf="parent" /> | |||
| <com.google.android.material.textfield.TextInputLayout | |||
| style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox" | |||
| android:layout_width="0dp" | |||
| android:layout_height="wrap_content" | |||
| android:layout_marginEnd="8dp" | |||
| android:layout_marginStart="8dp" | |||
| app:layout_constraintEnd_toEndOf="parent" | |||
| app:layout_constraintStart_toStartOf="parent" | |||
| app:layout_constraintTop_toBottomOf="@+id/text_calcsight_trajectory" /> | |||
| </androidx.constraintlayout.widget.ConstraintLayout> | |||
| @@ -0,0 +1,328 @@ | |||
| <?xml version="1.0" encoding="utf-8"?> | |||
| <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" | |||
| xmlns:app="http://schemas.android.com/apk/res-auto" | |||
| xmlns:tools="http://schemas.android.com/tools" | |||
| android:layout_width="match_parent" | |||
| android:layout_height="match_parent" | |||
| tools:context=".ui.equipment.AddEquipmentFragment"> | |||
| <androidx.constraintlayout.widget.ConstraintLayout | |||
| android:id="@+id/constraintLayout" | |||
| android:layout_width="match_parent" | |||
| android:layout_height="126dp" | |||
| android:layout_marginTop="8dp" | |||
| app:layout_constraintTop_toTopOf="parent"> | |||
| <androidx.cardview.widget.CardView | |||
| android:id="@+id/card_view_riser_border" | |||
| android:layout_width="match_parent" | |||
| android:layout_height="match_parent" | |||
| android:layout_marginBottom="8dp" | |||
| android:layout_marginEnd="8dp" | |||
| android:layout_marginStart="8dp" | |||
| android:layout_marginTop="8dp" | |||
| android:backgroundTint="@color/black" | |||
| app:cardCornerRadius="8dp" | |||
| app:cardElevation="10dp" | |||
| app:layout_constraintBottom_toBottomOf="parent" | |||
| app:layout_constraintEnd_toEndOf="parent" | |||
| app:layout_constraintStart_toStartOf="parent" | |||
| app:layout_constraintTop_toTopOf="parent"> | |||
| <androidx.constraintlayout.widget.ConstraintLayout | |||
| android:layout_width="match_parent" | |||
| android:layout_height="match_parent"> | |||
| <androidx.cardview.widget.CardView | |||
| android:id="@+id/card_view_riser_setup" | |||
| android:layout_width="fill_parent" | |||
| android:layout_height="fill_parent" | |||
| android:layout_marginBottom="2dp" | |||
| android:layout_marginEnd="2dp" | |||
| android:layout_marginStart="2dp" | |||
| android:layout_marginTop="2dp" | |||
| app:cardCornerRadius="6dp" | |||
| app:cardElevation="0dp" | |||
| app:layout_constraintBottom_toBottomOf="parent" | |||
| app:layout_constraintEnd_toEndOf="parent" | |||
| app:layout_constraintStart_toStartOf="parent" | |||
| app:layout_constraintTop_toTopOf="parent"> | |||
| <androidx.constraintlayout.widget.ConstraintLayout | |||
| android:layout_width="match_parent" | |||
| android:layout_height="match_parent"> | |||
| <TextView | |||
| android:id="@+id/new_riser" | |||
| android:layout_width="wrap_content" | |||
| android:layout_height="wrap_content" | |||
| android:layout_margin="@dimen/text_margin" | |||
| android:layout_marginStart="16dp" | |||
| android:layout_marginTop="20dp" | |||
| android:text="@string/caption_MainCfg_Riser_MainText" | |||
| android:textAppearance="@style/TextAppearance.AppCompat.Large" | |||
| app:layout_constraintStart_toEndOf="@+id/riser_image_view" | |||
| app:layout_constraintTop_toTopOf="parent" /> | |||
| <TextView | |||
| android:id="@+id/new_riser_desc" | |||
| android:layout_width="0dp" | |||
| android:layout_height="wrap_content" | |||
| android:layout_marginEnd="16dp" | |||
| android:layout_marginStart="16dp" | |||
| android:text="@string/caption_MainCfg_Riser_SubText" | |||
| android:textAppearance="@style/TextAppearance.AppCompat.Medium" | |||
| android:textSize="14sp" | |||
| app:layout_constraintBottom_toBottomOf="@+id/riser_image_view" | |||
| app:layout_constraintEnd_toEndOf="parent" | |||
| app:layout_constraintStart_toEndOf="@+id/riser_image_view" /> | |||
| <androidx.cardview.widget.CardView | |||
| android:id="@+id/riser_image_view" | |||
| android:layout_width="wrap_content" | |||
| android:layout_height="wrap_content" | |||
| android:layout_marginBottom="20dp" | |||
| android:layout_marginStart="20dp" | |||
| android:layout_marginTop="20dp" | |||
| android:contentDescription="@string/menu_equipment" | |||
| app:cardCornerRadius="8dp" | |||
| app:cardElevation="0dp" | |||
| app:layout_constraintBottom_toBottomOf="parent" | |||
| app:layout_constraintStart_toStartOf="parent" | |||
| app:layout_constraintTop_toTopOf="parent"> | |||
| <ImageView | |||
| android:id="@+id/riser_image" | |||
| android:layout_width="64dp" | |||
| android:layout_height="64dp" | |||
| android:contentDescription="@string/menu_equipment" | |||
| app:layout_constraintStart_toStartOf="parent" | |||
| app:layout_constraintTop_toTopOf="parent" | |||
| app:srcCompat="@drawable/ic_cfg_riser" /> | |||
| </androidx.cardview.widget.CardView> | |||
| </androidx.constraintlayout.widget.ConstraintLayout> | |||
| </androidx.cardview.widget.CardView> | |||
| </androidx.constraintlayout.widget.ConstraintLayout> | |||
| </androidx.cardview.widget.CardView> | |||
| </androidx.constraintlayout.widget.ConstraintLayout> | |||
| <androidx.constraintlayout.widget.ConstraintLayout | |||
| android:id="@+id/constraintLayout2" | |||
| android:layout_width="match_parent" | |||
| android:layout_height="126dp" | |||
| app:layout_constraintTop_toBottomOf="@+id/constraintLayout"> | |||
| <androidx.cardview.widget.CardView | |||
| android:id="@+id/card_view_sight_border" | |||
| android:layout_width="match_parent" | |||
| android:layout_height="match_parent" | |||
| android:layout_marginBottom="8dp" | |||
| android:layout_marginEnd="8dp" | |||
| android:layout_marginStart="8dp" | |||
| android:layout_marginTop="8dp" | |||
| android:backgroundTint="@color/black" | |||
| app:cardCornerRadius="8dp" | |||
| app:cardElevation="10dp" | |||
| app:layout_constraintBottom_toBottomOf="parent" | |||
| app:layout_constraintEnd_toEndOf="parent" | |||
| app:layout_constraintStart_toStartOf="parent" | |||
| app:layout_constraintTop_toTopOf="parent"> | |||
| <androidx.constraintlayout.widget.ConstraintLayout | |||
| android:layout_width="match_parent" | |||
| android:layout_height="match_parent"> | |||
| <androidx.cardview.widget.CardView | |||
| android:id="@+id/card_view_sight_setup" | |||
| android:layout_width="fill_parent" | |||
| android:layout_height="fill_parent" | |||
| android:layout_marginBottom="2dp" | |||
| android:layout_marginEnd="2dp" | |||
| android:layout_marginStart="2dp" | |||
| android:layout_marginTop="2dp" | |||
| app:cardCornerRadius="6dp" | |||
| app:cardElevation="0dp" | |||
| app:layout_constraintBottom_toBottomOf="parent" | |||
| app:layout_constraintEnd_toEndOf="parent" | |||
| app:layout_constraintStart_toStartOf="parent" | |||
| app:layout_constraintTop_toTopOf="parent"> | |||
| <androidx.constraintlayout.widget.ConstraintLayout | |||
| android:layout_width="match_parent" | |||
| android:layout_height="match_parent"> | |||
| <TextView | |||
| android:id="@+id/new_sight" | |||
| android:layout_width="wrap_content" | |||
| android:layout_height="wrap_content" | |||
| android:layout_margin="@dimen/text_margin" | |||
| android:layout_marginTop="20dp" | |||
| android:text="@string/caption_MainCfg_Sight_MainText" | |||
| android:textAppearance="@style/TextAppearance.AppCompat.Large" | |||
| app:layout_constraintStart_toEndOf="@+id/sight_image_view" | |||
| app:layout_constraintTop_toTopOf="parent" /> | |||
| <TextView | |||
| android:id="@+id/new_sight_desc" | |||
| android:layout_width="0dp" | |||
| android:layout_height="wrap_content" | |||
| android:layout_marginEnd="16dp" | |||
| android:layout_marginStart="16dp" | |||
| android:text="@string/caption_MainCfg_Sight_SubText" | |||
| android:textAppearance="@style/TextAppearance.AppCompat.Medium" | |||
| android:textSize="14sp" | |||
| app:layout_constraintBottom_toBottomOf="@+id/sight_image_view" | |||
| app:layout_constraintEnd_toEndOf="parent" | |||
| app:layout_constraintStart_toEndOf="@+id/sight_image_view" /> | |||
| <androidx.cardview.widget.CardView | |||
| android:id="@+id/sight_image_view" | |||
| android:layout_width="wrap_content" | |||
| android:layout_height="wrap_content" | |||
| android:layout_marginBottom="20dp" | |||
| android:layout_marginStart="20dp" | |||
| android:layout_marginTop="20dp" | |||
| android:contentDescription="@string/menu_equipment" | |||
| app:cardCornerRadius="8dp" | |||
| app:cardElevation="0dp" | |||
| app:layout_constraintBottom_toBottomOf="parent" | |||
| app:layout_constraintStart_toStartOf="parent" | |||
| app:layout_constraintTop_toTopOf="parent"> | |||
| <ImageView | |||
| android:id="@+id/sight_image" | |||
| android:layout_width="64dp" | |||
| android:layout_height="64dp" | |||
| android:contentDescription="@string/menu_equipment" | |||
| app:layout_constraintStart_toStartOf="parent" | |||
| app:layout_constraintTop_toTopOf="parent" | |||
| app:srcCompat="@drawable/ic_menu_calcsight" /> | |||
| </androidx.cardview.widget.CardView> | |||
| </androidx.constraintlayout.widget.ConstraintLayout> | |||
| </androidx.cardview.widget.CardView> | |||
| </androidx.constraintlayout.widget.ConstraintLayout> | |||
| </androidx.cardview.widget.CardView> | |||
| </androidx.constraintlayout.widget.ConstraintLayout> | |||
| <androidx.constraintlayout.widget.ConstraintLayout | |||
| android:id="@+id/constraintLayout3" | |||
| android:layout_width="match_parent" | |||
| android:layout_height="126dp" | |||
| app:layout_constraintTop_toBottomOf="@+id/constraintLayout2"> | |||
| <androidx.cardview.widget.CardView | |||
| android:id="@+id/card_view_equipment_border" | |||
| android:layout_width="match_parent" | |||
| android:layout_height="match_parent" | |||
| android:layout_marginBottom="8dp" | |||
| android:layout_marginEnd="8dp" | |||
| android:layout_marginStart="8dp" | |||
| android:layout_marginTop="8dp" | |||
| android:backgroundTint="@color/black" | |||
| app:cardCornerRadius="8dp" | |||
| app:cardElevation="10dp" | |||
| app:layout_constraintBottom_toBottomOf="parent" | |||
| app:layout_constraintEnd_toEndOf="parent" | |||
| app:layout_constraintStart_toStartOf="parent" | |||
| app:layout_constraintTop_toTopOf="parent"> | |||
| <androidx.constraintlayout.widget.ConstraintLayout | |||
| android:layout_width="match_parent" | |||
| android:layout_height="match_parent"> | |||
| <androidx.cardview.widget.CardView | |||
| android:id="@+id/card_view_equipment_setup" | |||
| android:layout_width="fill_parent" | |||
| android:layout_height="fill_parent" | |||
| android:layout_marginBottom="2dp" | |||
| android:layout_marginEnd="2dp" | |||
| android:layout_marginStart="2dp" | |||
| android:layout_marginTop="2dp" | |||
| app:cardCornerRadius="6dp" | |||
| app:cardElevation="0dp" | |||
| app:layout_constraintBottom_toBottomOf="parent" | |||
| app:layout_constraintEnd_toEndOf="parent" | |||
| app:layout_constraintStart_toStartOf="parent" | |||
| app:layout_constraintTop_toTopOf="parent"> | |||
| <androidx.constraintlayout.widget.ConstraintLayout | |||
| android:layout_width="match_parent" | |||
| android:layout_height="match_parent"> | |||
| <TextView | |||
| android:id="@+id/new_equipment" | |||
| android:layout_width="wrap_content" | |||
| android:layout_height="wrap_content" | |||
| android:layout_margin="@dimen/text_margin" | |||
| android:layout_marginTop="20dp" | |||
| android:text="@string/caption_MainCfg_ArcerySetup_MainText" | |||
| android:textAppearance="@style/TextAppearance.AppCompat.Large" | |||
| app:layout_constraintStart_toEndOf="@+id/equipment_image_view" | |||
| app:layout_constraintTop_toTopOf="parent" /> | |||
| <TextView | |||
| android:id="@+id/new_equipment_desc" | |||
| android:layout_width="0dp" | |||
| android:layout_height="wrap_content" | |||
| android:layout_marginEnd="16dp" | |||
| android:layout_marginStart="16dp" | |||
| android:text="@string/caption_MainCfg_ArcerySetup_SubText" | |||
| android:textAppearance="@style/TextAppearance.AppCompat.Medium" | |||
| android:textSize="14sp" | |||
| app:layout_constraintBottom_toBottomOf="@+id/equipment_image_view" | |||
| app:layout_constraintEnd_toEndOf="parent" | |||
| app:layout_constraintStart_toEndOf="@+id/equipment_image_view" /> | |||
| <androidx.cardview.widget.CardView | |||
| android:id="@+id/equipment_image_view" | |||
| android:layout_width="wrap_content" | |||
| android:layout_height="wrap_content" | |||
| android:layout_marginBottom="20dp" | |||
| android:layout_marginStart="20dp" | |||
| android:layout_marginTop="20dp" | |||
| android:contentDescription="@string/menu_equipment" | |||
| app:cardCornerRadius="8dp" | |||
| app:cardElevation="0dp" | |||
| app:layout_constraintBottom_toBottomOf="parent" | |||
| app:layout_constraintStart_toStartOf="parent" | |||
| app:layout_constraintTop_toTopOf="parent"> | |||
| <ImageView | |||
| android:id="@+id/equipment_image" | |||
| android:layout_width="64dp" | |||
| android:layout_height="64dp" | |||
| android:contentDescription="@string/menu_equipment" | |||
| app:layout_constraintStart_toStartOf="parent" | |||
| app:layout_constraintTop_toTopOf="parent" | |||
| app:srcCompat="@drawable/ic_menu_equipment" /> | |||
| </androidx.cardview.widget.CardView> | |||
| </androidx.constraintlayout.widget.ConstraintLayout> | |||
| </androidx.cardview.widget.CardView> | |||
| </androidx.constraintlayout.widget.ConstraintLayout> | |||
| </androidx.cardview.widget.CardView> | |||
| </androidx.constraintlayout.widget.ConstraintLayout> | |||
| <TextView | |||
| android:id="@+id/text_equipment" | |||
| android:layout_width="match_parent" | |||
| android:layout_height="wrap_content" | |||
| android:layout_marginEnd="8dp" | |||
| android:layout_marginStart="8dp" | |||
| android:textAlignment="center" | |||
| android:textSize="20sp" | |||
| app:layout_constraintEnd_toEndOf="parent" | |||
| app:layout_constraintStart_toStartOf="parent" | |||
| app:layout_constraintTop_toBottomOf="@+id/constraintLayout3" /> | |||
| </androidx.constraintlayout.widget.ConstraintLayout> | |||
| @@ -9,5 +9,5 @@ | |||
| android:layout_marginLeft="16dp" | |||
| android:layout_marginRight="16dp" | |||
| app:layoutManager="LinearLayoutManager" | |||
| tools:context=".ui.equipment.EquipmentFragment" | |||
| tools:context=".ui.equipment.ChooseEquipmentFragment" | |||
| tools:listitem="@layout/fragment_equipment_choose" /> | |||
| @@ -13,7 +13,7 @@ | |||
| <fragment | |||
| android:id="@+id/nav_equipment_choose" | |||
| android:name="ch.spherIC.recurvebowsight.ui.equipment.EquipmentFragment" | |||
| android:name="ch.spherIC.recurvebowsight.ui.equipment.ChooseEquipmentFragment" | |||
| android:label="@string/menu_equipment_choose" | |||
| tools:layout="@layout/fragment_equipment_choose" /> | |||
| @@ -21,7 +21,7 @@ | |||
| android:id="@+id/nav_equipment_add" | |||
| android:name="ch.spherIC.recurvebowsight.ui.equipment.AddEquipmentFragment" | |||
| android:label="@string/menu_equipment_add" | |||
| tools:layout="@layout/fragment_equipment_add" /> | |||
| tools:layout="@layout/fragment_equipment_add_list" /> | |||
| <fragment | |||
| android:id="@+id/nav_userguide" | |||
| @@ -20,4 +20,35 @@ | |||
| <string name="viewParams">Parameter</string> | |||
| <string name="viewResults">Bl. Flugbahn</string> | |||
| <string name="viewSight">Visiereinst.</string> | |||
| <string name="titleBowAndArrowParams">Bogen- und Pfeilparameter</string> | |||
| <string name="arrowDiameterLbl">Durchmesser Pfeilschaft [mm]</string> | |||
| <string name="arrowCwLbl">Cw-Wert Pfeil</string> | |||
| <string name="arrowV0Lbl">Pfeilanfangsgeschw. V0 [m/s]</string> | |||
| <string name="bowPulloutLbl">Auszug Bogen [cm]</string> | |||
| <string name="arrowWeightLbl">Gewicht Pfeil [g]</string> | |||
| <string name="bowParamhNALbl">hNA</string> | |||
| <string name="bowParamNockRaisingLbl">Überh. Nockpkt.</string> | |||
| <string name="bowParamBraceHeightLbl">Standhöhe [mm]</string> | |||
| <string name="titleAtmosphericalParams">Atmosphärische Parameter</string> | |||
| <string name="airTemperatureLbl">Lufttemperatur [°Celsius]</string> | |||
| <string name="airRelativeHumidityLbl">Rel. Luftfeuchtigkeit [%]</string> | |||
| <string name="titleShootingParams">Schussparameter</string> | |||
| <string name="shootingDistanzLbl">Schussdistanz [m]</string> | |||
| <string name="arrowNockHeightLbl">Höhe Pfeilnocke [m]</string> | |||
| <string name="targetCenterHeightLbl">Höhe Scheibenzentrum [m]</string> | |||
| <!-- --> | |||
| <string name="titleCalculationParams">Berechnungsparameter</string> | |||
| <string name="deltaTimeLbl">Zeitintervall Berechnung [sec]</string> | |||
| <string name="calcPrecisionLbl">Berechnungsgenauigkeit [%]</string> | |||
| <string name="caption_MainCfg_Riser_MainText">Griffstück</string> | |||
| <string name="caption_MainCfg_Riser_SubText">Hier klicken um ein Griffstück zu Editieren, zu Löschen oder Einzufügen</string> | |||
| <string name="caption_MainCfg_Sight_MainText">Visier</string> | |||
| <string name="caption_MainCfg_Sight_SubText">Hier klicken um ein Visier zu Editieren, zu Löschen oder Einzufügen</string> | |||
| <string name="caption_MainCfg_ArcerySetup_MainText">Ausrüstung</string> | |||
| <string name="caption_MainCfg_ArcerySetup_SubText">Hier klicken um eine Ausrüstung zu Editieren, zu Löschen oder Einzufügen</string> | |||
| </resources> | |||
| @@ -4,7 +4,10 @@ | |||
| <dimen name="activity_vertical_margin">16dp</dimen> | |||
| <dimen name="activity_horizontal_margin_onclick">18dp</dimen> | |||
| <dimen name="activity_vertical_margin_onclick">18dp</dimen> | |||
| <dimen name="nav_header_horizontal_spacing">8dp</dimen> | |||
| <dimen name="nav_header_vertical_spacing">8dp</dimen> | |||
| <dimen name="nav_header_horizontal_spacing_onclick">10dp</dimen> | |||
| <dimen name="nav_header_vertical_spacing_onclick">10dp</dimen> | |||
| <dimen name="nav_header_height">176dp</dimen> | |||
| <dimen name="fab_margin">16dp</dimen> | |||
| <dimen name="text_margin">16dp</dimen> | |||
| @@ -0,0 +1,20 @@ | |||
| <?xml version="1.0" encoding="utf-8"?> | |||
| <resources> | |||
| <string-array name="CalculationTimeIntervals"> | |||
| <item>0.1</item> | |||
| <item>0.05</item> | |||
| <item>0.02</item> | |||
| <item>0.01</item> | |||
| <item>0.005</item> | |||
| <item>0.002</item> | |||
| <item>0.001</item> | |||
| </string-array> | |||
| <string-array name="CalculationAccuracies"> | |||
| <item>1.0</item> | |||
| <item>0.5</item> | |||
| <item>0.1</item> | |||
| </string-array> | |||
| </resources> | |||
| @@ -19,4 +19,36 @@ | |||
| <string name="viewParams">Parameters</string> | |||
| <string name="viewResults">Ball. Trajectory</string> | |||
| <string name="viewSight">Sight Setting</string> | |||
| <string name="titleBowAndArrowParams">Bow and Arrow Parameters</string> | |||
| <string name="arrowDiameterLbl">Arrow Diameter [mm]</string> | |||
| <string name="arrowCwLbl">Cd-Value of Arrow</string> | |||
| <string name="arrowV0Lbl">Arrow initial velocity V0 [m/s]</string> | |||
| <string name="bowPulloutLbl">Bow Pullout [cm]</string> | |||
| <string name="arrowWeightLbl">Arrow Weight [g]</string> | |||
| <string name="bowParamhNALbl">hNA</string> | |||
| <string name="bowParamNockRaisingLbl">Nock Raising</string> | |||
| <string name="bowParamBraceHeightLbl">Brace Height [mm]</string> | |||
| <string name="titleAtmosphericalParams">Atmospherical Parameters</string> | |||
| <string name="airTemperatureLbl">Air Temperatur [°Celsius]</string> | |||
| <string name="airRelativeHumidityLbl">Rel. Air Humidity [%]</string> | |||
| <string name="titleShootingParams">Shooting Parameters</string> | |||
| <string name="shootingDistanzLbl">Shooting Distanz [m]</string> | |||
| <string name="arrowNockHeightLbl">Height Arrow Nock [m]</string> | |||
| <string name="targetCenterHeightLbl">Height Target Center [m]</string> | |||
| <!-- --> | |||
| <string name="titleCalculationParams">Calculation Parameters</string> | |||
| <string name="deltaTimeLbl">Time Intervall Calculation [sec]</string> | |||
| <string name="calcPrecisionLbl">Calculation Accuracy [%]</string> | |||
| <string name="caption_UserguideParams" translatable="false"><b>1. %1$s\n2. %2$s\n3. %3$s\n4. %4$s\n5. %5$s\n6. %6$s\n7. %7$s\n\n%8$s</b>\n%9$s\n\n<b>%10$s</b>\n%11$s</string> | |||
| <string name="caption_MainCfg_Riser_MainText">Riser</string> | |||
| <string name="caption_MainCfg_Riser_SubText">Tab to edit, delete or insert a riser</string> | |||
| <string name="caption_MainCfg_Sight_MainText">Sight</string> | |||
| <string name="caption_MainCfg_Sight_SubText">Tab to edit, delete or insert a sight</string> | |||
| <string name="caption_MainCfg_ArcerySetup_MainText">Equipment</string> | |||
| <string name="caption_MainCfg_ArcerySetup_SubText">Tab to edit, delete or insert a equipment setup</string> | |||
| </resources> | |||