java - Howto know if tab is selected inside Fragment class -


एक टैब के टुकड़े के अंदर

सार्वजनिक वर्ग ClassViewFragment fragments का विस्तार करता है {

क्या कोई ऐसा समारोह है जिसमें मैं टैब चयन की घटना को पकड़ सकता हूं?

मुझे पता है मैं इस अंदर की मुख्य गतिविधि वर्ग को onTabSelected में पकड़ सकता हूं लेकिन मैं चाहता हूं क्या पता है कि टुकड़ा वर्ग के अंदर ऐसी चीज संभव है?

क्या आप TabHost ? अपने स्निपेट से कहना मुश्किल है, लेकिन अगर आप केवल TabHost.OnTabChangeListener को कार्यान्वित कर सकते हैं और अपने कोड को onTabChanged में डाल सकते हैं।


Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -