Can someone explain to me why this is happening?
I have a pretty simple class extending TextView. When I set the background color to Color.BLUE, the indentation works fine. When I change the background resource to android.R.drawable.list_selector_background, my add-on no longer applies. What is F?
Here is my user interface class:
public class GhostDropDownOption extends TextView { TextView text_view; public GhostDropDownOption(Context context, AttributeSet attrs) { super(context, attrs); setup(context); } public GhostDropDownOption(Context context) { super(context); setup(context); } private void setup(Context context) { this.setClickable(false);
And I use it in a layout like this:
<trioro.voyeur.ui.GhostDropDownOption android:id="@+id/tv_dropdown_option_1" android:layout_width="fill_parent" android:layout_height="0dip" android:layout_weight="1" android:gravity="center_vertical" android:text="@string/request_control_dropdown_option_1" android:textColor="#000000" android:padding="10dip"/>
And this is the result of changing the background: 
android android view
raydowe
source share