I am using ListView but I want to replace listview by image when there is no item in my listview, is there anyway to perform such task in Android.

```
ll_result_trips = (ListView)findViewById(R.id.ll_result_trips);   
        Iv_no_activity = (ImageView) findViewById(R.id.Iv_no_activity);

if (data.size() > 0){
                                tv_no_of_result.setText(""+data.size() + " results found");
                               pAdapter adapter = new pAdapter(GhActivity.this,Data.data);
                                ll_result_trips.setVisibility(View.VISIBLE);
                                ll_result_trips.setAdapter(adapter);

                                Iv_no_activity.setVisibility(View.GONE);

                            }else {
                                tv_no_of_result.setText("No result found");
                                ll_result_trips.setVisibility(View.GONE);
                                Iv_no_activity.setVisibility(View.VISIBLE);

                            }

```

XML

```
<ListView
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_marginTop="10dp"
        android:layout_marginLeft="5dp"
        android:layout_marginRight="5dp"
        android:layout_marginBottom="5dp"
        android:padding="2dp"
        android:id="@+id/ll_result_trips"
        android:fontFamily="@font/montserrat_regular"
        />

    <ImageView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="center"
        android:src="@drawable/nothing"
        android:id="@+id/Iv_no_activity"/>

```