我将自定义主题应用于我的活动:<activity android:theme="@style/MyTheme">,其中我定义了我在此活动中使用的ActionBarSherlock的大小.像这样的东西:
<style name="MyTheme" parent="@style/Theme.Sherlock.Light.DarkActionBar">
<item name="actionBarSize">45dp</item>
<item name="android:actionBarSize">45dp</item>
</style>
Run Code Online (Sandbox Code Playgroud)
虽然这个尺寸适合纵向模式,但我觉得它在横向模式下太大了.如何在横向模式下应用不同的主题,或者如何在用户横向使用应用程序时更改操作栏大小?有什么建议?谢谢.
我不明白以下构造函数(src\corelib\tools\qstringbuilder.h中的Qt库的一部分),它是什么意思,它是如何工作的?
class QLatin1Literal
{
public:
int size() const { return m_size; }
const char *data() const { return m_data; }
template <int N>
QLatin1Literal(const char (&str)[N])
: m_size(N - 1), m_data(str) {}
private:
const int m_size;
const char * const m_data;
};
Run Code Online (Sandbox Code Playgroud)