mirror of
https://gitee.com/zhangsken/AndroidIDE.git
synced 2026-10-16 07:49:44 +08:00
Updated about activity to include translations and their authors
This commit is contained in:
Generated
+1
-1
@@ -8,7 +8,7 @@
|
||||
<entry key="..\:/Projects/AndroidStudioProjects/AndroidIDE/app/src/main/res/drawable/ic_github.xml" value="0.21837606837606838" />
|
||||
<entry key="..\:/Projects/AndroidStudioProjects/AndroidIDE/app/src/main/res/drawable/ic_linear_layout.xml" value="0.175" />
|
||||
<entry key="..\:/Projects/AndroidStudioProjects/AndroidIDE/app/src/main/res/drawable/ic_relative_layout.xml" value="0.175" />
|
||||
<entry key="..\:/Projects/AndroidStudioProjects/AndroidIDE/app/src/main/res/layout/activity_about.xml" value="0.2" />
|
||||
<entry key="..\:/Projects/AndroidStudioProjects/AndroidIDE/app/src/main/res/layout/activity_about.xml" value="0.264" />
|
||||
<entry key="..\:/Projects/AndroidStudioProjects/AndroidIDE/app/src/main/res/layout/activity_crash_handler.xml" value="0.25" />
|
||||
<entry key="..\:/Projects/AndroidStudioProjects/AndroidIDE/app/src/main/res/layout/activity_designer.xml" value="0.264" />
|
||||
<entry key="..\:/Projects/AndroidStudioProjects/AndroidIDE/app/src/main/res/layout/activity_download.xml" value="0.1188034188034188" />
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
/************************************************************************************
|
||||
/*
|
||||
* This file is part of AndroidIDE.
|
||||
*
|
||||
*
|
||||
*
|
||||
* AndroidIDE is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
@@ -16,9 +14,7 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with AndroidIDE. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
**************************************************************************************/
|
||||
|
||||
|
||||
*/
|
||||
package com.itsaky.androidide;
|
||||
|
||||
import android.os.Bundle;
|
||||
@@ -26,6 +22,8 @@ import android.text.Html;
|
||||
import android.text.method.LinkMovementMethod;
|
||||
import android.view.View;
|
||||
import androidx.appcompat.widget.TooltipCompat;
|
||||
import androidx.core.util.Pair;
|
||||
|
||||
import com.itsaky.androidide.app.StudioActivity;
|
||||
import com.itsaky.androidide.app.StudioApp;
|
||||
import com.itsaky.androidide.databinding.ActivityAboutBinding;
|
||||
@@ -52,6 +50,7 @@ public class AboutActivity extends StudioActivity {
|
||||
|
||||
binding.items.footerText.setText(getFooter());
|
||||
|
||||
setupTranslations ();
|
||||
setupLicenses();
|
||||
|
||||
LayoutAboutItemsBinding items = binding.items;
|
||||
@@ -73,6 +72,46 @@ public class AboutActivity extends StudioActivity {
|
||||
});
|
||||
}
|
||||
|
||||
private void setupTranslations () {
|
||||
final var translations = createTranslationsList ();
|
||||
final var sb = new StringBuilder ();
|
||||
|
||||
for (var translation : translations) {
|
||||
final var author = translation.first;
|
||||
final var language = translation.second;
|
||||
|
||||
sb.append (author);
|
||||
sb.append (" - ");
|
||||
sb.append (language);
|
||||
sb.append ("\n");
|
||||
}
|
||||
|
||||
binding.items.translations.setText (sb);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create the list of translations.
|
||||
* The list items are pairs.
|
||||
* The first item of the pair is the name of the language.
|
||||
* The second item is the name of the person who made the translations.
|
||||
*
|
||||
* If you're adding translations, make sure you add an item to this list.
|
||||
* You can choose to display the language in a localized version. For example :
|
||||
* Language: हिन्दी - < name of author >
|
||||
*
|
||||
* Prefer using unicode escapes for language names. For example, हिन्दी can be written as :
|
||||
* Language: \u0939\u093f\u0928\u094d\u0926\u0940 - < name of author >
|
||||
*
|
||||
* @return The translations list.
|
||||
*/
|
||||
private List<Pair<String, String>> createTranslationsList () {
|
||||
final var list = new ArrayList<Pair<String, String>> ();
|
||||
|
||||
list.add (Pair.create ("Bahasa Indonesia", "Fitrah Nuno Syahbani"));
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
private void setupLicenses() {
|
||||
final var licenses = new ArrayList<License>();
|
||||
licenses.add(new License("AndroidX Libraries", "Apache License 2.0", "https://github.com/androidx/androidx"));
|
||||
@@ -88,7 +127,6 @@ public class AboutActivity extends StudioActivity {
|
||||
licenses.add(new License("AndroidTreeView", "Apache License 2.0", "https://github.com/bmelnychuk/AndroidTreeView"));
|
||||
licenses.add(new License("CodeEditor v0.5.2", "Apache License 2.0", "https://github.com/Rosemoe/CodeEditor"));
|
||||
licenses.add(new License("Guava-Android", "Apache License 2.0", "https://github.com/google/guava"));
|
||||
licenses.add(new License("LSP4J", "Eclipse Public License 2.0", "https://github.com/eclipse/lsp4j"));
|
||||
licenses.add(new License("Jsoup", "MIT License", "https://github.com/jhy/jsoup"));
|
||||
licenses.add(new License("Termux [Terminal Emulator]", "GPL 3", "https://github.com/termux/termux-app"));
|
||||
licenses.add(new License("JavaPoet", "Apache License 2.0", "https://github.com/square/JavaPoet"));
|
||||
@@ -111,8 +149,6 @@ public class AboutActivity extends StudioActivity {
|
||||
sb.append(getString(R.string.license_jdk));
|
||||
sb.append(String.format("<br><a href=\"%1$s\">%1$s</a>", JDK_SOURCE));
|
||||
sb.append("<br><br>");
|
||||
sb.append(getString(R.string.license_epl));
|
||||
sb.append(String.format("<br><a href=\"mailto:%1$s\">%1$s</a>", StudioApp.EMAIL));
|
||||
binding.items.licenses.setText(Html.fromHtml(sb.toString()));
|
||||
binding.items.licenses.setMovementMethod(LinkMovementMethod.getInstance());
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.motion.widget.MotionLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
@@ -7,13 +7,13 @@
|
||||
app:layoutDescription="@xml/motion_about">
|
||||
|
||||
<View
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:id="@+id/icon_anchor"
|
||||
android:id="@+id/icon_anchor"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="200dp"
|
||||
android:background="@color/primaryDarkColor"/>
|
||||
android:background="@color/primaryDarkColor"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
@@ -34,34 +34,36 @@
|
||||
android:src="@mipmap/ic_launcher"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:id="@+id/icon"/>
|
||||
android:id="@+id/icon" />
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<TextView
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/icon_container"
|
||||
android:id="@+id/title"
|
||||
android:id="@+id/title"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginBottom="4dp"
|
||||
android:gravity="center"
|
||||
android:text="@string/app_name"
|
||||
android:textStyle="bold"
|
||||
android:textSize="30sp"
|
||||
android:textColor="@color/primaryTextColor"
|
||||
android:layout_marginBottom="4dp"/>
|
||||
android:textSize="30sp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/icon_container" />
|
||||
|
||||
<TextView
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/title"
|
||||
android:id="@+id/subtitle"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text="@string/about_subtitle"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textColor="@color/secondaryTextColor"
|
||||
android:layout_marginBottom="24dp"/>
|
||||
android:textColor="@color/secondaryTextColor"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/title" />
|
||||
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:layout_width="0dp"
|
||||
@@ -72,8 +74,13 @@
|
||||
app:layout_constraintTop_toBottomOf="@id/subtitle"
|
||||
android:id="@+id/about_scroller">
|
||||
|
||||
<include android:id="@+id/items" layout="@layout/layout_about_items"/>
|
||||
<include
|
||||
android:id="@+id/items"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_marginTop="24dp"
|
||||
layout="@layout/layout_about_items"/>
|
||||
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
|
||||
</androidx.constraintlayout.motion.widget.MotionLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
@@ -84,7 +84,7 @@
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/title_developers"
|
||||
android:text="@string/title_translations"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_marginBottom="4dp"
|
||||
@@ -100,14 +100,15 @@
|
||||
android:layout_marginBottom="8dp"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/translations"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="24dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:text="@string/msg_developers"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:textSize="15sp"/>
|
||||
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
<!-- AndroidIDE -->
|
||||
<string name="app_name">AndroidIDE</string>
|
||||
<string name="license_epl">AndroidIDE uses LSP4J in its object code form (i.e. without any modifications) which is licensed under EPL 2.0. If you want us to disclose the source code to you, contact us at: </string>
|
||||
<string name="license_jdk">AndroidIDE uses a modified build of the JDK which is licensed under the GNU General Public License v2.0. The source code and the license of the JDK is available at : </string>
|
||||
<string name="title_developers">Pengembang</string>
|
||||
<string name="msg_developers">\u2022 Akash Yadav\n\u2022 Marvin Stelter</string>
|
||||
@@ -348,5 +347,6 @@
|
||||
<string name="msg_copy_report_action">Salin dan laporkan</string>
|
||||
<string name="msg_reading_bootstrap">Membaca arsip bootstrap…</string>
|
||||
<string name="msg_bootstrap_installation_error">Instalasi Bootstrap gagal dengan exception berikut.</string>
|
||||
<string name="title_translations">Terjemahan</string>
|
||||
|
||||
</resources>
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
<!-- AndroidIDE -->
|
||||
<string name="app_name">AndroidIDE</string>
|
||||
<string name="license_epl">AndroidIDE uses LSP4J in its object code form (i.e. without any modifications) which is licensed under EPL 2.0. If you want us to disclose the source code to you, contact us at: </string>
|
||||
<string name="license_jdk">AndroidIDE uses a modified build of the JDK which is licensed under the GNU General Public License v2.0. The source code and the license of the JDK is available at : </string>
|
||||
<string name="title_developers">Developers</string>
|
||||
<string name="msg_developers">\u2022 Akash Yadav\n\u2022 Marvin Stelter</string>
|
||||
@@ -348,5 +347,6 @@
|
||||
<string name="msg_copy_report_action">Copy and report</string>
|
||||
<string name="msg_reading_bootstrap">Reading bootstrap archive…</string>
|
||||
<string name="msg_bootstrap_installation_error">Bootstrap installation failed with the following exception.</string>
|
||||
<string name="title_translations">Translations</string>
|
||||
|
||||
</resources>
|
||||
|
||||
Reference in New Issue
Block a user