Reworked about page for translations
This commit is contained in:
@@ -21,15 +21,18 @@ public class HelpAboutFragment extends Fragment {
|
|||||||
View view = inflater.inflate(R.layout.fragment_help_about, container, false);
|
View view = inflater.inflate(R.layout.fragment_help_about, container, false);
|
||||||
|
|
||||||
TextView versionText = (TextView) view.findViewById(R.id.help_about_version);
|
TextView versionText = (TextView) view.findViewById(R.id.help_about_version);
|
||||||
versionText.setText(getString(R.string.help_about_version) + " " + getVersion());
|
versionText.setText(getString(R.string.version) + " " + getVersion());
|
||||||
|
|
||||||
HtmlTextView aboutTextView = (HtmlTextView) view.findViewById(R.id.help_about_text);
|
TextView licenseText = (TextView) view.findViewById(R.id.help_about_license);
|
||||||
|
licenseText.setText(getString(R.string.license, "GPLv3+"));
|
||||||
|
|
||||||
|
HtmlTextView aboutLibsView = (HtmlTextView) view.findViewById(R.id.help_about_libraries);
|
||||||
|
|
||||||
// load html from raw resource (Parsing handled by HtmlTextView library)
|
// load html from raw resource (Parsing handled by HtmlTextView library)
|
||||||
aboutTextView.setHtmlFromRawResource(getActivity(), R.raw.help_about, true);
|
aboutLibsView.setHtmlFromRawResource(getActivity(), R.raw.help_about_libraries, true);
|
||||||
|
|
||||||
// no flickering when clicking textview for Android < 4
|
// no flickering when clicking textview for Android < 4
|
||||||
aboutTextView.setTextColor(getResources().getColor(android.R.color.black));
|
aboutLibsView.setTextColor(getResources().getColor(android.R.color.black));
|
||||||
|
|
||||||
return view;
|
return view;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,18 +19,12 @@
|
|||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:orientation="horizontal">
|
android:orientation="horizontal">
|
||||||
|
|
||||||
<LinearLayout
|
<ImageView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical">
|
android:layout_gravity="top"
|
||||||
|
android:layout_marginRight="10dp"
|
||||||
<ImageView
|
android:src="@drawable/ic_launcher"/>
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_gravity="top"
|
|
||||||
android:layout_marginRight="10dp"
|
|
||||||
android:src="@drawable/ic_launcher"/>
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@@ -47,12 +41,34 @@
|
|||||||
android:id="@+id/help_about_version"
|
android:id="@+id/help_about_version"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/version"
|
||||||
android:textAppearance="@style/TextAppearance.AppCompat.Secondary"/>
|
android:textAppearance="@style/TextAppearance.AppCompat.Secondary"/>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
style="@style/Help.About.Text"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:autoLink="web"
|
||||||
|
android:text="@string/help_about_url"/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/help_about_license"
|
||||||
|
style="@style/Help.About.Text"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/license"/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="16dp"
|
||||||
|
android:text="@string/libraries"
|
||||||
|
android:textAppearance="@style/TextAppearance.AppCompat.Subject"/>
|
||||||
|
|
||||||
<org.sufficientlysecure.htmltextview.HtmlTextView
|
<org.sufficientlysecure.htmltextview.HtmlTextView
|
||||||
android:id="@+id/help_about_text"
|
android:id="@+id/help_about_libraries"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="8dp"/>
|
android:layout_marginTop="8dp"/>
|
||||||
|
|||||||
@@ -1,15 +1,7 @@
|
|||||||
<!-- Maintain structure with headings with h2 tags and content with p tags.
|
|
||||||
This makes it easy to translate the values with transifex!
|
|
||||||
And don't add newlines before or after p tags because of transifex -->
|
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<p><a href="https://github.com/i2p/i2p.i2p-bote.android">https://github.com/i2p/i2p.i2p-bote.android</a></p>
|
|
||||||
<p>Bote is the Android app for <a href="http://i2pbote.i2p.xyz">I2P-Bote</a>.</p>
|
|
||||||
<p>License: GPLv3+</p>
|
|
||||||
|
|
||||||
<h2>Libraries</h2>
|
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="http://developer.android.com/tools/support-library/index.html">Android Support Library v4</a> (Apache License v2)</li>
|
<li><a href="http://developer.android.com/tools/support-library/index.html">Android Support Library v4</a> (Apache License v2)</li>
|
||||||
<li><a href="http://developer.android.com/tools/support-library/index.html">Android Support Library v7 'appcompat'</a> (Apache License v2)</li>
|
<li><a href="http://developer.android.com/tools/support-library/index.html">Android Support Library v7 'appcompat'</a> (Apache License v2)</li>
|
||||||
@@ -244,6 +244,11 @@
|
|||||||
<string name="start">Start</string>
|
<string name="start">Start</string>
|
||||||
<string name="changelog">Changelog</string>
|
<string name="changelog">Changelog</string>
|
||||||
<string name="about">About</string>
|
<string name="about">About</string>
|
||||||
<string name="help_about_version">Version:</string>
|
<string name="version">Version</string>
|
||||||
|
<string name="help_about_url" translatable="false">https://github.com/i2p/i2p.i2p-bote.android</string>
|
||||||
|
<!-- As in software license, e.g. Apache License v2 -->
|
||||||
|
<string name="license">License: %s</string>
|
||||||
|
<!-- Software libraries -->
|
||||||
|
<string name="libraries">Libraries</string>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
@@ -67,4 +67,8 @@
|
|||||||
<item name="android:textColor">@android:color/white</item>
|
<item name="android:textColor">@android:color/white</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
<style name="Help.About.Text" parent="TextAppearance.AppCompat.Body1">
|
||||||
|
<item name="android:layout_marginTop">8dp</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
Reference in New Issue
Block a user