Skip to content

Commit

Permalink
Merge pull request #31 from ethauvin/develop
Browse files Browse the repository at this point in the history
Author & Extra & About Company.
  • Loading branch information
mikemee authored Aug 30, 2017
2 parents 85132d5 + 71c6c60 commit 0d52e41
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ public enum BuildType {AMAZON, GOOGLE}
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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down Expand Up @@ -54,6 +55,21 @@ private MaterialAboutCard buildGeneralInfoCard(AboutConfig config) {
.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();
}

Expand Down Expand Up @@ -130,7 +146,7 @@ public void onClick(boolean b) {
}
}));
}
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)
Expand Down
1 change: 1 addition & 0 deletions library/src/main/res/values-pt/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
1 change: 1 addition & 0 deletions library/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down

0 comments on commit 0d52e41

Please sign in to comment.