Panagiotis Triantafyllou

my rewards fragment

package ly.warp.sdk.activities;
import android.content.Context;
import android.os.Bundle;
import android.view.MenuItem;
import android.widget.Toast;
......@@ -12,15 +13,14 @@ import com.google.android.material.bottomnavigation.BottomNavigationView;
import com.google.android.material.navigation.NavigationBarView;
import java.util.ArrayList;
import java.util.HashMap;
import io.github.inflationx.viewpump.ViewPumpContextWrapper;
import ly.warp.sdk.R;
import ly.warp.sdk.fragments.HomeFragment;
import ly.warp.sdk.fragments.LoyaltyFragment;
import ly.warp.sdk.fragments.MyRewardsFragment;
import ly.warp.sdk.io.callbacks.CallbackReceiver;
import ly.warp.sdk.io.models.Campaign;
import ly.warp.sdk.io.models.CampaignList;
import ly.warp.sdk.io.models.Consumer;
import ly.warp.sdk.io.models.CouponList;
import ly.warp.sdk.io.models.UnifiedCoupon;
import ly.warp.sdk.io.request.WarplyGetCampaignsRequest;
......@@ -89,10 +89,22 @@ public class BaseFragmentActivity extends FragmentActivity implements Navigation
.addToBackStack(null)
.commit();
return true;
} else if (itemId == R.id.menu_profile) {
mFragmentToSet = MyRewardsFragment.newInstance();
getSupportFragmentManager().beginTransaction()
.replace(R.id.fl_fragment, mFragmentToSet)
.addToBackStack(null)
.commit();
return true;
}
return false;
}
@Override
public void attachBaseContext(Context newBase) {
super.attachBaseContext(ViewPumpContextWrapper.wrap(newBase));
}
// ===========================================================
// Methods
// ===========================================================
......
This diff is collapsed. Click to expand it.