Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
私はAppCompat を使用しており、ActionBar.Tabタブを設定するために使用していますが、今度はTab Heightを取得する必要がありますか?
ActionBar.Tab
Tab
どんな助けでも大歓迎です。
どちらでも使用できます
getToolbar().getHeight();
または AppCompatActivity を使用している場合
getSupportActionBar().getHeight();
ツールバーを設定したと仮定します。
乾杯
で試してください:
TabHost myTabHost= getTabHost(); int tabHeight = myTabHost.getTabWidget().getHeight();