KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
What I'm trying to do is define a common background for use in a LinearLayout which frequents my application on many of its Activitys. This particular layout is a header that shows on the top of each activity. What I'm trying to do is create a drawable that fills the linearlayout with a gradient and has a horizontal line below the gradient. Does anyone know if this is possible or do I have to do this sort of thing only with nested layouts. My attemptat the drawable xml is <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item> <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle"> <gradient android:startColor="#AA000000" android:endColor="#AA333333" android:angle="270" /> </shape> </item> <item> <shape android:shape="line"> <stroke android:width="3dp" android:color="#FFFFFFFF" android:dashWidth="1dp" android:dashGap="2dp" /> <size android:height="5dp" /> </shape> </item> </selector>
Tags (comma-separated)
Save Edits
Cancel