List of usage examples for android.widget TextView setFocusable
public void setFocusable(boolean focusable)
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. j av a 2 s .c om 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:larry.baby.rain.common.view.TabPageIndicator.java
private void addTab(CharSequence text, int index) { Context context = getContext(); DisplayMetrics dm = context.getResources().getDisplayMetrics(); int padX = (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 22, dm); int padY = (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 12, dm); TextView tabView = new TextView(context); tabView.setBackgroundResource(R.drawable.vpi__tab_indicator); tabView.setPadding(padX, padY, padX, padY); tabView.setGravity(Gravity.CENTER);// ww w . j av a2s. com tabView.setTextColor(0xfff3f3f3); tabView.setTextSize(TypedValue.COMPLEX_UNIT_SP, 12); tabView.setTypeface(tabView.getTypeface(), Typeface.BOLD); tabView.setSingleLine(); tabView.setTag(index); tabView.setFocusable(true); tabView.setOnClickListener(this); tabView.setText(text); mTabLayout.addView(tabView, new LinearLayout.LayoutParams(0, LayoutParams.MATCH_PARENT, 1)); }
From source file:com.xxjwd.libs.PagerSlidingTabStrip.java
private void addTextTab(final int position, String title) { TextView tab = new TextView(getContext()); /*from w w w . ja v a 2 s . c o m*/ tab.setFocusable(true); tab.setGravity(Gravity.CENTER); tab.setSingleLine(); tab.setText(title); tab.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { pager.setCurrentItem(position); } }); tabsContainer.addView(tab); }
From source file:za.jamie.soundstage.widgets.PagerSlidingTabStrip.java
private void addTab(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.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.anjuke.library.uicomponent.slidingtab.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. c om*/ 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.grepsound.views.PagerSlidingTabStrip.java
private void addTextTab(final int position, String title) { TextView tab = new TextView(getContext()); tab.setText(title);// w ww . j a va 2s . c om 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:cn.com.incito.driver.UI.detailDialog.PagerSlidingTabStrip.java
private void addTextTab(final int position, String title) { TextView tab = new TextView(getContext()); tab.setText(title);/*from w w w .j a v a 2 s .c o m*/ tab.setFocusable(true); tab.setGravity(Gravity.CENTER); tab.setLayoutParams(new LinearLayout.LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT, 1)); tab.setSingleLine(); tab.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { pager.setCurrentItem(position); } }); tabsContainer.addView(tab); }
From source file:com.findhotel.widget.PagerSlidingTabStrip.java
private void addTextTab(final int position, String title) { TextView tab = new TextView(getContext()); tab.setText(title);/*from www . j a va 2s .c om*/ 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:asia.utopia.musicoff.view.PagerSlidingTabStrip.java
private void addTextTab(final int position, String title) { TextView tab = new TextView(getContext()); tab.setText(title);//from www.ja v a 2 s . co 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.example.helloandroid.animation.PagerSlidingTabStrip.java
private void addTextTab(final int position, String title) { TextView tab = new TextView(getContext()); tab.setText(title);/*from ww w .ja v a2 s . c om*/ 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); }