mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-27 12:53:55 +01:00
Faqs added in About Activity (#1256)
* Faqs added in About Activity * Added CDATA in strings * removed cdata, added SpannableString
This commit is contained in:
parent
bdd7a86cd5
commit
ede8c76d45
3 changed files with 23 additions and 2 deletions
|
|
@ -4,6 +4,8 @@ import android.annotation.SuppressLint;
|
|||
import android.content.Intent;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.text.SpannableString;
|
||||
import android.text.style.UnderlineSpan;
|
||||
import android.util.Log;
|
||||
import android.support.customtabs.CustomTabsIntent;
|
||||
import android.support.v4.content.ContextCompat;
|
||||
|
|
@ -25,6 +27,7 @@ import static android.widget.Toast.LENGTH_SHORT;
|
|||
public class AboutActivity extends NavigationBaseActivity {
|
||||
@BindView(R.id.about_version) TextView versionText;
|
||||
@BindView(R.id.about_license) HtmlTextView aboutLicenseText;
|
||||
@BindView(R.id.about_faq) TextView faqText;
|
||||
|
||||
/**
|
||||
* This method helps in the creation About screen
|
||||
|
|
@ -40,7 +43,9 @@ public class AboutActivity extends NavigationBaseActivity {
|
|||
ButterKnife.bind(this);
|
||||
String aboutText = getString(R.string.about_license);
|
||||
aboutLicenseText.setHtmlText(aboutText);
|
||||
|
||||
SpannableString content = new SpannableString(getString(R.string.about_faq));
|
||||
content.setSpan(new UnderlineSpan(), 0, content.length(), 0);
|
||||
faqText.setText(content);
|
||||
versionText.setText(BuildConfig.VERSION_NAME);
|
||||
initDrawer();
|
||||
}
|
||||
|
|
@ -113,4 +118,9 @@ public class AboutActivity extends NavigationBaseActivity {
|
|||
}
|
||||
}
|
||||
|
||||
@OnClick(R.id.about_faq)
|
||||
public void launchFrequentlyAskedQuesions(View view) {
|
||||
Utils.handleWebUrl(this,Uri.parse("https://github.com/commons-app/apps-android-commons/wiki/Frequently-Asked-Questions\\"));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue