Swipe to Delete Not working from the Top item of the listview but from the last item of list view
<p>I am Using the <a href="https://github.com/baoyongzhang/SwipeMenuListView" rel="nofollow">this</a> as swipe to delete. but I am having problem in implementing only the delete menu item of the list. </p>

<p>What I am doing is creating just one single delete Item. I really do not want to use any other item such like Open as shown in demo. </p>

<p>here is my design </p>

<pre><code>   &lt;?xml version="1.0" encoding="utf-8"?&gt;

&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="#dadada"&gt;


    &lt;RelativeLayout                 
        xmlns:android="http://schemas.android.com/apk/res/android"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_below="@+id/segmented_buttons"&gt;

        &lt;android.support.v4.widget.SwipeRefreshLayout xmlns:android="http://schemas.android.com/apk/res/android"
            android:id="@+id/swipe_refresh_layout"
            android:layout_width="match_parent"
            android:layout_height="match_parent"&gt;

            &lt;FrameLayout
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:clickable="false"
                android:orientation="vertical"&gt;


                &lt;!--&lt;ScrollView--&gt;
                &lt;!--android:layout_width="match_parent"--&gt;
                &lt;!--android:layout_height="match_parent"--&gt;
                &lt;!--android:layout_gravity="center"--&gt;
                &lt;!--android:gravity="center"--&gt;
                &lt;!--android:clickable="false"&gt;--&gt;
                &lt;TextView
                    android:id="@+id/swipeRefreshLayout_emptyView"
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:layout_gravity="center|center_vertical"
                    android:enabled="false"
                    android:gravity="center"
                    android:visibility="gone" /&gt;


                &lt;com.baoyz.swipemenulistview.SwipeMenuListView
                    android:id="@+id/listView"
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:clickable="true"
                    android:clipChildren="false"
                    android:divider="@android:color/transparent"

                    android:dividerHeight="5.0sp" /&gt;

                &lt;!--&lt;/ScrollView&gt;--&gt;
            &lt;/FrameLayout&gt;


        &lt;/android.support.v4.widget.SwipeRefreshLayout&gt;
    &lt;/RelativeLayout&gt;


&lt;/RelativeLayout&gt;
</code></pre>

<p>and here is How I Am creating my menu  in my Fragment </p>

<pre><code>SwipeMenuCreator creator = new SwipeMenuCreator() {

        @Override
        public void create(SwipeMenu menu) {
              // create "delete" item
            SwipeMenuItem deleteItem = new SwipeMenuItem(
                    getActivity());
            // set item background
            deleteItem.setBackground(new ColorDrawable(Color.rgb(0xF9,
                    0x3F, 0x25)));
            // set item width
            deleteItem.setWidth(dp2px(90));
            // set a icon
            deleteItem.setIcon(R.drawable.ic_delete);
            // add to menu
            menu.addMenuItem(deleteItem);
        }
    };
</code></pre>

<p>here is how I am setting creator </p>

<pre><code>// set creator
    mListView.setMenuCreator(creator);
</code></pre>

<blockquote>
  <p><strong>My Problem</strong> I have couple of problems regarding to the delete, as mentioned</p>
</blockquote>

<ol>
<li>When I have too many data in the list , say that the number of rows are 10 and need to scroll down , the delete option work like a charm even from the first row of the listview. </li>
<li>When there are lesser item in the list or if I continue to delete items from the bottom I mean the last row , when there are less item which do not need to scroll down, does not delete smoothly , it takes many times to refresh  list , or open and close again the menu right to left , takes many touch down on delete menu and then it delete some how after too many tries. </li>
<li>I do not know what is problem behind , but When I made the two menu , like Open and Delete as shown in the demo , then  I made both open and delete as delete button , so in Case 0 , and Case 1 , I wrote code of delete , then I noticed that the deleting is working every time when I touch on open , but again when I touch on delete it some times deletes the item or some time it takes to many tries. </li>
</ol>

<p>What could be problem ? Any guess ? Is there any work around ? </p>

<p>And Yeah On thing for sure , When I touch the delete menu it gives me a Log , look down below, It show me this in log , when I Touch to delete and delete is in fact not working , but when it does start working this message in log never shows up. </p>

<blockquote>
  <p>D/ViewRootImpl: ViewPostImeInputStage ACTION_DOWN</p>
</blockquote>

<p><strong>Edit One</strong> </p>

<blockquote>
  <p>Here is my whole code of adapter :</p>
</blockquote>

