I\'m searching everywhere and not finding what I want, I\'m starting to think that this is impossible.
Here\'s the question: I have a google button for sign in, it\'
I have your question solution. I tried this always for custom SignIn Button for google plus.
Try this it is tested by me.
Here is the Code.
xml layout
Method for customisation
private void googleBtnUi() {
// TODO Auto-generated method stub
SignInButton googleButton = (SignInButton) findViewById(R.id.google_button);
googleButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
}
});
for (int i = 0; i < googleButton.getChildCount(); i++) {
View v = googleButton.getChildAt(i);
if (v instanceof TextView)
{
TextView tv = (TextView) v;
tv.setTextSize(14);
tv.setTypeface(null, Typeface.NORMAL);
tv.setText("My Text");
tv.setTextColor(Color.parseColor("#FFFFFF"));
tv.setBackgroundDrawable(getResources().getDrawable(
R.drawable.ic_launcher));
tv.setSingleLine(true);
tv.setPadding(15, 15, 15, 15);
return;
}
}
}
Add this code before return in method googleBtnUi()
ViewGroup.LayoutParams params = tv.getLayoutParams();
params.width = 100;
params.height = 70;
tv.setLayoutParams(params);