title: how to launch datepicker dialog everytime from action bar navigation menu
body: <p>I am using Actionbar dropdown navigation list ( mode <strong>ActionBar.NAVIGATION_MODE_LIST</strong>) in my app. </p>
  
  <p>I am trying to launch a dialog on one of the item is chosen. Used the call back to get the position and could show the dialog.</p>
  
  <pre><code>public boolean onNavigationItemSelected(int position, long id) {
  
  }
  </code></pre>
  
  <p>But when user doesn't choose any action on the dialog, or dismisses it, or user again chooses the drop down menu and chooses the same item, i need to show the dialog again. But the '<strong>onNavigationItemSelected</strong>' won't be triggered if the same item is selected again. A</p>
  
  <p>I have implemented a custom SpinnerAdapter and overriden, 'getView' (title for corresponding item) and getDropDownView' (drop down item).I could change the title, but i wanted to launch the dialog every time a specific item is chosen from the drop down.</p>
  
  <p><strong>'Moves'</strong> popular app uses a similar approach. The launch screen has spinner on the action bar with three options <strong>'Today' 'Yesterday' 'Specific day'.</strong> The app could able to launch the (datepicker dialog) on every time the 'specific day' item is chosen. I am trying to implement the exact UI pattern. Couldn't get the clue how to achieve it. </p>
  
  <p>I did try setting onClick listener for the particular dropdown item. It kinda of worked.
  But the dropdown menu was not dismissed, after clicking on the item which had set onClick event. </p>
  
  <p>Since we absorb the click event,framework doesn't perform background state change for that particular item too.</p>
  
  <p>One thing to note on 'Moves' app is as soon as 'Specific day' is chosen, it doesn't set the selected item as 3rd option, navigation still remains on the previous selected item, only the datepicker dialog is shown. </p>
  
  <p>I tried implementing onTouch Listener and basically dint absorb the click events, 
  launched dialog as soon as first touch event is made (ACTION_DOWN). It did dismisses the dropdown menu after clicking and showed background state change. But it doesn't bring the good user experience as we need to launch dialog  only when user completes the click action. </p>
  
  <pre><code>            holder.title.setOnTouchListener(new View.OnTouchListener() {
                  @Override
                  public boolean onTouch(View v, MotionEvent event) {
                      showTimePickerDialog();
                      return false;
                  }
              }
  </code></pre>
  
  <p>Wondering how moves app would have done. Any insights how to achieve this behaviour. ?</p>
  
  <p><img src="https://i.stack.imgur.com/U6cz8m.png" alt="enter image description here"></p>