mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 20:33:53 +01:00
Added CDATA tag (#1836)
* Fix issue#1772 Add the CDATA tag to welcome_help_button_text string. Set the text of the corresponding textview using Html.fromHtml() function. * Fix issue#1772 Add the CDATA tag to nominated_see_more string. Set the text of the corresponding textview using Html.fromHtml() function.
This commit is contained in:
parent
2884bd934a
commit
430bf90310
6 changed files with 15 additions and 4 deletions
|
|
@ -19,6 +19,7 @@ public class WelcomeActivity extends BaseActivity {
|
||||||
|
|
||||||
private WelcomePagerAdapter adapter = new WelcomePagerAdapter();
|
private WelcomePagerAdapter adapter = new WelcomePagerAdapter();
|
||||||
private boolean isQuiz;
|
private boolean isQuiz;
|
||||||
|
static String moreInformation;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initialises exiting fields and dependencies
|
* Initialises exiting fields and dependencies
|
||||||
|
|
@ -30,6 +31,8 @@ public class WelcomeActivity extends BaseActivity {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
setContentView(R.layout.activity_welcome);
|
setContentView(R.layout.activity_welcome);
|
||||||
|
|
||||||
|
moreInformation = this.getString(R.string.welcome_help_button_text);
|
||||||
|
|
||||||
if(getIntent() != null) {
|
if(getIntent() != null) {
|
||||||
Bundle bundle = getIntent().getExtras();
|
Bundle bundle = getIntent().getExtras();
|
||||||
if (bundle != null) {
|
if (bundle != null) {
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@ package fr.free.nrw.commons;
|
||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
import android.support.annotation.Nullable;
|
import android.support.annotation.Nullable;
|
||||||
import android.support.v4.view.PagerAdapter;
|
import android.support.v4.view.PagerAdapter;
|
||||||
|
import android.text.Html;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
|
|
@ -66,6 +67,13 @@ public class WelcomePagerAdapter extends PagerAdapter {
|
||||||
}
|
}
|
||||||
ViewHolder holder = new ViewHolder(layout);
|
ViewHolder holder = new ViewHolder(layout);
|
||||||
layout.setTag(holder);
|
layout.setTag(holder);
|
||||||
|
|
||||||
|
if(position == PAGE_FINAL){
|
||||||
|
TextView moreInfo = layout.findViewById(R.id.welcomeInfo);
|
||||||
|
moreInfo.setText(Html.fromHtml(WelcomeActivity.moreInformation));
|
||||||
|
ViewHolder holder1 = new ViewHolder(layout);
|
||||||
|
layout.setTag(holder1);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
if (position == PAGE_FINAL) {
|
if (position == PAGE_FINAL) {
|
||||||
ViewHolder holder = new ViewHolder(layout);
|
ViewHolder holder = new ViewHolder(layout);
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,7 @@ import android.os.AsyncTask;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.support.annotation.Nullable;
|
import android.support.annotation.Nullable;
|
||||||
import android.text.Editable;
|
import android.text.Editable;
|
||||||
|
import android.text.Html;
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
import android.text.TextWatcher;
|
import android.text.TextWatcher;
|
||||||
import android.util.TypedValue;
|
import android.util.TypedValue;
|
||||||
|
|
@ -165,6 +166,7 @@ public class MediaDetailFragment extends CommonsDaggerSupportFragment {
|
||||||
final View view = inflater.inflate(R.layout.fragment_media_detail, container, false);
|
final View view = inflater.inflate(R.layout.fragment_media_detail, container, false);
|
||||||
|
|
||||||
ButterKnife.bind(this,view);
|
ButterKnife.bind(this,view);
|
||||||
|
seeMore.setText(Html.fromHtml(getString(R.string.nominated_see_more)));
|
||||||
|
|
||||||
if (isCategoryImage){
|
if (isCategoryImage){
|
||||||
authorLayout.setVisibility(VISIBLE);
|
authorLayout.setVisibility(VISIBLE);
|
||||||
|
|
|
||||||
|
|
@ -305,7 +305,6 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:text="@string/nominated_see_more"
|
|
||||||
android:paddingTop="@dimen/standard_gap"
|
android:paddingTop="@dimen/standard_gap"
|
||||||
android:textColor="@color/primaryTextColor"
|
android:textColor="@color/primaryTextColor"
|
||||||
android:textSize="@dimen/normal_text"
|
android:textSize="@dimen/normal_text"
|
||||||
|
|
|
||||||
|
|
@ -78,7 +78,6 @@
|
||||||
android:id="@+id/welcomeInfo"
|
android:id="@+id/welcomeInfo"
|
||||||
android:textSize="@dimen/normal_text"
|
android:textSize="@dimen/normal_text"
|
||||||
android:textColor="@android:color/white"
|
android:textColor="@android:color/white"
|
||||||
android:text="@string/welcome_help_button_text"
|
|
||||||
android:layout_marginBottom="@dimen/large_gap"
|
android:layout_marginBottom="@dimen/large_gap"
|
||||||
android:paddingBottom="@dimen/large_gap"
|
android:paddingBottom="@dimen/large_gap"
|
||||||
/>
|
/>
|
||||||
|
|
|
||||||
|
|
@ -153,7 +153,7 @@
|
||||||
<string name="welcome_copyright_subtext">Avoid copyrighted materials you found from the Internet as well as images of posters, book covers, etc.</string>
|
<string name="welcome_copyright_subtext">Avoid copyrighted materials you found from the Internet as well as images of posters, book covers, etc.</string>
|
||||||
<string name="welcome_final_text">You think you got it?</string>
|
<string name="welcome_final_text">You think you got it?</string>
|
||||||
<string name="welcome_final_button_text">Yes!</string>
|
<string name="welcome_final_button_text">Yes!</string>
|
||||||
<string name="welcome_help_button_text"><u>More Information</u></string>
|
<string name="welcome_help_button_text"><![CDATA[<u>More Information</u>]]></string>
|
||||||
<string name="detail_panel_cats_label">Categories</string>
|
<string name="detail_panel_cats_label">Categories</string>
|
||||||
<string name="detail_panel_cats_loading">Loading…</string>
|
<string name="detail_panel_cats_loading">Loading…</string>
|
||||||
<string name="detail_panel_cats_none">None selected</string>
|
<string name="detail_panel_cats_none">None selected</string>
|
||||||
|
|
@ -245,7 +245,7 @@
|
||||||
<string name="null_url">Error! URL not found</string>
|
<string name="null_url">Error! URL not found</string>
|
||||||
<string name="nominate_deletion">Nominate for Deletion</string>
|
<string name="nominate_deletion">Nominate for Deletion</string>
|
||||||
<string name="nominated_for_deletion">This image has been nominated for deletion.</string>
|
<string name="nominated_for_deletion">This image has been nominated for deletion.</string>
|
||||||
<string name="nominated_see_more"><u>See webpage for details</u></string>
|
<string name="nominated_see_more"><![CDATA[<u>See webpage for details</u>]]</string>
|
||||||
<string name="view_browser">View in Browser</string>
|
<string name="view_browser">View in Browser</string>
|
||||||
<string name="skip_login">Skip</string>
|
<string name="skip_login">Skip</string>
|
||||||
<string name="navigation_item_login">Log in</string>
|
<string name="navigation_item_login">Log in</string>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue