use of com.alexstyl.specialdates.facebook.ScreenOrientationLock in project Memento-Calendar by alexstyl.
the class FacebookLogInActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
AppComponent applicationModule = ((MementoApplication) getApplication()).getApplicationModule();
applicationModule.inject(this);
analytics.trackScreen(Screen.FACEBOOK_LOG_IN);
setContentView(R.layout.activity_facebook_log_in);
Toolbar toolbar = Views.findById(this, R.id.memento_toolbar);
setSupportActionBar(toolbar);
avatar = Views.findById(this, R.id.facebook_import_avatar);
helloView = Views.findById(this, R.id.facebook_import_hello);
moreText = Views.findById(this, R.id.facebook_import_description);
progress = Views.findById(this, R.id.progress);
shareButton = Views.findById(this, R.id.facebook_import_share);
shareButton.setOnClickListener(shareAppIntentOnClick());
closeButton = Views.findById(this, R.id.facebook_import_close);
closeButton.setOnClickListener(onCloseButtonPressed());
webView = Views.findById(this, R.id.facebook_import_webview);
orientationLock = new ScreenOrientationLock();
facebookFriendsScheduler = new FacebookFriendsScheduler(thisActivity(), (AlarmManager) getSystemService(ALARM_SERVICE));
webView.setCallback(facebookCallback);
UserCredentials userCredentials = facebookUserSettings.retrieveCredentials();
if (savedInstanceState == null || userCredentials.equals(UserCredentials.ANNONYMOUS)) {
new CookieResetter(CookieManager.getInstance()).clearAll();
webView.loadLogInPage();
} else {
showData(userCredentials);
}
}
Aggregations