Java Code Examples for com.actionbarsherlock.app.ActionBar#Tab
The following examples show how to use
com.actionbarsherlock.app.ActionBar#Tab .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ScrollingTabContainerView.java From CSipSimple with GNU General Public License v3.0 | 6 votes |
private TabView createTabView(ActionBar.Tab tab, boolean forAdapter) { //Workaround for not being able to pass a defStyle on pre-3.0 final TabView tabView = (TabView)mInflater.inflate(R.layout.abs__action_bar_tab, null); tabView.init(this, tab, forAdapter); if (forAdapter) { tabView.setBackgroundDrawable(null); tabView.setLayoutParams(new ListView.LayoutParams(ListView.LayoutParams.MATCH_PARENT, mContentHeight)); } else { tabView.setFocusable(true); if (mTabClickListener == null) { mTabClickListener = new TabClickListener(); } tabView.setOnClickListener(mTabClickListener); } return tabView; }
Example 2
Source File: ScrollingTabContainerView.java From zhangshangwuda with Apache License 2.0 | 6 votes |
private TabView createTabView(ActionBar.Tab tab, boolean forAdapter) { //Workaround for not being able to pass a defStyle on pre-3.0 final TabView tabView = (TabView)mInflater.inflate(R.layout.abs__action_bar_tab, null); tabView.init(this, tab, forAdapter); if (forAdapter) { tabView.setBackgroundDrawable(null); tabView.setLayoutParams(new ListView.LayoutParams(ListView.LayoutParams.MATCH_PARENT, mContentHeight)); } else { tabView.setFocusable(true); if (mTabClickListener == null) { mTabClickListener = new TabClickListener(); } tabView.setOnClickListener(mTabClickListener); } return tabView; }
Example 3
Source File: ScrollingTabContainerView.java From android-apps with MIT License | 6 votes |
private TabView createTabView(ActionBar.Tab tab, boolean forAdapter) { //Workaround for not being able to pass a defStyle on pre-3.0 final TabView tabView = (TabView)mInflater.inflate(R.layout.abs__action_bar_tab, null); tabView.init(this, tab, forAdapter); if (forAdapter) { tabView.setBackgroundDrawable(null); tabView.setLayoutParams(new ListView.LayoutParams(ListView.LayoutParams.MATCH_PARENT, mContentHeight)); } else { tabView.setFocusable(true); if (mTabClickListener == null) { mTabClickListener = new TabClickListener(); } tabView.setOnClickListener(mTabClickListener); } return tabView; }
Example 4
Source File: ScrollingTabContainerView.java From zen4android with MIT License | 6 votes |
private TabView createTabView(ActionBar.Tab tab, boolean forAdapter) { //Workaround for not being able to pass a defStyle on pre-3.0 final TabView tabView = (TabView)mInflater.inflate(R.layout.abs__action_bar_tab, null); tabView.init(this, tab, forAdapter); if (forAdapter) { tabView.setBackgroundDrawable(null); tabView.setLayoutParams(new ListView.LayoutParams(ListView.LayoutParams.MATCH_PARENT, mContentHeight)); } else { tabView.setFocusable(true); if (mTabClickListener == null) { mTabClickListener = new TabClickListener(); } tabView.setOnClickListener(mTabClickListener); } return tabView; }
Example 5
Source File: ScrollingTabContainerView.java From CSipSimple with GNU General Public License v3.0 | 5 votes |
public void addTab(ActionBar.Tab tab, boolean setSelected) { TabView tabView = createTabView(tab, false); mTabLayout.addView(tabView, new IcsLinearLayout.LayoutParams(0, LayoutParams.MATCH_PARENT, 1)); if (mTabSpinner != null) { ((TabAdapter) mTabSpinner.getAdapter()).notifyDataSetChanged(); } if (setSelected) { tabView.setSelected(true); } if (mAllowCollapse) { requestLayout(); } }
Example 6
Source File: ScrollingTabContainerView.java From zhangshangwuda with Apache License 2.0 | 5 votes |
public void addTab(ActionBar.Tab tab, int position, boolean setSelected) { final TabView tabView = createTabView(tab, false); mTabLayout.addView(tabView, position, new IcsLinearLayout.LayoutParams( 0, LayoutParams.MATCH_PARENT, 1)); if (mTabSpinner != null) { ((TabAdapter) mTabSpinner.getAdapter()).notifyDataSetChanged(); } if (setSelected) { tabView.setSelected(true); } if (mAllowCollapse) { requestLayout(); } }
Example 7
Source File: ScrollingTabContainerView.java From zen4android with MIT License | 5 votes |
public void init(ScrollingTabContainerView parent, ActionBar.Tab tab, boolean forList) { mParent = parent; mTab = tab; if (forList) { setGravity(Gravity.LEFT | Gravity.CENTER_VERTICAL); } update(); }
Example 8
Source File: ScrollingTabContainerView.java From zen4android with MIT License | 5 votes |
public void addTab(ActionBar.Tab tab, int position, boolean setSelected) { final TabView tabView = createTabView(tab, false); mTabLayout.addView(tabView, position, new IcsLinearLayout.LayoutParams( 0, LayoutParams.MATCH_PARENT, 1)); if (mTabSpinner != null) { ((TabAdapter) mTabSpinner.getAdapter()).notifyDataSetChanged(); } if (setSelected) { tabView.setSelected(true); } if (mAllowCollapse) { requestLayout(); } }
Example 9
Source File: ScrollingTabContainerView.java From Libraries-for-Android-Developers with MIT License | 5 votes |
public void init(ScrollingTabContainerView parent, ActionBar.Tab tab, boolean forList) { mParent = parent; mTab = tab; if (forList) { setGravity(Gravity.LEFT | Gravity.CENTER_VERTICAL); } update(); }
Example 10
Source File: ScrollingTabContainerView.java From zhangshangwuda with Apache License 2.0 | 5 votes |
public void init(ScrollingTabContainerView parent, ActionBar.Tab tab, boolean forList) { mParent = parent; mTab = tab; if (forList) { setGravity(Gravity.LEFT | Gravity.CENTER_VERTICAL); } update(); }
Example 11
Source File: ScrollingTabContainerView.java From android-apps with MIT License | 5 votes |
public void addTab(ActionBar.Tab tab, boolean setSelected) { TabView tabView = createTabView(tab, false); mTabLayout.addView(tabView, new IcsLinearLayout.LayoutParams(0, LayoutParams.MATCH_PARENT, 1)); if (mTabSpinner != null) { ((TabAdapter) mTabSpinner.getAdapter()).notifyDataSetChanged(); } if (setSelected) { tabView.setSelected(true); } if (mAllowCollapse) { requestLayout(); } }
Example 12
Source File: ScrollingTabContainerView.java From CSipSimple with GNU General Public License v3.0 | 5 votes |
public void init(ScrollingTabContainerView parent, ActionBar.Tab tab, boolean forList) { mParent = parent; mTab = tab; if (forList) { setGravity(Gravity.LEFT | Gravity.CENTER_VERTICAL); } update(); }
Example 13
Source File: ScrollingTabContainerView.java From zhangshangwuda with Apache License 2.0 | 5 votes |
public void addTab(ActionBar.Tab tab, boolean setSelected) { TabView tabView = createTabView(tab, false); mTabLayout.addView(tabView, new IcsLinearLayout.LayoutParams(0, LayoutParams.MATCH_PARENT, 1)); if (mTabSpinner != null) { ((TabAdapter) mTabSpinner.getAdapter()).notifyDataSetChanged(); } if (setSelected) { tabView.setSelected(true); } if (mAllowCollapse) { requestLayout(); } }
Example 14
Source File: ScrollingTabContainerView.java From android-apps with MIT License | 4 votes |
public void bindTab(ActionBar.Tab tab) { mTab = tab; update(); }
Example 15
Source File: ScrollingTabContainerView.java From android-apps with MIT License | 4 votes |
public ActionBar.Tab getTab() { return mTab; }
Example 16
Source File: ScrollingTabContainerView.java From Libraries-for-Android-Developers with MIT License | 4 votes |
public ActionBar.Tab getTab() { return mTab; }
Example 17
Source File: ScrollingTabContainerView.java From CSipSimple with GNU General Public License v3.0 | 4 votes |
public ActionBar.Tab getTab() { return mTab; }
Example 18
Source File: ScrollingTabContainerView.java From CSipSimple with GNU General Public License v3.0 | 4 votes |
public void bindTab(ActionBar.Tab tab) { mTab = tab; update(); }
Example 19
Source File: ScrollingTabContainerView.java From zhangshangwuda with Apache License 2.0 | 4 votes |
public void bindTab(ActionBar.Tab tab) { mTab = tab; update(); }
Example 20
Source File: ScrollingTabContainerView.java From zen4android with MIT License | 4 votes |
public ActionBar.Tab getTab() { return mTab; }