Android Launching the current activity with different Intent Action
<p>[Update Solution]
Referring to the post in the link</p>

<p><a href="http://stackoverflow.com/questions/7263291/viewpager-pageradapter-not-updating-the-view">ViewPager PagerAdapter not updating the View</a></p>

<pre><code>public void onSomeButtonClicked(View view) { // registered to Button's android:onClick in the layout xml file
    Log.w(TAG,"Some button clicked !!");
    getIntent().setAction(IntentManager.Intents.ACTION_SPAWN_LIST_BY_SOMETHING);

    mViewPager.getAdapter().notifyDataSetChanged();
}

 // And inside my PagerAdapter
    @Override
    public int getItemPosition(Object object) {
        return 0;
    }
</code></pre>

<p>Fixed all my problems, i just used Intent.setAction().</p>

<p>[Update to below Post]</p>

<p>My problem is i have a ViewPager PagerAdapter in my Main Activity. On clicking one of the 3 buttons., any specific intent will be fired (i used intent, i could have gone with just State variable as well, just that i pass some Uri with the intent). What happens is., i do</p>

<pre><code>public void onSomeButtonClicked(View view) { // registered to Button's android:onClick in the layout xml file
    Log.w(TAG,"Some button clicked !!");
    getIntent().setAction(IntentManager.Intents.ACTION_SPAWN_LIST_BY_SOMETHING);

    mViewPager.getAdapter().notifyDataSetChanged();
}
</code></pre>

<p>This is why i was guessing maybe i should just do startActivity again, with the new Intent Action on the same Activity. </p>

<p>Spawning a new Activity, i would have to redraw every other view in the layout which is basically the same code, for the most part in the current activity.</p>

<p>Any suggestions here? Please help</p>

<p>[Original Post]</p>

<p>I have a PagerAdapter and 3 Buttons in the my Main Activity. This activity is enter from Main Launcher.</p>

<p>When i press any one of the buttons, the Intent Action is changed.</p>

<p>My question:</p>

<ol>
<li>The changed Intent action reflects some changed view in the ViewPager and <strong>does_not</strong> spawn a new Activity as such, only the view is updated.</li>
</ol>

<p>What approach should i take to get this task?</p>

<p>Can i start the currentActivity using startActivity()  and different Intent actions on button click? </p>

<p>or is there any other efficient way in android to do this?</p>

<p>[No need code, just explanation of logic / method would suffice]</p>

<p>Thanks in advance</p>
