Android TabLayout select first Tab on Startup
<p>I'm using TabLayout from Android Design Library. I have multiple tabs and each Tab has an action when it is selected. So I have an attribute startSelection, which performs </p>

<pre><code>tabLayout.getTabAt(startSelection).select();
</code></pre>

<p>This selects the tab and performs the action for this tab. It works fine for each Tab except the first one, which is automatically selected on Startup without (!) performing the action. Does anyone have a solution for this?</p>

<p>I don't want to use the onTabReselected method, because this causes another behaviour of the TabLayout. Also selecting the second tab and selecting the first tab afterwards is no good solution.</p>

<p>Best regards</p>