title and content have the same language
This commit is contained in:
parent
f7f4b65f87
commit
c2c853a7a6
1 changed files with 2 additions and 2 deletions
|
@ -167,8 +167,6 @@ public class WikipediaDialogFragment extends DialogFragment {
|
||||||
if (TextUtils.isEmpty(preferredLanguage)) {
|
if (TextUtils.isEmpty(preferredLanguage)) {
|
||||||
preferredLanguage = getMyApplication().getLanguage();
|
preferredLanguage = getMyApplication().getLanguage();
|
||||||
}
|
}
|
||||||
final String title = TextUtils.isEmpty(preferredLanguage) ? amenity.getName() : amenity.getName(preferredLanguage);
|
|
||||||
((TextView) mainView.findViewById(R.id.title_text_view)).setText(title);
|
|
||||||
|
|
||||||
String lng = amenity.getContentLanguage("content", preferredLanguage, "en");
|
String lng = amenity.getContentLanguage("content", preferredLanguage, "en");
|
||||||
if (Algorithms.isEmpty(lng)) {
|
if (Algorithms.isEmpty(lng)) {
|
||||||
|
@ -176,6 +174,8 @@ public class WikipediaDialogFragment extends DialogFragment {
|
||||||
}
|
}
|
||||||
|
|
||||||
final String langSelected = lng;
|
final String langSelected = lng;
|
||||||
|
final String title = TextUtils.isEmpty(preferredLanguage) ? amenity.getName() : amenity.getName(langSelected);
|
||||||
|
((TextView) mainView.findViewById(R.id.title_text_view)).setText(title);
|
||||||
|
|
||||||
mainView.findViewById(R.id.read_full_article).setOnClickListener(new View.OnClickListener() {
|
mainView.findViewById(R.id.read_full_article).setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in a new issue