Show version in about, Update version, Fix links in about
This commit is contained in:
parent
de3fd5ba73
commit
edbc9420e1
4
app/.gitignore
vendored
4
app/.gitignore
vendored
@ -1 +1,3 @@
|
||||
/build
|
||||
/build
|
||||
/debug
|
||||
/release
|
@ -12,7 +12,7 @@ android {
|
||||
minSdk 21
|
||||
targetSdk 34
|
||||
versionCode 1
|
||||
versionName "1.0"
|
||||
versionName "1.0.0"
|
||||
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
|
@ -1,5 +1,7 @@
|
||||
package com.cringe_studios.code_guard.fragment;
|
||||
|
||||
import android.content.pm.PackageInfo;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
@ -24,6 +26,13 @@ public class AboutFragment extends NamedFragment {
|
||||
@Override
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||
binding = FragmentAboutBinding.inflate(inflater);
|
||||
try {
|
||||
PackageManager manager = requireContext().getPackageManager();
|
||||
PackageInfo info = null;
|
||||
info = manager.getPackageInfo(requireContext().getPackageName(), 0);
|
||||
String version = info.versionName;
|
||||
binding.appVersion.setText(version);
|
||||
} catch (PackageManager.NameNotFoundException ignored) {}
|
||||
return binding.getRoot();
|
||||
}
|
||||
}
|
||||
|
@ -91,6 +91,7 @@
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:textAlignment="center"
|
||||
android:autoLink="email"
|
||||
android:text="@string/mail_to" />
|
||||
|
||||
<View
|
||||
@ -113,14 +114,15 @@
|
||||
android:textSize="18sp"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/github"
|
||||
android:id="@+id/appcode_link"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:textAlignment="center"
|
||||
android:text="@string/github" />
|
||||
android:autoLink="web"
|
||||
android:text="@string/appcode_link" />
|
||||
|
||||
<View
|
||||
android:id="@+id/divider4"
|
||||
@ -149,6 +151,7 @@
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:textAlignment="center"
|
||||
android:autoLink="web"
|
||||
android:text="@string/changelog_link" />
|
||||
|
||||
<View
|
||||
@ -178,6 +181,7 @@
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:textAlignment="center"
|
||||
android:autoLink="web"
|
||||
android:text="@string/documentation_link" />
|
||||
|
||||
<View
|
||||
@ -265,6 +269,7 @@
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:textAlignment="center"
|
||||
android:autoLink="web"
|
||||
android:text="@string/patreon_link" />
|
||||
|
||||
<Space
|
||||
|
@ -117,8 +117,8 @@
|
||||
<string name="documentation">Documentation</string>
|
||||
<string name="app_license" translatable="false">GNU General Public License, version 3.0</string>
|
||||
<string name="mail_to">Mail: info@code-guard.com</string>
|
||||
<string name="github" translatable="false">https://git.cringe-studios.com/CringeStudios/Code-Guard</string>
|
||||
<string name="changelog_link" translatable="false">https://git.cringe-studios.com/CringeStudios/Code-Guard</string>
|
||||
<string name="appcode_link" translatable="false">https://git.cringe-studios.com/CringeStudios/Code-Guard</string>
|
||||
<string name="changelog_link" translatable="false">https://code-guard.com/#4</string>
|
||||
<string name="documentation_link" translatable="false">https://git.cringe-studios.com/CringeStudios/Code-Guard</string>
|
||||
<string name="patreon_link" translatable="false">https://git.cringe-studios.com/CringeStudios/Code-Guard</string>
|
||||
<string name="error_icon_pack_empty">The icon pack doesn\'t contain any icons</string>
|
||||
|
Loading…
Reference in New Issue
Block a user