Android 如何更改actionOverflowButton的宽度/高度
我正在尝试更改溢出菜单按钮的大小。我已经将实际图标从默认的3个点更改为我自己的绘图设置图标。代码如下: styles.xmlAndroid 如何更改actionOverflowButton的宽度/高度,android,Android,我正在尝试更改溢出菜单按钮的大小。我已经将实际图标从默认的3个点更改为我自己的绘图设置图标。代码如下: styles.xml <resources> <!-- Base application theme. --> <style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar"> <!-- Customize your theme here. -->
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
<item name="android:colorForeground">@color/colorPrimaryDark</item>
<item name="android:actionOverflowButtonStyle">@style/ToolbarOptions</item>
</style>
<!--Toolbar-->
<style name="ToolbarOptions" parent="Theme.AppCompat.Light.NoActionBar">
<item name="android:src">@drawable/settings</item>
<item name="android:contentDescription">settings</item>
<item name="android:width">9dp</item>
<item name="android:height">9dp</item>
</style>
</resources>
那么如何更改设置图标的大小呢?我已经更改了下面样式标记中的宽度和高度,但保持不变 浏览此链接此链接也可能有助于签出第二个复制的代码,但它仍然不起作用。我认为您需要按照标准大小创建图标查看此链接您是否可以发布您的
@drawable/settings
?浏览此链接此链接也可能有助于签出第二个复制的代码,但它仍然不起作用。我您是否认为需要按照标准尺寸创建图标检查此项您是否可以发布您的@drawable/settings
?
public class Home extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_home);
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.home_menu, menu);
return true;
}
}