Theo
Theo

Reputation: 3149

Arrows for list view in Android

Is there any way where I can have default arrows in a list view,without reading them as an array from the xml? If I use ImageViews for arrows,then they might become really ugly. I am bad in graphic design.

Thank you.

EDIT

I found this site that could be useful to many people.

material design icons

Upvotes: 3

Views: 4603

Answers (4)

Nirel
Nirel

Reputation: 1925

You can use custom layout to make the arrow as a part of the background of the list view row, look here

you will be able to do something like this:

embedded image

Just follow the instructions

Upvotes: 2

SANAT
SANAT

Reputation: 9267

Look at this for android icons for different uses https://romannurik.github.io/AndroidAssetStudio/. You can use it for your list item row. If you want arrow like ios then create row ui and take imageview for arrow.

Row XML :

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="match_parent" >

    <TextView
        android:id="@+id/tvText"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:text="Your Text"/>

    <ImageView
        android:id="@+id/ivArrow"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentRight="true"
        android:src="@drawable/arrow" >

    </ImageView>
</RelativeLayout>

Upvotes: 1

lgvalle
lgvalle

Reputation: 3762

You can always use this Unicode codes to draw arrows as text (if that is what you want)

  • U+2192
  • U+25B6
  • U+2794

More codes here: http://unicode-table.com/en/sets/arrows-symbols/

Upvotes: 2

GmloMalo
GmloMalo

Reputation: 677

If you are bad at graphic design you can use free resources from net instead.

Here you have the Google free icon resources you can use with material style where you can find some arrows

Google icon pack

Upvotes: 1

Related Questions