2014-03-28 6 views
0

내 응용 프로그램에서 내가 devolp에 관한 아이콘을 조정하고 싶습니다.안드로이드에서 아이콘을 바꾸는 방법은?

이것은 내가 자르고있는 튜토리얼의 링크입니다. "https://www.youtube.com/watch?v=lkadcYQ6SuY"

이것은 자습서에서 제공하고 작성한 예입니다.

지금은 내가 원하는 무엇을 보여주기 위해 사진을 게시 아직 명성을하지 않아도하지만

은 간단 내가 다시에 대한 화살표을 원하고 (사용자 정의 만든) 대신 textbuttons의 를 전달

나를 도울 수있는 누군가 ...?

+0

그런 문제가 단지 버튼의를 생성 한 다음 앱에서 이미지 뷰 또는하여 ImageButton로 사용 무엇인지. – InnocentKiller

+0

이미지를 표시하겠습니까? –

답변

1

당신은 아래의 코드

<ImageButton 
    android:id="@+id/imageButton1" 
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content" 
    android:src="@drawable/your_image_name"/> 
0

으로 설정할 수 있습니다 간단한 버튼을 만들고 그림의 배경을 설정할 수 있습니다.

<Button 
     android:id="@+id/button" 
     android:background="@drawable/help" 
     android:contentDescription="@string/help" 
     android:gravity="bottom" 
     android:onClick="showHelp" /> 

아니면하여 ImageButton을 만들 수 있습니다

<ImageButton 
     android:id="@+id/sync" 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
     android:layout_gravity="right|center_vertical" 
     android:contentDescription="@string/sync" 
     android:background="@android:color/transparent"    
     android:src="@drawable/sync" /> 
0

당신을 시도하여 ImageButton이 (가 존재 나던 경우, 그것을 생성) 당김 폴더로 아이콘을 넣어 사용하고하여 ImageButton

<ImageButton 
    android:id="@+id/imageButton1" 
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content" 
    android:src="@drawable/yourImgName" /> 
관련 문제