| @@ -40,7 +40,7 @@ | |||
| <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_about.xml" value="0.22" /> | |||
| <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.2" /> | |||
| <entry key="..\:/Work/Java Projects/Android/RecurveBowSight/V2/app/src/main/res/layout/fragment_calcsight_sightsetting.xml" value="0.22" /> | |||
| @@ -21,24 +21,18 @@ | |||
| </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/ui/configuration/DefaultSettingsActivity.java" afterDir="false" /> | |||
| <change afterPath="$PROJECT_DIR$/app/src/main/res/layout/activity_default_settings.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/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/AndroidManifest.xml" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/AndroidManifest.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/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/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/res/anim" beforeDir="true" /> | |||
| <change beforePath="$PROJECT_DIR$/app/src/main/res/anim/splashscreenicon.xml" beforeDir="false" /> | |||
| <change beforePath="$PROJECT_DIR$/app/src/main/res/menu/main.xml" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/res/menu/main.xml" afterDir="false" /> | |||
| <change beforePath="$PROJECT_DIR$/app/build.gradle" beforeDir="false" afterPath="$PROJECT_DIR$/app/build.gradle" 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/about/AboutViewModel.java" beforeDir="false" /> | |||
| <change beforePath="$PROJECT_DIR$/app/src/main/res/layout/fragment_about.xml" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/res/layout/fragment_about.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/strings.xml" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/res/values/strings.xml" afterDir="false" /> | |||
| </list> | |||
| @@ -10,7 +10,7 @@ android { | |||
| minSdk 28 | |||
| targetSdk 32 | |||
| versionCode 1 | |||
| versionName "1.0" | |||
| versionName "2.0.0" | |||
| testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" | |||
| } | |||
| @@ -1,14 +1,14 @@ | |||
| package ch.spherIC.recurvebowsight.ui.about; | |||
| import android.content.pm.PackageManager; | |||
| 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.R; | |||
| import ch.spherIC.recurvebowsight.databinding.FragmentAboutBinding; | |||
| public class AboutFragment extends Fragment { | |||
| @@ -16,12 +16,17 @@ public class AboutFragment extends Fragment { | |||
| private FragmentAboutBinding binding; | |||
| public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { | |||
| AboutViewModel galleryViewModel = new ViewModelProvider(this).get(AboutViewModel.class); | |||
| binding = FragmentAboutBinding.inflate(inflater, container, false); | |||
| View root = binding.getRoot(); | |||
| String versionName = ""; | |||
| this.binding = FragmentAboutBinding.inflate(inflater, container, false); | |||
| View root = this.binding.getRoot(); | |||
| try { | |||
| versionName = root.getContext().getPackageManager().getPackageInfo("ch.spherIC.recurvebowsight", PackageManager.GET_CONFIGURATIONS).versionName; | |||
| } catch (PackageManager.NameNotFoundException e) { | |||
| versionName = "-"; | |||
| } | |||
| this.binding.versionText.setText(getResources().getString(R.string.AppVersionLabel) + " " + versionName); | |||
| final TextView textView = binding.textGallery; | |||
| galleryViewModel.getText().observe(getViewLifecycleOwner(), textView::setText); | |||
| return root; | |||
| } | |||
| @@ -1,19 +0,0 @@ | |||
| package ch.spherIC.recurvebowsight.ui.about; | |||
| import androidx.lifecycle.LiveData; | |||
| import androidx.lifecycle.MutableLiveData; | |||
| import androidx.lifecycle.ViewModel; | |||
| public class AboutViewModel extends ViewModel { | |||
| private final MutableLiveData<String> mText; | |||
| public AboutViewModel() { | |||
| mText = new MutableLiveData<>(); | |||
| mText.setValue("This is the \"About\" fragment"); | |||
| } | |||
| public LiveData<String> getText() { | |||
| return mText; | |||
| } | |||
| } | |||
| @@ -6,17 +6,90 @@ | |||
| android:layout_height="match_parent" | |||
| tools:context=".ui.about.AboutFragment"> | |||
| <ImageView | |||
| android:id="@+id/imageView2" | |||
| android:layout_width="wrap_content" | |||
| android:layout_height="wrap_content" | |||
| android:layout_marginStart="24dp" | |||
| android:layout_marginTop="32dp" | |||
| android:src="@drawable/ic_launcher_foreground" | |||
| app:layout_constraintStart_toStartOf="parent" | |||
| app:layout_constraintTop_toTopOf="parent" /> | |||
| <TextView | |||
| android:id="@+id/about_Text" | |||
| android:layout_width="0dp" | |||
| android:layout_height="0dp" | |||
| android:layout_marginBottom="32dp" | |||
| android:layout_marginEnd="16dp" | |||
| android:layout_marginStart="16dp" | |||
| android:ems="10" | |||
| android:inputType="textMultiLine" | |||
| android:text="@string/about_Description" | |||
| android:textSize="16sp" | |||
| app:layout_constraintBottom_toBottomOf="@+id/imageView2" | |||
| app:layout_constraintEnd_toEndOf="parent" | |||
| app:layout_constraintStart_toEndOf="@+id/imageView2" | |||
| app:layout_constraintTop_toTopOf="@+id/imageView2" /> | |||
| <TextView | |||
| android:id="@+id/text_gallery" | |||
| android:layout_width="match_parent" | |||
| android:id="@+id/version_Text" | |||
| android:layout_width="wrap_content" | |||
| android:layout_height="wrap_content" | |||
| android:layout_marginEnd="8dp" | |||
| android:layout_marginStart="8dp" | |||
| android:layout_marginTop="8dp" | |||
| android:textAlignment="center" | |||
| android:textSize="20sp" | |||
| app:layout_constraintBottom_toBottomOf="parent" | |||
| android:ems="10" | |||
| android:text="@string/AppVersionLabel" | |||
| android:textSize="16sp" | |||
| android:textStyle="bold" | |||
| app:layout_constraintStart_toStartOf="@+id/about_Text" | |||
| app:layout_constraintTop_toBottomOf="@+id/about_Text" /> | |||
| <TextView | |||
| android:id="@+id/developedBy_Text" | |||
| android:layout_width="0dp" | |||
| android:layout_height="wrap_content" | |||
| android:layout_marginEnd="24dp" | |||
| android:layout_marginStart="24dp" | |||
| android:layout_marginTop="64dp" | |||
| android:ems="10" | |||
| android:inputType="textMultiLine" | |||
| android:text="@string/about_DevelopedBy" | |||
| android:textSize="16sp" | |||
| android:textStyle="normal" | |||
| app:layout_constraintEnd_toEndOf="parent" | |||
| app:layout_constraintStart_toStartOf="parent" | |||
| app:layout_constraintTop_toTopOf="parent" /> | |||
| app:layout_constraintTop_toBottomOf="@+id/version_Text" /> | |||
| <TextView | |||
| android:id="@+id/developedByMail_Text" | |||
| android:layout_width="0dp" | |||
| android:layout_height="wrap_content" | |||
| android:layout_marginEnd="24dp" | |||
| android:layout_marginStart="24dp" | |||
| android:layout_marginTop="8dp" | |||
| android:ems="10" | |||
| android:inputType="textMultiLine" | |||
| android:text="@string/about_DevelopedBy_Mail" | |||
| android:textSize="16sp" | |||
| android:textStyle="normal" | |||
| app:layout_constraintEnd_toEndOf="parent" | |||
| app:layout_constraintStart_toStartOf="parent" | |||
| app:layout_constraintTop_toBottomOf="@+id/developedBy_Text" /> | |||
| <TextView | |||
| android:id="@+id/developedByTranslated_Text" | |||
| android:layout_width="0dp" | |||
| android:layout_height="wrap_content" | |||
| android:layout_marginEnd="24dp" | |||
| android:layout_marginStart="24dp" | |||
| android:layout_marginTop="32dp" | |||
| android:ems="10" | |||
| android:inputType="textMultiLine" | |||
| android:text="@string/about_DevelopedBy_Translated" | |||
| android:textSize="16sp" | |||
| android:textStyle="normal" | |||
| app:layout_constraintEnd_toEndOf="parent" | |||
| app:layout_constraintStart_toStartOf="parent" | |||
| app:layout_constraintTop_toBottomOf="@+id/developedByMail_Text" /> | |||
| </androidx.constraintlayout.widget.ConstraintLayout> | |||
| @@ -6,7 +6,7 @@ | |||
| <string name="nav_header_title">RBS (Recurve Bow Sight)</string> | |||
| <string name="nav_header_subtitle">Entwickelt von spherIC (F.Smilari)</string> | |||
| <string name="nav_header_desc">Navigation header</string> | |||
| <string name="action_settings">Settings</string> | |||
| <string name="action_settings">Einstellungen</string> | |||
| <string name="title_activity_main_configuration">RBS Konfiguration Bogen/Visier/Ausrüstung</string> | |||
| <string name="title_activity_riser_configuration">RBS Konfiguration Griffstück</string> | |||
| <string name="title_activity_sight_configuration">RBS Konfiguration Visier</string> | |||
| @@ -115,5 +115,11 @@ | |||
| <string name="fcChart_TitleXAxis">Distanz [m]</string> | |||
| <string name="fcChart_TitleYAxis">Höhe [m]</string> | |||
| <string name="about_Description">RBS RecurveBowSight dient der Berechnung der vertikalen Einstellung des Visierpins eines Recurvebogen.</string> | |||
| <string name="AppVersionLabel">Version:</string> | |||
| <string name="about_DevelopedBy">Entwickelt von spherIC (F. Smilari)</string> | |||
| <string name="about_DevelopedBy_Mail">Mail an: merlin868@hotmail.com\</string> | |||
| <string name="about_DevelopedBy_Translated">Übersetzt von spherIC (F. Smilari)</string> | |||
| </resources> | |||
| @@ -115,4 +115,10 @@ | |||
| <string name="fcChart_TitleXAxis">Distance [m]</string> | |||
| <string name="fcChart_TitleYAxis">Height [m]</string> | |||
| <string name="about_Description">RBS RecurveBowSight allows you to calculate the sights vertical setting of a recurve bow according to several parameters</string> | |||
| <string name="AppVersionLabel">Version:</string> | |||
| <string name="about_DevelopedBy">Developed by spherIC (F. Smilari)</string> | |||
| <string name="about_DevelopedBy_Mail">Mail to: merlin868@hotmail.com\</string> | |||
| <string name="about_DevelopedBy_Translated">nTranslated by spherIC (F. Smilari)</string> | |||
| </resources> | |||