Set text size of menu items in popup menu

I have created options using customized popup menu. Now, I want to set the text size of menu items. I am getting default text size this time. How can I achieve this? I don't want to use popup window. Is it possible to achive this using popup menu only?

Answers


I had the same problem. You can change the text size and color by adding this code to styles.xml and use it in manifest file. For me it worked.

 <style name="AppTheme" parent="AppBaseTheme">
    <item name="android:popupMenuStyle">@style/PopupMenu</item>
    <item name="android:textAppearanceLargePopupMenu">           @style/myPopupMenuTextAppearanceLarge</item>
    <item name="android:textAppearanceSmallPopupMenu">            @style/myPopupMenuTextAppearanceSmall</item>

    <!-- All customizations that are NOT specific to a particular API-level can go here. -->
</style>

<style name="PopupMenu" parent="@android:style/Widget.PopupMenu">
    <item name="android:popupBackground">@android:color/white</item>
    <item name="android:textColor">#FF01F0</item>
    <item name="android:textSize">12sp</item>
</style>


<style name="myPopupMenuTextAppearanceSmall" parent="@android:style/TextAppearance.DeviceDefault.Widget.PopupMenu.Small">
<item name="android:textColor">#545656</item>
<item name="android:textSize">15sp</item>
</style>
<style name="myPopupMenuTextAppearanceLarge" parent="@android:style/TextAppearance.DeviceDefault.Widget.PopupMenu.Large">
<item name="android:textColor">#545656</item>
<item name="android:textSize">25sp</item>
</style>

Need Your Help

GWT Editor Framework: Drop Down List

gwt editor requestfactory

I'm looking for someone to point me in the right direction (link) or provide a code example for implementing a drop down list for a many-to-one relationship using RequestFactory and the Editor fram...

Does using stateful web servers make sense?

web-applications architecture scalability

I am working on a web application, which historically was built on a PHP/MySQL stack.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.