Add credits in about page

This commit is contained in:
maskara 2017-03-21 01:22:04 +05:30
parent 75f2201000
commit 6b1484efe6
3 changed files with 16 additions and 0 deletions

View file

@ -1,5 +1,7 @@
package fr.free.nrw.commons;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.text.Html;
import android.text.method.LinkMovementMethod;
@ -16,6 +18,7 @@ public class AboutActivity extends BaseActivity {
@BindView(R.id.about_improve) TextView improveText;
@BindView(R.id.about_privacy_policy) TextView privacyPolicyText;
@BindView(R.id.about_uploads_to) TextView uploadsToText;
@BindView(R.id.about_credits) TextView creditsText;
@Override
public void onCreate(Bundle savedInstanceState) {
@ -32,10 +35,12 @@ public class AboutActivity extends BaseActivity {
fixFormatting(licenseText, R.string.about_license);
fixFormatting(improveText, R.string.about_improve);
fixFormatting(privacyPolicyText, R.string.about_privacy_policy);
fixFormatting(creditsText, R.string.about_credits);
licenseText.setMovementMethod(LinkMovementMethod.getInstance());
improveText.setMovementMethod(LinkMovementMethod.getInstance());
privacyPolicyText.setMovementMethod(LinkMovementMethod.getInstance());
creditsText.setMovementMethod(LinkMovementMethod.getInstance());
}
private void fixFormatting(TextView textView, int resource) {

View file

@ -57,6 +57,16 @@
android:text="@string/about_privacy_policy"
/>
<TextView
android:id="@+id/about_credits"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
style="?android:textAppearanceSmall"
android:gravity="center"
android:text="@string/about_credits"
/>
<TextView
android:id="@+id/about_uploads_to"
android:layout_width="wrap_content"

View file

@ -77,6 +77,7 @@ Tap this message (or hit back) to skip this step.</string>
<string name="about_license">Open Source software released under the &lt;a href=\"https://github.com/wikimedia/apps-android-commons/blob/master/COPYING\"&gt;Apache License v2&lt;/a&gt;. Wikimedia Commons and its logo are trademarks of the Wikimedia Foundation and are used with the permission of the Wikimedia Foundation. We are not endorsed by or affiliated with the Wikimedia Foundation.</string>
<string name="about_improve">&lt;a href=\"https://github.com/commons-app/apps-android-commons\"&gt;Source&lt;/a&gt; and &lt;a href=\"https://commons-app.github.io/\"&gt;website&lt;/a&gt; on GitHub. Create a new &lt;a href=\"https://github.com/commons-app/apps-android-commons/issues\"&gt;GitHub issue&lt;/a&gt; for bug reports and suggestions.</string>
<string name="about_privacy_policy">&lt;a href=\"https://wikimediafoundation.org/wiki/Privacy_policy\"&gt;Privacy policy&lt;/a&gt;</string>
<string name="about_credits">&lt;a href=\"https://github.com/commons-app/apps-android-commons/blob/master/CREDITS\"&gt;CREDITS&lt;/a&gt;</string>
<string name="title_activity_about">About</string>
<string name="menu_feedback">Send Feedback (via Email)</string>
<string name="no_email_client">No email client installed</string>