title: isEnabled() with Adapter Android
body: <p>I am using below code to disable <code>ListView</code> item. Now, the problem is that after disabling one item, if user clicks on another item, It disables present item but removes last item from disabling.<Br><br>
  How to prevent this problem ?</p>
  
  <pre><code>    int pos;
      SimpleAdapter adapter = new SimpleAdapter(this, arrlist, R.layout.topicwisequestion, new String[] { "option" }, new int[] { R.id.option }) {
  
                  public boolean isEnabled(int position) {
                      if (position != 0) {
                          if (position == pos) {
                              return false;
                          } else {
                              return true;
                          }
                      } else {
                          return true;
                      }
                  }
              };
  
              lvTWOptions.setAdapter(adapter);
  
              lvTWOptions.setOnItemClickListener(new OnItemClickListener() {
  
                  public void onItemClick(AdapterView&lt;?&gt; parent, View view,
                          int position, long id) {
  
                      pos = position;
                  }
              });
  </code></pre>