本文整理汇总了Java中com.flyco.tablayout.CommonTabLayout类的典型用法代码示例。如果您正苦于以下问题:Java CommonTabLayout类的具体用法?Java CommonTabLayout怎么用?Java CommonTabLayout使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
CommonTabLayout类属于com.flyco.tablayout包,在下文中一共展示了CommonTabLayout类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: initView
import com.flyco.tablayout.CommonTabLayout; //导入依赖的package包/类
private void initView() {
//TODO
drop_concrol = (PullUpToLoadMore)findViewById(R.id.baby_ActivityDropConcrol);
viewPager_2 = (ViewPager) findViewById(R.id.baby_activity_viewPager_2);
//viewPager_2.setOffscreenPageLimit(3);
tab = (CommonTabLayout) findViewById(R.id.baby_activity_tab);
squareBlockView = (SquareBlockView) findViewById(R.id.sss);
squareBlockView.bitmap = BitmapFactory.decodeResource(getResources(), R.drawable.jin);
squareBlockView.postInvalidate();
baby_tiele = (TextView) findViewById(R.id.baby_tiele);
baby_tiele.setText(Title_address.title[title_address_offset_value]);
loading_layout = (RelativeLayout) findViewById(R.id.loading_layout);
rotateLoading = (RotateLoading) findViewById(R.id.rotateloading);
rotateLoading.start();
viewPager = (ViewPager) findViewById(R.id.baby_activity_viewPager);
extensiblePageIndicator = (ExtensiblePageIndicator) findViewById(R.id.flexibleIndicator);
//设置头像
myView = (MyView) findViewById(R.id.baby_user);
myView.bitmap = BitmapFactory.decodeResource(getResources(), R.mipmap.user);
myView.postInvalidate();
}
示例2: obtainAttributes
import com.flyco.tablayout.CommonTabLayout; //导入依赖的package包/类
private void obtainAttributes(Context context, AttributeSet attrs) {
TypedArray ta = context.obtainStyledAttributes(attrs, R.styleable.CommonTabLayout);
mIndicatorColorResId = ta.getResourceId(R.styleable.CommonTabLayout_tl_indicator_color, INVALID_ID);
mIndicatorColorResId = SkinCompatHelper.checkResourceId(mIndicatorColorResId);
mUnderlineColorResId = ta.getResourceId(R.styleable.CommonTabLayout_tl_underline_color, INVALID_ID);
mUnderlineColorResId = SkinCompatHelper.checkResourceId(mUnderlineColorResId);
mDividerColorResId = ta.getResourceId(R.styleable.CommonTabLayout_tl_divider_color, INVALID_ID);
mDividerColorResId = SkinCompatHelper.checkResourceId(mDividerColorResId);
mTextSelectColorResId = ta.getResourceId(R.styleable.CommonTabLayout_tl_textSelectColor, INVALID_ID);
mTextSelectColorResId = SkinCompatHelper.checkResourceId(mTextSelectColorResId);
mTextUnselectColorResId = ta.getResourceId(R.styleable.CommonTabLayout_tl_textUnselectColor, INVALID_ID);
mTextUnselectColorResId = SkinCompatHelper.checkResourceId(mTextUnselectColorResId);
ta.recycle();
applyCommonTabLayoutResources();
}
示例3: setTabLayout
import com.flyco.tablayout.CommonTabLayout; //导入依赖的package包/类
@Override
public void setTabLayout(CommonTabLayout tabLayout) {
tabLayout.setTextSelectColor(getResources().getColor(R.color.colorMainNews));
tabLayout.setIconHeight(20);
tabLayout.setIconWidth(20);
tabLayout.setTextsize(10);
}
示例4: setTabLayout
import com.flyco.tablayout.CommonTabLayout; //导入依赖的package包/类
@Override
public void setTabLayout(CommonTabLayout tabLayout) {
tabLayout.setTextsize(10);
tabLayout.setIconMargin(2);
tabLayout.setIconWidth(22);
tabLayout.setIconHeight(22);
tabLayout.setTextSelectColor(getResources().getColor(R.color.colorMainAli));
}
示例5: onCreate
import com.flyco.tablayout.CommonTabLayout; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_test_tab);
mTabLayout_8 = (CommonTabLayout) findViewById(R.id.tl_88);
ivTest = (SubsamplingScaleImageView) findViewById(R.id.iv_test);
ivTest.setImage(ImageSource.uri("/sdcard/nopicture.jpg"));
for (int i = 0; i < mTitles.length; i++) {
mTabEntities.add(new TabEntity(mTitles[i], mIconSelectIds[i], mIconUnselectIds[i]));
}
mTabLayout_8.setTabData(mTabEntities);
//设置默认选中的item
mTabLayout_8.setCurrentTab(0);
}
示例6: initViews
import com.flyco.tablayout.CommonTabLayout; //导入依赖的package包/类
@Override
public void initViews() {
FragmentManager mFragmentManager = getSupportFragmentManager();
tabHost = (CommonTabLayout) findViewById(R.id.tabHost);
mainPager = (ViewPager) findViewById(R.id.mainPager);
imgeMainLead=(ImageView)findViewById(R.id.img_main_lead);
adapter = new ViewPagerAdapter(getSupportFragmentManager());
mainPager.setAdapter(adapter);
for (int i = 0; i < titles.length; i++) {
mTabEntities.add(new TabEntity(titles[i], mIconSelectIds[i], mIconUnselectIds[i]));
}
tabhost();
}
示例7: initViews
import com.flyco.tablayout.CommonTabLayout; //导入依赖的package包/类
@Override
public void initViews() {
FragmentManager mFragmentManager = getSupportFragmentManager();
tabHost = (CommonTabLayout) findViewById(R.id.tabHost);
mainPager = (ViewPager) findViewById(R.id.mainPager);
// imgeMainLead=(ImageView)findViewById(R.id.img_main_lead);
adapter = new ViewPagerAdapter(getSupportFragmentManager());
mainPager.setAdapter(adapter);
mainPager .setOffscreenPageLimit(2);
for (int i = 0; i < titles.length; i++) {
mTabEntities.add(new TabEntity(titles[i], mIconSelectIds[i], mIconUnselectIds[i]));
}
tabhost();
}
示例8: onCreate
import com.flyco.tablayout.CommonTabLayout; //导入依赖的package包/类
@Override
public void onCreate(Bundle savedInstanceState) {
//切换daynight模式要立即变色的页面
//ChangeModeController.getInstance().init(this,R.attr.class);
super.onCreate(savedInstanceState);
//初始化frament
setContentView(R.layout.act_main);
tabLayout= (CommonTabLayout) findViewById(R.id.tab_layout_main);
initFragment(savedInstanceState);
tabLayout.measure(0,0);
tabLayoutHeight=tabLayout.getMeasuredHeight();
mTvTopName.setText(SharedPreferenceHelper.getUserNickName());
initTab();
//监听菜单显示或隐藏
}
示例9: setTabLayout
import com.flyco.tablayout.CommonTabLayout; //导入依赖的package包/类
@Override
public void setTabLayout(CommonTabLayout tabLayout) {
}
示例10: setCommonTabData
import com.flyco.tablayout.CommonTabLayout; //导入依赖的package包/类
public void setCommonTabData(Fragment fragment, final CommonTabLayout tabLayout, final ViewPager viewPager,
ArrayList<CustomTabEntity> tabs, List<Fragment> fragments) {
setCommonTabData(fragment, tabLayout, viewPager, tabs, fragments, null);
}
示例11: setTabLayout
import com.flyco.tablayout.CommonTabLayout; //导入依赖的package包/类
/**
* 返回CommonTabLayout 对象用于自定义设置
*
* @param tabLayout
*/
void setTabLayout(CommonTabLayout tabLayout);