Click here to Skip to main content
15,893,161 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
"This LinearLayout layout or its LinearLayout parent is useless; transfer the background attribute to the other view"
i was dev a simple android app suduko when i 'm facing prob get'n this msg in exclamation, no error still app nt run'n
Posted
Comments
Richard MacCutchan 4-Mar-12 8:40am    
Try spelling words in full and explaining exactly what problem you are facing and people will try to help you. Please edit your question and add the relevant details.
dare2dash 4-Mar-12 9:20am    
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:background="@+colors/background"
android:padding="15dip" android:orientation="horizontal"
android:layout_width="fill_parent" android:layout_height="fill_parent">
--- <LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingLeft="20dip"
android:paddingRight="20dip"
android:layout_gravity="center">
---- <TableLayout android:layout_height="wrap_content"
android:layout_width="wrap_content" android:layout_gravity="center"
android:stretchColumns="*" >
<TableRow>
i have coded this in main.xml ,bt it is giving about msgat ----,but no errors,n wn i run it it shows ,"unfortunately sudoko has stooped work'n" n then error log gives error"main.xml: Failed to convert @+colors/background into a drawable"
where colors.xml is just

<resources>
<color name="background">#3500ffff
merridus 12-Mar-12 16:54pm    
Should it not just be: android:background="@color/background" if you have a colour defined in your color.xml file a color called background

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900