Android ActionBar XML attributes issue



I followed the instruction in http://ift.tt/xEzcH9 to make action bars. Basically, it works for one activity but not the other.. after change XML attribute to 'android' instead of what the developer sugguested 'yourapp' from xmlns:yourapp="http://ift.tt/GEGVYd", it works for the one that failed initially


What is the problem here?


Following are the codes for each menu This works for OutputPaymentActivity but NOT OutputRefinanceActivity



<menu xmlns:android="http://ift.tt/nIICcg"
xmlns:slc="http://ift.tt/GEGVYd"
xmlns:tools="http://ift.tt/LrGmb4"
tools:context="com.example.simpleloancalculator.OutputPaymentActivity" >

<item
android:id="@+id/email"
slc:showAsAction="ifRoom|withText"
android:icon="@drawable/ic_action_email"
android:title="@string/email"/>

</menu>


vice versa:



<menu xmlns:android="http://ift.tt/nIICcg"
xmlns:tools="http://ift.tt/LrGmb4"
tools:context="com.example.simpleloancalculator.OutputRefinanceActivity" >


<item
android:id="@+id/email"
android:icon="@drawable/ic_action_email"
android:title="@string/email"
android:showAsAction="ifRoom|withText"/>

</menu>


Thank you!


No comments:

Post a Comment