2
我一直在使用谷歌搜索,但失敗了。在actionbar選項卡中添加badgeview
這是代碼片段和結果,我目前有。
LinearLayout mLinear = (LinearLayout) inflater.inflate(R.layout.tab_layout, null);
TextView mTextView = (TextView) mLinear.findViewById(R.id.txt_title);
//mTextView.setLayoutParams(new LayoutParams(LayoutParams.))
mTextView.setGravity(Gravity.BOTTOM);
mTextView.setText("Update");
BadgeView mBadgeView = new BadgeView(this , mTextView);
mBadgeView.setText("2");
mBadgeView.setBadgePosition(BadgeView.POSITION_TOP_RIGHT);
mBadgeView.show();
Tab updates = mActionBar.newTab();
updates.setCustomView(null);
updates.setCustomView(mLinear);
updates.setTabListener(tabListener);
mActionBar.addTab(updates);
繼承人我真正想要的。
這是可能的actionbarsherlock選項卡?
是你能解決這個問題? –
不好意思。如果您在此找到解決方案。 – Spurdow