Search in sources :

Example 16 with MainActivity

use of com.frostwire.android.gui.activities.MainActivity in project frostwire by frostwire.

the class PromotionsAdapter method onSpecialOfferClick.

public void onSpecialOfferClick() {
    if (specialOfferLayout == R.layout.view_remove_ads_notification) {
        // take to buy remove ads screen
        PlayStore.getInstance().endAsync();
        MainActivity mainActivity = (MainActivity) getContext();
        Intent i = new Intent(getContext(), BuyActivity.class);
        mainActivity.startActivityForResult(i, BuyActivity.PURCHASE_SUCCESSFUL_RESULT_CODE);
    }
}
Also used : Intent(android.content.Intent) MainActivity(com.frostwire.android.gui.activities.MainActivity)

Aggregations

MainActivity (com.frostwire.android.gui.activities.MainActivity)16 Intent (android.content.Intent)8 Fragment (android.app.Fragment)2 BuildConfig (com.frostwire.android.BuildConfig)2 R (com.frostwire.android.R)2 Constants (com.frostwire.android.core.Constants)2 TransfersFragment (com.frostwire.android.gui.fragments.TransfersFragment)2 UIUtils (com.frostwire.android.gui.util.UIUtils)2 Offers (com.frostwire.android.offers.Offers)2 Activity (android.app.Activity)1 Context (android.content.Context)1 Configuration (android.content.res.Configuration)1 Uri (android.net.Uri)1 AsyncTask (android.os.AsyncTask)1 Handler (android.os.Handler)1 Looper (android.os.Looper)1 NavigationView (android.support.design.widget.NavigationView)1 LocalBroadcastManager (android.support.v4.content.LocalBroadcastManager)1 DrawerLayout (android.support.v4.widget.DrawerLayout)1 ActionBarDrawerToggle (android.support.v7.app.ActionBarDrawerToggle)1