문제

I'm having trouble figuring out why my app logo in the actionbar appears larger on a nexus 7 vs a nexus 5. I'm using the actionbar in the support library. They're both running android 4.2.2

Nexus 5 (good)

enter image description here

Nexus 7 (bad)

enter image description here

Here are the logo image resources.

What can I do to fix?

도움이 되었습니까?

해결책

The problem because of different dimension of the devices.You can fix it by alter your images for two different dpi.xhdpi for nexus 7 under the resolution of 1920 x 1200 pixels rate.xxhdpi for nexus 5 under the resolution of 1080 x 1920 pixels rate.

다른 팁

Just a shot in the dark: Do you have any different layouts or drawables based on the dpi like xhdpi or xxhdpi ? nexus 5 comes under xxhdpi whereas nexus 7 is xhdpi.So if you are setting the resources differently, that could be your issue.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top