i have the following shape
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
<gradient android:angle="360" android:endColor="@color/LightBlue" android:startColor="@color/DarkBlue"/>
<corners android:topRightRadius="10dp" android:bottomLeftRadius="10dp"/>
</shape>
and this button
<Button android:id="@+id/butLeft" android:layout_width="25dp"
android:layout_height="@dimen/contentTabHeight" android:background="@drawable/lefttabbackground"
android:layout_toRightOf="@id/contentLeft"
android:layout_centerVertical="true"></Button>
now what i do is i have a custom animation that changes the contentleft(linearlayout) leftmargin to -200 and then when you click the button i slowly bring the left margin to 0. So basicly a slide out panel.
The problem is if i make the leftmargin of the contentleft -200 i cant click the button if i make it -199 part of contentleft is sticking out and then the button only work a little from the left (looks like 1px) but not the rest of the button.
I tried it without animation and it does the same thing you see the button but if you tap it it does not work.
Whats going on. Worse case scenario i dont mind some of contentleft sticking out but it will be nice not to show at all.
Try this keep your button width image little bit more….
Some part from right side make it transparent.
It will not display and you can also get tap event
hope this will help you….!