<pre><code>    public class SwipeListOfferAdapter extends BaseAdapter {
    private Activity activity;
    private LayoutInflater inflater;
    private ArrayList&lt;OfferStatusData&gt; offerList;
    OfferStatusData offerStatusData;


    public SwipeListOfferAdapter(Activity activity, List&lt;OfferStatusData&gt; offerList) {
        this.activity = activity;
        this.offerList = (ArrayList)offerList;
        inflater = (LayoutInflater) activity
                .getSystemService(Context.LAYOUT_INFLATER_SERVICE);
        // bgColors = activity.getApplicationContext().getResources().getStringArray(R.array.movie_serial_bg);
    }

    @Override
    public int getCount() {
        return offerList.size();
    }

    @Override
    public Object getItem(int location) {
        return offerList.get(location);
    }

    @Override
    public long getItemId(int position) {
        return position;
    }

    @Override
    public View getView(int position, View convertView, ViewGroup parent) {
        ViewHolder holder ;


        if (convertView == null) {
            convertView = inflater.inflate(R.layout.row_offer_status, null);

            holder = new ViewHolder();
         //   holder.tvCustomerName = (TextView) convertView.findViewById(R.id.tv_row_customer_name);
            holder.tvOfferName = (TextView) convertView.findViewById(R.id.row_offer_name);
           // holder.tvEmail = (TextView) convertView.findViewById(R.id.row_email);
            holder.tvPhoneNumber = (TextView) convertView.findViewById(R.id.row_phone_number);
            holder.tvAddress = (TextView) convertView.findViewById(R.id.row_address);
            holder.tvTmcBrand = (TextView) convertView.findViewById(R.id.row_tmc_brand);
            holder.tvStartEndTime = (TextView) convertView.findViewById(R.id.row_offer_time);
            holder.tvNoOfPerson = (TextView) convertView.findViewById(R.id.tv_row_total_person);
            holder.tvNoOfAcceptors = (TextView) convertView.findViewById(R.id.tv_row_total_acceptors);
            holder.tvMonth = (TextView) convertView.findViewById(R.id.tv_row_month);
            holder.tvDay = (TextView) convertView.findViewById(R.id.tv_row_day);
           // holder.tvCustomerName = (TextView) convertView.findViewById(R.id.tv_row_customer_name);

            convertView.setTag(holder);

        }
        else {
            holder = (ViewHolder) convertView.getTag();
        }
        if(offerList.size()&gt;0){

            offerStatusData = (OfferStatusData)offerList.get(position);
           // holder.tvCustomerName.setText(offerStatusData.getName());
            holder.tvOfferName.setText(offerStatusData.getOffer_name());
           // holder.tvEmail.setText(offerStatusData.getEmail());
            holder.tvPhoneNumber.setText(offerStatusData.getPhone_number());
            holder.tvAddress.setText(offerStatusData.getAddress());
            holder.tvTmcBrand.setText(offerStatusData.getTmc_brand());
            holder.tvStartEndTime.setText(offerStatusData.getStart_time()+"-"+offerStatusData.getEnd_time());
            holder.tvNoOfPerson.setText(offerStatusData.getNo_of_person());
            holder.tvNoOfPerson.setTextColor(Color.parseColor("#F66D0D"));
            holder.tvNoOfAcceptors.setText(offerStatusData.getCurrent_acceptors()+"/"+offerStatusData.getNo_of_person());
            holder.tvNoOfAcceptors.setTextColor(Color.parseColor("#2B5BD2"));
// holder.tvMonth.setText("july");
//                holder.tvDay.setText("29");
            String dateFromService = offerStatusData.getDate();
            String[] monthFromService = dateFromService.split("-");
            Log.d("date split", dateFromService.toString());
            holder.tvDay.setText(monthFromService[2].toString());
            holder.tvDay.setTextColor(Color.parseColor("#57902B"));
            holder.tvMonth.setText(getMonth(Integer.parseInt(monthFromService[1])));
            holder.tvMonth.setTextColor(Color.parseColor("#57902B"));
        }


        return convertView;



//        String color = bgColors[position % bgColors.length];
//        serial.setBackgroundColor(Color.parseColor(color));


    }
    void  delete (int post){


        offerList.remove(post);
    }
    class ViewHolder{

        TextView tvOfferName,tvPhoneNumber,tvAddress,
                tvTmcBrand,tvStartEndTime,tvNoOfPerson,tvNoOfAcceptors,tvMonth,tvDay;
    }
    public String getMonth(int month) {
        return  new DateFormatSymbols().getShortMonths()[month-1];
        // return new DateFormatSymbols().getMonths()[month-1];
    }
}
</code></pre>

<p>So I really do not know what is the main reason behind this , No clue left for me. Please tell me what could be the problem. </p>