Skip to content

Commit

Permalink
Merge branch 'master' into androidMaxImages
Browse files Browse the repository at this point in the history
  • Loading branch information
m1ga authored Aug 21, 2024
2 parents f5ab733 + dfb1b5c commit 90d5b39
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
*/
package ti.modules.titanium.ui.widget.tabgroup;

import org.appcelerator.kroll.KrollDict;
import org.appcelerator.kroll.common.Log;
import org.appcelerator.titanium.TiBaseActivity;
import org.appcelerator.titanium.TiC;
Expand Down Expand Up @@ -412,6 +413,17 @@ public void onTabUnselected(TabLayout.Tab tab)
@Override
public void onTabReselected(TabLayout.Tab tab)
{
if (tab != null) {
int index = tab.getPosition();
if ((index >= 0) && (index < this.tabs.size())) {
TiViewProxy tabProxy = this.tabs.get(index).getProxy();
if (tabProxy != null && tabProxy.hasListeners(TiC.EVENT_SELECTED)) {
KrollDict data = new KrollDict();
data.put("index", index);
tabProxy.fireEvent(TiC.EVENT_SELECTED, data, false);
}
}
}
}

public void setTabMode(int value)
Expand Down

0 comments on commit 90d5b39

Please sign in to comment.