last day (15 days later) » 

11:27 AM
0
Q: How to make 3D button in android

Malaika KhanI want to make a 3 dimensional button.. Please Provide a little bit understanding.. I am making XML for button specification but getting ERROR while making XML.. Error in an XML file: aborting build Thanks In advance

 
angrytools.com use this link to make Button in android.
 
@abhijeetdhumal i have already mentioned the error above..... aborting build
@AnujZunjarrao I already have search this link but please help me in XML Error Clearing thanks
 
can you please post your all XML code... may be there is very small error.
 
My XML has nothing except this line............. <?xml version="1.0" encoding="UTF-8"?>
 
Please add a root view or layout to your document.
hello
 
11:37 AM
how
 
tell me one think 1st where you store your xml file
like layout floder, vales folder
 
in new
darawable folder
by creating new
 
11:54 AM
okkk
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
>



</LinearLayout>
 
but in this link there no layout used
for XML working
 
you can not save xml without root elements
you have to give one spcific root element like linear, relative etc
 
ok Error resolved
now help me in button
tell me one thing
that in your provided link
buttonshape.xml has button feature
?
 
no its not button feature
its is custom xml file
we can give button attribute in that xml file
this xml save in value folder and you refer this xml to button
sorry save into drawable folder
like that
my xml file <?xml version="1.0" encoding="UTF-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true" >
<shape>
<solid
android:color="#F30410" />
<stroke
android:width="1dp"
android:color="#222222" />
<corners
android:radius="70dp" />
<padding
android:left="10dp"
android:top="10dp"
android:right="10dp"
android:bottom="10dp" />
</shape>
</item>
<item>
<shape>
<gradient
android:startColor="#FBC3CD"
android:endColor="#C41B3A"
android:angle="270" />
and my button code <Button
android:id="@+id/btnTextPrint"
android:layout_width="fill_parent"
android:layout_height="60dp"
android:background="@drawable/bg_color_blue"
android:enabled="true"
android:gravity="center"
android:text="Print Receipt"
android:textSize="30dp" />
 
12:13 PM
but you haven't use the layout lines
in this
code
 
12:52 PM
i used that check 1st line
<?xml version="1.0" encoding="UTF-8"?>
 

  last day (15 days later) »