0

i wish to adjust icons in my application that i'm about to devolp.

this is the link of the tutorial that i'm folowing . "https://www.youtube.com/watch?v=lkadcYQ6SuY"

this is the example given and created in the tutorial .

now i don't have the reputation yet to post pictures to show you what i want BUT

simple i want arrows for back and forward (custom created) instead of textbuttons

anyone who can help me ... ?

SeeSharp
  • 93
  • 2
  • 3
  • 6

3 Answers3

0

You can use ImageButton, put your icon into drawable folder(if it doesnt exist, create it), and set it to your imageButton

<ImageButton
    android:id="@+id/imageButton1"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:src="@drawable/yourImgName" />
Palejandro
  • 2,092
  • 5
  • 26
  • 38
0

try the below code

  <ImageButton
    android:id="@+id/imageButton1"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:src="@drawable/your_image_name"/>
VladL
  • 12,769
  • 10
  • 63
  • 83
User10001
  • 1,295
  • 2
  • 18
  • 30
0

You can create a simple Button and set its Background for picture.

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

Or you can create 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" />
Keya
  • 859
  • 3
  • 9
  • 17