Facebook Android sdk has a com.facebook.widget.LoginButton
I want to put my own image for the Login button. Is it possible ?
So far i\'ve tried
An other way
loginButton = (LoginButton) findViewById(R.id.fb_login_button);
loginButton.setVisibility(View.GONE);
ImageView ivFbCustomButton = (ImageView) findViewById(R.id.iv_fb_custom_button);
ivFbCustomButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
com.facebook.login.widget.LoginButton btn = new com.facebook.login.widget.LoginButton(FacebookActivity.this);
btn.performClick();
}
});
Note:
You have to write the code for two buttons in XML file. One is for default facebook button (We are hiding it at initial step). Second one is for custom button