Fix for login later not showing in walkthrough

pull/14/head
Tim Su 13 years ago
parent 869832159c
commit 3c92c653c8

@ -238,6 +238,9 @@ public class ActFmLoginActivity extends FragmentActivity implements AuthListener
errors = (TextView) findViewById(R.id.error); errors = (TextView) findViewById(R.id.error);
LoginButton loginButton = (LoginButton) findViewById(R.id.fb_login); LoginButton loginButton = (LoginButton) findViewById(R.id.fb_login);
if(loginButton == null)
return;
loginButton.init(this, facebook, this, new String[] { "email", loginButton.init(this, facebook, this, new String[] { "email",
"offline_access", "publish_stream" }); "offline_access", "publish_stream" });

@ -70,6 +70,9 @@ public class WelcomeWalkthrough extends ActFmLoginActivity {
position == mAdapter.getCount()-1 ? View.GONE : View.VISIBLE); position == mAdapter.getCount()-1 ? View.GONE : View.VISIBLE);
if(currentPage == mAdapter.getCount()-1) { if(currentPage == mAdapter.getCount()-1) {
if(findViewById(R.id.fb_login) != null) {
setupLoginLater();
} else {
OnClickListener done = new OnClickListener() { OnClickListener done = new OnClickListener() {
@Override @Override
public void onClick(View arg0) { public void onClick(View arg0) {
@ -80,15 +83,6 @@ public class WelcomeWalkthrough extends ActFmLoginActivity {
currentView.findViewById(R.id.welcome_walkthrough_image).setOnClickListener(done); currentView.findViewById(R.id.welcome_walkthrough_image).setOnClickListener(done);
} }
} }
@Override
protected void initializeUI() {
if(mAdapter == null)
return;
if(currentPage == mAdapter.getCount()-1 && findViewById(R.id.fb_login) != null) {
super.initializeUI();
setupLoginLater();
}
} }
protected void setupPWLogin() { protected void setupPWLogin() {

Loading…
Cancel
Save