最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

android - Popup menu for tablet devices - Stack Overflow

programmeradmin3浏览0评论

I created popup menu for my app. When my app run on mobile then show like perfect but when run tablet devices then show small. Please help me to make pop-up menu reponsive design

Here is table view tablet devices show popup like this samll

Here is mobile view Mobile device show popup menu look fine

How to make pop-up menu for tablet devices like mobile

I want when my app run different screen size device then show like reponsive popupmenu using dimen xml

I used this code for show popup menu

PopupMenu popupMenu = new PopupMenu(getContext(),historyMenu);

            popupMenu.inflate(R.menu.history_menu);

            popupMenu.setGravity(Gravity.TOP | Gravity.END);
popupMenu.show();

And used this code for create history_menu xml

<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:tools=";
    xmlns:android=";>
    <item android:id="@+id/newTab"
        android:title="New tab"
        tools:ignore="HardcodedText"/>
    <item android:id="@+id/clearAllTab"
        android:title="Close all tab"
        tools:ignore="HardcodedText" />
</menu>
发布评论

评论列表(0)

  1. 暂无评论