Skip to content

Commit

Permalink
FloatingVolume: Redirect to xda labs or play store based on package name
Browse files Browse the repository at this point in the history
Signed-off-by: Adam Myczkowski <[email protected]>
  • Loading branch information
Adam Myczkowski committed Dec 27, 2018
1 parent e92f98b commit 0d89109
Showing 1 changed file with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
package com.android.mycax.floatingvolume;

import android.content.Context;
import android.os.Build;
import android.os.Bundle;

import android.view.View;

import com.marcoscg.easyabout.EasyAboutFragment;
import com.marcoscg.easyabout.helpers.AboutItemBuilder;
import com.marcoscg.easyabout.items.AboutCard;
import com.marcoscg.easyabout.items.AboutItem;
import com.marcoscg.easyabout.items.NormalAboutItem;
import com.marcoscg.easyabout.items.PersonAboutItem;
import com.marcoscg.licenser.Library;
Expand Down Expand Up @@ -79,9 +81,13 @@ public void onClick(View view) {

addCard(new AboutCard.Builder(context)
.setTitle(R.string.support)
.addItem(AboutItemBuilder.generatePlayStoreItem(context)
.setTitle(R.string.rate_application)
.setIcon(R.drawable.ic_star_border_black_24dp))
.addItem(BuildConfig.APPLICATION_ID == "com.android.mycax.floatingvolume" ?
AboutItemBuilder.generateLinkItem(context, "https://labs.xda-developers.com/store/app/com.android.mycax.floatingvolume")
.setTitle(R.string.rate_application)
.setIcon(R.drawable.ic_star_border_black_24dp) :
AboutItemBuilder.generatePlayStoreItem(context)
.setTitle(R.string.rate_application)
.setIcon(R.drawable.ic_star_border_black_24dp))
.addItem(AboutItemBuilder.generateLinkItem(context, "https://github.com/MyczkowskiAdam/FloatingVolume/issues/new")
.setTitle(R.string.bug_report)
.setIcon(R.drawable.ic_bug_report_black_24dp))
Expand Down

0 comments on commit 0d89109

Please sign in to comment.