2013-01-29 2 views
1

맞춤 제목 표시 줄에서 내 앱 아이콘의 크기를 변경하고 싶습니다. 여기 내 코드는 지금까지의 :사용자 정의 레이아웃의 아이콘 크기 Android

<LinearLayout 
xmlns:android="http://schemas.android.com/apk/res/android" 
android:orientation="horizontal" 
android:layout_width="fill_parent" 
android:layout_height="fill_parent" 
android:gravity="center_vertical" 
android:paddingLeft="5dip" 
android:background="#000000"> 

<ImageView 
    android:id="@+id/header" 
    android:src="@drawable/ic_launcher" 
    android:layout_width="wrap_content" 
    android:layout_height="fill_parent" 
    android:adjustViewBounds="true" 
    android:scaleType="fitXY"/> 

</LinearLayout> 

내 styles.xml 파일은 다음과 같습니다

<style name="CustomWindowTitleBackground"> 
    <item name="android:background">#00000000</item> 
    </style> 

    <style name="CustomTheme" parent="android:Theme"> 
    <item name="android:windowTitleSize">30dip</item> 

    <item name="android:windowTitleBackgroundStyle">@style/CustomWindowTitleBackground</item> 
</style> 

이 제목 표시 줄의 왼쪽에있는 아이콘을 생성하지만 어떻게 내가 아이콘의 크기를 변경할 수 있습니까? 나는 아이콘이 조금 더 커지길 바래.

+0

[Android asset studio] (http://android-ui-utils.googlecode.com/hg/asset-studio/dist/index.html)를 사용하지 않는 이유는 무엇입니까? – thepoosh

+0

@thepoosh에 감사드립니다. 나는 그것을 몰랐다. 하지만 내 특정 문제에 대해 제안 할 수 있습니까? –

답변

3

아마도 ImageView에 특정 DP 속성을 설정해야합니다. DP와 함께 붙어 모든 장치에서 잘 확장됩니다. 이와 같이 :

<ImageView 
    android:id="@+id/header" 
    android:src="@drawable/ic_launcher" 
    android:layout_width="48dp" 
    android:layout_height="48dp" 
    android:adjustViewBounds="true" 
    android:scaleType="fitXY"/> 
+0

그것은 부저를 일했다 :) 당신은 나의 날 친구를 구했다. –

관련 문제