List of usage examples for android.widget TextView setSingleLine
public void setSingleLine()
From source file:itstudio.travel.widget.PagerSlidingTabStrip.java
private void addTextTab(final int position, String title) { TextView tab = new TextView(getContext()); tab.setText(title);//from w w w.ja v a 2 s .co m tab.setGravity(Gravity.CENTER); tab.setSingleLine(); addTab(position, tab); }
From source file:aierjun.com.aierjunlibrary.widget.tablayout.PagerSlidingTabStrip.java
private void addTextTab(final int position, String title) { TextView tab = new TextView(getContext()); tab.setText(title);/*from w ww .j av a 2 s . c o m*/ tab.setGravity(Gravity.CENTER); tab.setSingleLine(); addTab(position, tab); }
From source file:com.qhzlwh.yigua.view.PagerTab.java
@SuppressWarnings("unused") private void addTextTab(final int position, String title) { TextView tab = new TextView(getContext()); tab.setText(title);/*from w w w. j av a 2 s . c o m*/ tab.setGravity(Gravity.CENTER); tab.setSingleLine(); addTab(position, tab); }
From source file:com.qhzlwh.yigua.view.PagerTab.java
@SuppressWarnings("unused") private void addTextTab(final int position, String title, int icon, int hilight) { TextView tab = new TextView(getContext()); tab.setText(title);/*ww w . j a v a 2s . co m*/ tab.setGravity(Gravity.CENTER); tab.setSingleLine(); addTab(position, tab); }
From source file:com.jianghua.viewpagerwithhead.widget.PagerSlidingTabStrip.java
private void addTextTab(final int position, String title) { TextView tab = new TextView(getContext()); tab.setText(title);//from w w w. jav a2 s.c o m tab.setGravity(Gravity.CENTER); tab.setSingleLine(); //Jobs if (position == 0) { tab.setTextColor(getContext().getResources().getColor(R.color.green)); tab.setTextSize(tabPressedTextSize); } else { tab.setTextColor(getContext().getResources().getColor(R.color.black)); tab.setTextSize(tabTextSize); } addTab(position, tab); }
From source file:com.muzima.view.custom.PagerSlidingTabStrip.java
private void addTab(final int position, String title) { TextView tab = new TextView(getContext()); tab.setText(title);/*from w w w .ja v a 2 s.c o m*/ tab.setFocusable(true); tab.setGravity(Gravity.CENTER); tab.setSingleLine(); tab.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { pager.setCurrentItem(position); } }); tabsContainer.addView(tab); }
From source file:com.dashihui.afford.ui.widget.WdtPagerSlidingTabStrip.java
private void addTextTab(final int position, String title) { TextView tab = new TextView(getContext()); tab.setText(title);//w w w . j a v a 2s . com tab.setGravity(Gravity.CENTER); tab.setSingleLine(); addTab(position, tab); mTextViewMap.put(position, tab); }
From source file:com.icoder.couldnewsclient.widget.PagerSlidingTabStrip.java
private void addTextTab(final int position, String title) { TextView tab = new TextView(getContext()); tab.setText(title);/* ww w.j av a2 s . c o m*/ tab.setGravity(Gravity.CENTER); tab.setSingleLine(); // if (position == 0) { selectedTabText = tab; } addTab(position, tab); }
From source file:com.unique.mofaforhackday.view.PagerSlidingTabStrip.java
private void addTextTab(final int position, String title) { TextView tab = new TextView(getContext()); tab.setText(title);/*from w ww . j ava 2 s . c om*/ tab.setTextColor(0xFFFFFFFF); tab.setGravity(Gravity.CENTER); tab.setSingleLine(); addTab(position, tab); }
From source file:com.dudu.duduhelper.widget.PagerSlidingTabStrip.java
private void addTextTab(final int position, String title) { TextView tab = new TextView(getContext()); tab.setText(title);// w w w.j a va2 s. com tab.setGravity(Gravity.CENTER); tab.setSingleLine(); addTab(position, tab); // MessageButton tab=new MessageButton(getContext()); // tab.setText(title); // if(TextUtils.isEmpty(num)) // { // tab.setVisibility(View.GONE); // } // tab.setNum(num); // addTab(position, tab); }