【转】 Android 各种常规图标尺寸

1. 程序启动图标:

LDPI (Low Density Screen,120 DPI),其图标大小为 36 x 36 px。

MDPI (Medium Density Screen, 160 DPI),其图标大小为 48 x 48 px。

HDPI (High Density Screen, 240 DPI),其图标大小为 72 x 72 px。

xhdpi (Extra-high density screen, 320 DPI),其图标大小为 96 x 96 px。

xxhdpi(xx-high density screen, 480 DPI),其图标大小为144 x 144 px。

2.底部菜单图标

1. 大屏:
1. 完整图片(红色): 72 x 72 px
2. 图标(蓝色): 48 x 48 px
3. 图标外边框(粉色): 44 x 44 px

1. 中屏:
1. 完整图片: 48 x 48 px
2. 图标: 32 x 32 px
3. 图标外边框: 30 x 30 px

1. 小屏:
1. 完整图片: 36 x 36 px
2. 图标: 24 x 24 px
3. 图标外边框: 22 x 22 px

3. 弹出对话框顶部图标

小屏 24 x 24 px Low density screen (ldpi)
中屏 32 x 32 px Medium density screen (mdpi)
大屏 48 x 48 px High density screen (hdpi)

4. 长列表内部列表项图标

小屏 24 x 24 px Low density screen (ldpi)
中屏 32 x 32 px Medium density screen (mdpi)
大屏 48 x 48 px High density screen (hdpi)

5. 底部或顶部tab标签图标

1. 大屏 (hdpi) screens:
1. 完整图片(红色): 48 x 48 px
2. 图标(蓝色): 42 x 42 px

1. 中屏 (mdpi) screens:
1. 完整图片: 32 x 32 px
2. 图标: 28 x 28 px

1. 小屏(ldpi) screens:
1. 完整图片: 24 x 24 px
2. 图标: 22 x 22 px
 

6. 底部状态栏图标

ldpi (120 dpi) 18 x 18 px 小屏
mdpi (160 dpi) 24 x 24 px 中屏
hdpi (240 dpi) 36 x 36 px 大屏
xhdpi (320 dpi) 48 x 48 px 特大屏


原文地址:http://www.jcodecraeer.com/a/anzhuokaifa/androidkaifa/2015/0120/2331.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
在 Mapbox 中实现图标的方法如下: 1. 定义一个自定义的 MarkerView,该 MarkerView 继承自 Mapbox 的 MarkerView 类,并实现旋功能。 ``` public class RotatingMarkerView extends MarkerView { private ImageView markerImageView; private float currentRotation = 0f; public RotatingMarkerView(Context context) { super(context); init(context); } private void init(Context context) { LayoutInflater.from(context).inflate(R.layout.layout_marker_view, this); markerImageView = findViewById(R.id.marker_icon); } public void setRotation(float rotation) { currentRotation = rotation; markerImageView.setRotation(rotation); } public float getCurrentRotation() { return currentRotation; } } ``` 2. 在布局文件中定义 MarkerView 的外观,例如: ``` <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="wrap_content" android:layout_height="wrap_content"> <ImageView android:id="@+id/marker_icon" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/ic_marker" /> </RelativeLayout> ``` 3. 在将 MarkerView 添加到地图上时,设置旋角度即可,例如: ``` RotatingMarkerView markerView = new RotatingMarkerView(context); markerView.setRotation(45f); mapboxMap.addMarker(new MarkerOptions().position(latLng).icon(MarkerViewUtils.convertViewToBitmap(markerView))); ``` 其中,45f 表示旋的角度,可以根据实际需求进行调整。 这样,就可以在 Mapbox 中实现图标了。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值