标签:sethasembeddedtabs actionbar tab actionbarsherlock pad
强制显示为单行
try { Method setHasEmbeddedTabsMethod = mActionBar.getClass().getDeclaredMethod( "setHasEmbeddedTabs", boolean.class); setHasEmbeddedTabsMethod.setAccessible(true); setHasEmbeddedTabsMethod.invoke(mActionBar, true); } catch (Exception ignore) { }
强制显示为两行
try { Method setHasEmbeddedTabsMethod = mActionBar.getClass().getDeclaredMethod( "setHasEmbeddedTabs", boolean.class); setHasEmbeddedTabsMethod.setAccessible(true); setHasEmbeddedTabsMethod.invoke(mActionBar, false); } catch (Exception ignore) { }
标签:sethasembeddedtabs actionbar tab actionbarsherlock pad
原文地址:http://blog.csdn.net/tongcpp/article/details/45826011