Skip to content

Commit

Permalink
Merge pull request anitab-org#381 from codingblazer/initial_bought_ac…
Browse files Browse the repository at this point in the history
…counted

Intial Possessions of Avatar reflected in Store now
  • Loading branch information
aanchal07 authored Jun 7, 2017
2 parents dcd322a + 1d34364 commit 749ab2c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,8 @@ public void onClick(View v) {
SessionHistory.currSessionID = 1;
SessionHistory.currScenePoints = 0;
getmDbHandler().resetPurchase();
getmDbHandler().setPurchasedHair(hair);
getmDbHandler().setPurchasedClothes(cloth);
Random random = new Random();
Integer healing = random.nextInt(101 - 1) + 1;
getmDbHandler().setHealing(healing);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,11 @@ protected void onCreate(Bundle savedInstanceState) {
linearLayoutHat.setVisibility(View.GONE);
linearLayoutNecklace.setVisibility(View.GONE);
imageViewSelectFeature.setImageDrawable(getResources().getDrawable(R.drawable.cloth1));
int isPurchased = getmDbHandler().getPurchasedClothes(1);
if (isPurchased == 1) {
imageViewSelectFeature.setAlpha((float) 0.5);
tvPaidSelectFeature.setText(getResources().getString(R.string.paid_feature));
}
TextView tv = (TextView) findViewById(R.id.textViewSelectFeature);
tvPoints = (TextView) findViewById(R.id.tvSelectFeaturePoints);
tvPoints.setText(String.valueOf(getmDbHandler().getPointsClothes(cloth)));
Expand Down Expand Up @@ -202,6 +207,11 @@ public void onClick(View v) {
linearLayoutHat.setVisibility(View.GONE);
linearLayoutNecklace.setVisibility(View.GONE);
imageViewSelectFeature.setImageDrawable(getResources().getDrawable(R.drawable.hair1));
int isPurchased = getmDbHandler().getPurchasedHair(1);
if (isPurchased == 1) {
imageViewSelectFeature.setAlpha((float) 0.5);
tvPaidSelectFeature.setText(getResources().getString(R.string.paid_feature));
}
TextView tv = (TextView) findViewById(R.id.textViewSelectFeature);
tvPoints = (TextView) findViewById(R.id.tvSelectFeaturePoints);
tvPoints.setText(String.valueOf(getmDbHandler().getPointsHair(hair)));
Expand Down

0 comments on commit 749ab2c

Please sign in to comment.