I'd like to add a Button
like this one below into my ListView
when the list is empty using the setEmptyView()
method.
Is there a built-in style in Android for this? Because I noticed that a few apps are using exactly the same Button
style.
I'd like to add a Button
like this one below into my ListView
when the list is empty using the setEmptyView()
method.
Is there a built-in style in Android for this? Because I noticed that a few apps are using exactly the same Button
style.
Look at this link: Add Items to ListView - Android
It shows the correct Android resource to use, which shows a green "+" symbol on the ImageButton.
To be precise:
<ImageButton
android:id="@+id/moreImageButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:contentDescription="@string/image_button_delete"
android:src="@android:drawable/ic_input_add" />
Short answer: No, this is not a standard Button
.
However, you can add a similar Button
by using an ImageView
. You just have to design/download something you like.