Created
January 4, 2014 22:56
-
-
Save JulienDev/8261903 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.jumy.twitterclient.ui.component; | |
import android.content.Context; | |
import android.util.AttributeSet; | |
import android.widget.ImageButton; | |
import com.jumy.twitterclient.R; | |
public class ToolbarImageButton extends ImageButton { | |
private final int mWidth; | |
private final int mHeight; | |
public ToolbarImageButton(Context context, AttributeSet attrs) { | |
super(context, attrs); | |
mWidth = (int) getResources().getDimension(R.dimen.tweet_toolbar_button_width); | |
mHeight = (int) getResources().getDimension(R.dimen.tweet_toolbar_button_height); | |
} | |
@Override | |
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { | |
setMeasuredDimension(mWidth, mHeight); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment