title: How to custom the ui of com.facebook.widget.LoginButton
body: <p>I followed this tutorial (<a href="http://www.kpbird.com/2013/03/android-login-using-facebook-sdk-30.html" rel="nofollow">this</a>) to implement facebook login, although it can login and retrieve my email accordingly, the problem I would like to implement a custom login icon. </p>
  
  <p>This is my attempt login xml</p>
  
  <pre><code>   &lt;com.facebook.widget.LoginButton
          android:id="@+id/authButton"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_gravity="center_horizontal"
          android:layout_marginTop="30dp"
          android:src="@drawable/ic_launcher" /&gt;
  </code></pre>
  
  <p>The activity:</p>
  
  <pre><code>protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
      lblEmail = (TextView) findViewById(R.id.t);
  
      LoginButton authButton = (LoginButton) findViewById(R.id.authButton);
      authButton.setOnErrorListener(new OnErrorListener() {
  
          @Override
          public void onError(FacebookException error) {
              Log.i(TAG, "Error " + error.getMessage());
          }
      });
      // set permission list, Don't foeget to add email
      authButton.setReadPermissions(Arrays.asList("basic_info", "email"));
      // session state call back event
      authButton.setSessionStatusCallback(new Session.StatusCallback() {
  
          @SuppressWarnings("deprecation")
          @Override
          public void call(Session session, SessionState state,
                  Exception exception) {
  
              if (session.isOpened()) {
                  Log.i(TAG, "Access Token" + session.getAccessToken());
                  Request.executeMeRequestAsync(session,
                          new Request.GraphUserCallback() {
                              @Override
                              public void onCompleted(GraphUser user,
                                      Response response) {
                                  if (user != null) {
                                      Log.i(TAG, "User ID " + user.getId());
                                      Log.i(TAG,
                                              "Email "
                                                      + user.asMap().get(
                                                              "email"));
                                      lblEmail.setText(user.asMap()
                                              .get("email").toString());
                                  }
                              }
                          });
              }
  
          }
      });
  }
  
  @Override
  public void onActivityResult(int requestCode, int resultCode, Intent data) {
      super.onActivityResult(requestCode, resultCode, data);
      Session.getActiveSession().onActivityResult(this, requestCode,
              resultCode, data);
  }
  </code></pre>
  
  <p>Thanks</p>