use of com.alexstyl.specialdates.ExternalNavigator in project Memento-Calendar by alexstyl.
the class FacebookProfileActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
AppComponent applicationModule = ((MementoApplication) getApplication()).getApplicationModule();
applicationModule.inject(this);
analytics.trackScreen(Screen.FACEBOOK_PROFILE);
setContentView(R.layout.activity_facebook_profile);
setupToolbar();
profilePicture = findById(this, R.id.facebook_profile_avatar);
userName = findById(this, R.id.facebook_profile_name);
findById(this, R.id.facebook_profile_fb_page).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
navigator.toFacebookPage();
}
});
FacebookFriendsPersister persister = new FacebookFriendsPersister(new AndroidPeopleEventsPersister(new EventSQLiteOpenHelper(this), marshaller, tracker));
navigator = new ExternalNavigator(this, analytics, tracker);
FacebookLogoutService service = new FacebookLogoutService(AndroidSchedulers.mainThread(), facebookSettings, persister, uiRefresher, onLogOut());
presenter = new FacebookProfilePresenter(service, this, facebookSettings);
presenter.startPresenting();
}
use of com.alexstyl.specialdates.ExternalNavigator in project Memento-Calendar by alexstyl.
the class RateDialog method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_rate_dialog);
AppComponent applicationModule = ((MementoApplication) getApplication()).getApplicationModule();
applicationModule.inject(this);
externalNavigator = new ExternalNavigator(this, analytics, tracker);
Views.findById(this, R.id.support_rate_button).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
externalNavigator.toPlayStore();
Toast.makeText(context(), R.string.support_thanks_for_rating, Toast.LENGTH_LONG).show();
askForSupport.onRateEnd();
finish();
}
});
Views.findById(this, R.id.support_cancel_button).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
askForSupport.onRateEnd();
finish();
}
});
TextView textDescription = Views.findById(this, R.id.support_description);
textDescription.append(smiley);
ImageView imageView = Views.findById(this, R.id.support_heroimage);
Animation pulse = AnimationUtils.loadAnimation(imageView.getContext(), R.anim.heartbeat);
imageView.startAnimation(pulse);
}
Aggregations