mirror of
https://github.com/ethauvin/android-about-box.git
synced 2025-04-25 02:37:11 -07:00
Merge pull request #31 from ethauvin/develop
Author & Extra & About Company.
This commit is contained in:
commit
0d52e41e48
4 changed files with 22 additions and 1 deletions
|
@ -8,6 +8,9 @@ public class AboutConfig {
|
|||
public String appName;
|
||||
public int appIcon;
|
||||
public String version;
|
||||
public String author;
|
||||
public String extra;
|
||||
public String extraTitle;
|
||||
public String aboutLabelTitle;
|
||||
public String logUiEventName;
|
||||
public String facebookUserName;
|
||||
|
|
|
@ -23,6 +23,7 @@ public class AboutActivity extends MaterialAboutActivity {
|
|||
|
||||
public static void launch(Activity activity) {
|
||||
Intent intent = new Intent(activity, AboutActivity.class);
|
||||
intent.setFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
|
||||
activity.startActivity(intent);
|
||||
}
|
||||
|
||||
|
@ -54,6 +55,21 @@ public class AboutActivity extends MaterialAboutActivity {
|
|||
.text(R.string.egab_version)
|
||||
.subText(config.version)
|
||||
.build());
|
||||
|
||||
if (!TextUtils.isEmpty(config.author)) {
|
||||
generalInfoCardBuilder.addItem(new MaterialAboutActionItem.Builder()
|
||||
.text(R.string.egab_author)
|
||||
.subText(config.author)
|
||||
.build());
|
||||
}
|
||||
|
||||
if (!TextUtils.isEmpty(config.extra) && !TextUtils.isEmpty(config.extraTitle)) {
|
||||
generalInfoCardBuilder.addItem(new MaterialAboutActionItem.Builder()
|
||||
.text(config.extraTitle)
|
||||
.subTextHtml(config.extra)
|
||||
.build());
|
||||
}
|
||||
|
||||
return generalInfoCardBuilder.build();
|
||||
}
|
||||
|
||||
|
@ -130,7 +146,7 @@ public class AboutActivity extends MaterialAboutActivity {
|
|||
}
|
||||
}));
|
||||
}
|
||||
if (!TextUtils.isEmpty(config.companyHtmlPath)) {
|
||||
if (!TextUtils.isEmpty(config.companyHtmlPath) && !TextUtils.isEmpty(config.aboutLabelTitle)) {
|
||||
card.addItem(new MaterialAboutActionItem.Builder()
|
||||
.text(config.aboutLabelTitle)
|
||||
.icon(R.drawable.ic_about_black)
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
<string name="egab_contact_support">Contactar o Suporte</string>
|
||||
<string name="egab_try_other_apps">Experimentar outras aplicações</string>
|
||||
<string name="egab_version">Versão</string>
|
||||
<string name="egab_author">Autor</string>
|
||||
<string name="egab_facebook_label">Facebook</string>
|
||||
<string name="egab_twitter_label">Twitter</string>
|
||||
<string name="egab_web_label">Web</string>
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
<string name="egab_contact_support">Contact Support</string>
|
||||
<string name="egab_try_other_apps">Try Other Apps</string>
|
||||
<string name="egab_version">Version</string>
|
||||
<string name="egab_author">Author</string>
|
||||
<string name="egab_facebook_label">Facebook</string>
|
||||
<string name="egab_twitter_label">Twitter</string>
|
||||
<string name="egab_web_label">Web</string>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue