第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機(jī)立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

如何判斷用戶點(diǎn)擊了 TabHos t中的 tab?

如何判斷用戶點(diǎn)擊了 TabHos t中的 tab?

ABOUTYOU 2019-03-05 14:11:25
程序中的 TabHost 中有兩個 tabs。我想知道用戶什么時候點(diǎn)擊另一個 tab。如何判斷呢?Resources res = getResources(); // Resource object to get Drawables         TabHost tabHost = getTabHost();  // The activity TabHost         TabHost.TabSpec spec;  // Resusable TabSpec for each tab         Intent intent;  // Reusable Intent for each tab         // Create an Intent to launch an Activity for the tab (to be reused)         intent = new Intent().setClass(this, Main.class);         // Initialize a TabSpec for each tab and add it to the TabHost         spec = tabHost.newTabSpec("watchlist").setIndicator("Watchlist",res.getDrawable(R.drawable.icon)).setContent(intent);         tabHost.addTab(spec);         // Do the same for the other tabs         intent = new Intent().setClass(this, ARActivity.class);         spec = tabHost.newTabSpec("trending").setIndicator("Trending",res.getDrawable(R.drawable.icon)).setContent(intent);         tabHost.addTab(spec);         tabHost.setCurrentTab(0);
查看完整描述

1 回答

  • 1 回答
  • 0 關(guān)注
  • 439 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

購課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學(xué)習(xí)伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號