mirror of
https://codeberg.org/comaps/comaps
synced 2026-01-08 13:27:57 +00:00
[android] Update About page
also update copyright.html to refer to comaps, and fix project name hardcoding in utils.java Signed-off-by: Harry Bond <me@hbond.xyz>
This commit is contained in:
committed by
Konstantin Pastbin
parent
5b4e6f73a1
commit
906507daa2
@@ -58,16 +58,17 @@ public class HelpFragment extends BaseMwmFragment implements View.OnClickListene
|
||||
setupItem(R.id.news, true, root);
|
||||
setupItem(R.id.web, true, root);
|
||||
setupItem(R.id.email, true, root);
|
||||
setupItem(R.id.github, true, root);
|
||||
setupItem(R.id.code_repo, false, root);
|
||||
setupItem(R.id.telegram, false, root);
|
||||
setupItem(R.id.instagram, false, root);
|
||||
setupItem(R.id.facebook, false, root);
|
||||
setupItem(R.id.twitter, true, root);
|
||||
//setupItem(R.id.twitter, true, root);
|
||||
setupItem(R.id.matrix, true, root);
|
||||
setupItem(R.id.mastodon, false, root);
|
||||
setupItem(R.id.openstreetmap, true, root);
|
||||
setupItem(R.id.faq, true, root);
|
||||
setupItem(R.id.report, isLandscape, root);
|
||||
setupItem(R.id.copyright, false, root);
|
||||
|
||||
final TextView supportUsView = root.findViewById(R.id.support_us);
|
||||
if (BuildConfig.FLAVOR.equals("google") && !TextUtils.isEmpty(mDonateUrl))
|
||||
@@ -91,11 +92,10 @@ public class HelpFragment extends BaseMwmFragment implements View.OnClickListene
|
||||
else
|
||||
setupItem(R.id.rate, true, root);
|
||||
|
||||
setupItem(R.id.copyright, false, root);
|
||||
View termOfUseView = root.findViewById(R.id.term_of_use_link);
|
||||
View privacyPolicyView = root.findViewById(R.id.privacy_policy);
|
||||
termOfUseView.setOnClickListener(v -> Utils.openUrl(requireActivity(), getResources().getString(R.string.translated_om_site_url) + "terms/"));
|
||||
privacyPolicyView.setOnClickListener(v -> Utils.openUrl(requireActivity(), getResources().getString(R.string.translated_om_site_url) + "privacy/"));
|
||||
termOfUseView.setOnClickListener(v -> Utils.openUrl(requireActivity(), getResources().getString(R.string.app_site_url) + "terms/"));
|
||||
privacyPolicyView.setOnClickListener(v -> Utils.openUrl(requireActivity(), getResources().getString(R.string.app_site_url) + "privacy/"));
|
||||
|
||||
shareLauncher = SharingUtils.RegisterLauncher(this);
|
||||
|
||||
@@ -109,21 +109,21 @@ public class HelpFragment extends BaseMwmFragment implements View.OnClickListene
|
||||
{
|
||||
final int id = v.getId();
|
||||
if (id == R.id.web)
|
||||
Utils.openUrl(requireActivity(), getResources().getString(R.string.translated_om_site_url));
|
||||
Utils.openUrl(requireActivity(), getResources().getString(R.string.app_site_url));
|
||||
else if (id == R.id.news)
|
||||
Utils.openUrl(requireActivity(), getResources().getString(R.string.translated_om_site_url) + "news/");
|
||||
Utils.openUrl(requireActivity(), getResources().getString(R.string.app_site_url) + "news/");
|
||||
else if (id == R.id.email)
|
||||
Utils.sendTo(requireContext(), BuildConfig.SUPPORT_MAIL, "Organic Maps");
|
||||
else if (id == R.id.github)
|
||||
Utils.openUrl(requireActivity(), Constants.Url.GITHUB);
|
||||
Utils.sendTo(requireContext(), BuildConfig.SUPPORT_MAIL, getString(R.string.project_name));
|
||||
else if (id == R.id.code_repo)
|
||||
Utils.openUrl(requireActivity(), Constants.Url.CODE_REPO);
|
||||
else if (id == R.id.telegram)
|
||||
Utils.openUrl(requireActivity(), getString(R.string.telegram_url));
|
||||
else if (id == R.id.instagram)
|
||||
Utils.openUrl(requireActivity(), getString(R.string.instagram_url));
|
||||
else if (id == R.id.facebook)
|
||||
Utils.showFacebookPage(requireActivity());
|
||||
else if (id == R.id.twitter)
|
||||
Utils.openUrl(requireActivity(), Constants.Url.TWITTER);
|
||||
// else if (id == R.id.twitter)
|
||||
// Utils.openUrl(requireActivity(), Constants.Url.TWITTER);
|
||||
else if (id == R.id.matrix)
|
||||
Utils.openUrl(requireActivity(), Constants.Url.MATRIX);
|
||||
else if (id == R.id.mastodon)
|
||||
@@ -135,7 +135,7 @@ public class HelpFragment extends BaseMwmFragment implements View.OnClickListene
|
||||
else if (id == R.id.report)
|
||||
Utils.sendBugReport(shareLauncher, requireActivity(), "", "");
|
||||
else if (id == R.id.support_us)
|
||||
Utils.openUrl(requireActivity(), getResources().getString(R.string.translated_om_site_url) + "support-us/");
|
||||
Utils.openUrl(requireActivity(), getResources().getString(R.string.app_site_url) + "support-us/");
|
||||
else if (id == R.id.donate)
|
||||
Utils.openUrl(requireActivity(), mDonateUrl);
|
||||
else if (id == R.id.rate)
|
||||
|
||||
@@ -343,7 +343,7 @@ public final class Config
|
||||
// Enable donations by default if not Google or Huawei. Replace organicmaps.app/donate/ with localized page.
|
||||
if ((url.isEmpty() && !BuildConfig.FLAVOR.equals("google") && !BuildConfig.FLAVOR.equals("huawei")) ||
|
||||
url.endsWith("organicmaps.app/donate/"))
|
||||
return context.getString(R.string.translated_om_site_url) + "donate/";
|
||||
return context.getString(R.string.app_site_url) + "donate/";
|
||||
return url;
|
||||
}
|
||||
|
||||
|
||||
@@ -19,13 +19,13 @@ public final class Constants
|
||||
public static final String MAIL_SUBJECT = "?subject=";
|
||||
public static final String MAIL_BODY = "&body=";
|
||||
|
||||
public static final String FB_OM_COMMUNITY_HTTP = "https://www.facebook.com/OrganicMaps";
|
||||
public static final String FB_OM_COMMUNITY_NATIVE = "fb://profile/102378968471811";
|
||||
public static final String TWITTER = "https://twitter.com/OrganicMapsApp";
|
||||
public static final String MATRIX = "https://matrix.to/#/%23organicmaps:matrix.org";
|
||||
public static final String MASTODON = "https://fosstodon.org/@organicmaps";
|
||||
public static final String MATRIX = "https://matrix.to/#/%23comaps:matrix.org";
|
||||
public static final String MASTODON = "https://fosstodon.org/@comaps";
|
||||
public static final String FB_OM_COMMUNITY_HTTP = "https://www.facebook.com/profile.php?id=61575286559965";
|
||||
public static final String FB_OM_COMMUNITY_NATIVE = "fb://profile/61575286559965";
|
||||
//public static final String TWITTER = "https://twitter.com/user";
|
||||
|
||||
public static final String GITHUB = "https://github.com/organicmaps/organicmaps";
|
||||
public static final String CODE_REPO = "https://codeberg.org/comaps/comaps";
|
||||
|
||||
public static final String COPYRIGHT = "file:///android_asset/copyright.html";
|
||||
public static final String FAQ = "file:///android_asset/faq.html";
|
||||
|
||||
@@ -177,7 +177,7 @@ public class Utils
|
||||
{
|
||||
final android.content.ClipboardManager clipboard =
|
||||
(android.content.ClipboardManager) context.getSystemService(Context.CLIPBOARD_SERVICE);
|
||||
final ClipData clip = ClipData.newPlainText("Organic Maps: " + text, text);
|
||||
final ClipData clip = ClipData.newPlainText(context.getString(R.string.project_name) + ": " + text, text);
|
||||
clipboard.setPrimaryClip(clip);
|
||||
}
|
||||
|
||||
@@ -318,14 +318,14 @@ public class Utils
|
||||
*/
|
||||
public static void sendBugReport(@NonNull ActivityResultLauncher<SharingUtils.SharingIntent> launcher, @NonNull Activity activity, @NonNull String subject, @NonNull String body)
|
||||
{
|
||||
subject = "Organic Maps Bugreport" + (TextUtils.isEmpty(subject) ? "" : ": " + subject);
|
||||
subject = activity.getString(R.string.project_name) + " Bug Report" + (TextUtils.isEmpty(subject) ? "" : ": " + subject);
|
||||
LogsManager.INSTANCE.zipLogs(new SupportInfoWithLogsCallback(launcher, activity, subject, body, Constants.Email.SUPPORT));
|
||||
}
|
||||
|
||||
// TODO: Don't send logs with general feedback, send system information only (version, device name, connectivity, etc.)
|
||||
public static void sendFeedback(@NonNull ActivityResultLauncher<SharingUtils.SharingIntent> launcher, @NonNull Activity activity)
|
||||
{
|
||||
LogsManager.INSTANCE.zipLogs(new SupportInfoWithLogsCallback(launcher, activity, "Organic Maps Feedback", "",
|
||||
LogsManager.INSTANCE.zipLogs(new SupportInfoWithLogsCallback(launcher, activity, activity.getString(R.string.project_name) + " Feedback", "",
|
||||
Constants.Email.SUPPORT));
|
||||
}
|
||||
|
||||
|
||||
25
android/app/src/main/res/drawable/ic_codeberg.xml
Normal file
25
android/app/src/main/res/drawable/ic_codeberg.xml
Normal file
@@ -0,0 +1,25 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:aapt="http://schemas.android.com/aapt"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:pathData="m12.2,6.09a0.105,0.078 0,0 0,-0.102 0.093l4.62,17.3a12,12 0,0 0,5.42 -4.65l-9.85,-12.7a0.105,0.078 0,0 0,-0.091 -0.038z">
|
||||
<aapt:attr name="android:fillColor">
|
||||
<gradient
|
||||
android:startX="26.622"
|
||||
android:startY="4.098"
|
||||
android:endX="34.35"
|
||||
android:endY="19.554"
|
||||
android:type="linear">
|
||||
<item android:offset="0" android:color="#002185D0"/>
|
||||
<item android:offset="0.495" android:color="#4C2185D0"/>
|
||||
<item android:offset="1" android:color="#4C2185D0"/>
|
||||
</gradient>
|
||||
</aapt:attr>
|
||||
</path>
|
||||
<path
|
||||
android:pathData="m12,0.488c-6.63,0 -12,5.37 -12,12 0,2.25 0.635,4.46 1.83,6.37l10,-12.9c0.072,-0.093 0.253,-0.093 0.325,0l10,12.9c1.2,-1.91 1.83,-4.12 1.83,-6.37 0,-6.63 -5.37,-12 -12,-12z"
|
||||
android:fillColor="#2185d0"/>
|
||||
</vector>
|
||||
@@ -41,7 +41,7 @@
|
||||
android:textAlignment="center"
|
||||
android:textAppearance="@style/MwmTextAppearance.Body3"
|
||||
android:textIsSelectable="true"
|
||||
tools:text="2021.10.15-15-Google" />
|
||||
tools:text="2025.04.16-FDroid" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
@@ -236,11 +236,11 @@
|
||||
app:drawableStartCompat="@drawable/ic_telegram" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/github"
|
||||
android:id="@+id/code_repo"
|
||||
android:textAlignment="viewStart"
|
||||
style="@style/MwmWidget.TextView.Item"
|
||||
android:text="@string/github"
|
||||
app:drawableStartCompat="@drawable/ic_github" />
|
||||
android:text="@string/codeberg"
|
||||
app:drawableStartCompat="@drawable/ic_codeberg" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/web"
|
||||
@@ -276,14 +276,14 @@
|
||||
style="@style/MwmWidget.TextView.Item"
|
||||
android:text="@string/facebook"
|
||||
app:drawableStartCompat="@drawable/ic_facebook" />
|
||||
|
||||
<!--
|
||||
<TextView
|
||||
android:id="@+id/twitter"
|
||||
android:textAlignment="viewStart"
|
||||
style="@style/MwmWidget.TextView.Item"
|
||||
android:text="@string/twitter"
|
||||
app:drawableStartCompat="@drawable/ic_twitterx" />
|
||||
|
||||
-->
|
||||
<TextView
|
||||
android:id="@+id/instagram"
|
||||
android:textAlignment="viewStart"
|
||||
@@ -322,6 +322,5 @@
|
||||
android:textAlignment="viewStart"
|
||||
style="@style/MwmWidget.TextView.Item"
|
||||
android:text="@string/copyright" />
|
||||
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
android:selectAllOnFocus="true"
|
||||
android:textAppearance="@style/MwmTextAppearance.Body3"
|
||||
android:textIsSelectable="true"
|
||||
tools:text="2021.10.15-15-Google" />
|
||||
tools:text="2025.04.16-FDroid" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
@@ -169,11 +169,11 @@
|
||||
app:drawableStartCompat="@drawable/ic_telegram" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/github"
|
||||
android:id="@+id/code_repo"
|
||||
style="@style/MwmWidget.TextView.Item"
|
||||
android:text="@string/github"
|
||||
android:text="@string/codeberg"
|
||||
android:textAlignment="viewStart"
|
||||
app:drawableStartCompat="@drawable/ic_github" />
|
||||
app:drawableStartCompat="@drawable/ic_codeberg" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/web"
|
||||
@@ -209,14 +209,14 @@
|
||||
android:text="@string/facebook"
|
||||
android:textAlignment="viewStart"
|
||||
app:drawableStartCompat="@drawable/ic_facebook" />
|
||||
|
||||
<!--
|
||||
<TextView
|
||||
android:id="@+id/twitter"
|
||||
style="@style/MwmWidget.TextView.Item"
|
||||
android:text="@string/twitter"
|
||||
android:textAlignment="viewStart"
|
||||
app:drawableStartCompat="@drawable/ic_twitterx" />
|
||||
|
||||
-->
|
||||
<TextView
|
||||
android:id="@+id/instagram"
|
||||
style="@style/MwmWidget.TextView.Item"
|
||||
@@ -255,6 +255,5 @@
|
||||
style="@style/MwmWidget.TextView.Item"
|
||||
android:textAlignment="viewStart"
|
||||
android:text="@string/copyright" />
|
||||
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<!-- Project only name, app_name is added to strings in build.gradle & can contain "Debug" etc. prefixes. -->
|
||||
<string name="project_name" translatable="false">CoMaps</string>
|
||||
<string name="app_site_url">https://comaps.app/</string>
|
||||
<!-- SECTION: Strings -->
|
||||
<!-- Button text (should be short) -->
|
||||
<string name="back">Back</string>
|
||||
@@ -921,4 +924,5 @@
|
||||
<string name="uri_open_location_failed">No app installed that can open the location</string>
|
||||
<!-- preference string for using auto theme only in navigation mode -->
|
||||
<string name="nav_auto">Auto in navigation</string>
|
||||
<string name="codeberg">Codeberg</string>
|
||||
</resources>
|
||||
|
||||
Reference in New Issue
Block a user