Skip to content

Add an upgrade link in the app's drawer

Mickael Goubin edited this page Aug 3, 2013 · 1 revision

Once you've extended AdsFragmentActivity, you just need to use a few method to set up an upgrade link in the app's drawer...

this.setDrawerButton(true, R.id.update_to_premium);
this.setDrawerButtonView(getLayoutInflater().inflate(R.layout.drawer_update_to_premium, null, false));

this.setDrawerButton() allows you to set up the DrawerButton mode. The first parameter is whether or not you want to set up the link in the drawer to update to premium, adn the second is the id of the viewgroup that will contain this link.

this.setDrawerButtonView() allows you to give the view that you want to inflate in the viewgroup given earlier. It lets you set up a custom view which will integrate in your own design. A default custom view is also available.