當前位置: 首頁>>代碼示例>>Java>>正文


Java TitleBarView類代碼示例

本文整理匯總了Java中com.aries.ui.view.title.TitleBarView的典型用法代碼示例。如果您正苦於以下問題:Java TitleBarView類的具體用法?Java TitleBarView怎麽用?Java TitleBarView使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


TitleBarView類屬於com.aries.ui.view.title包,在下文中一共展示了TitleBarView類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: initTitle

import com.aries.ui.view.title.TitleBarView; //導入依賴的package包/類
protected void initTitle() {
    titleBar = (TitleBarView) findViewById(R.id.titleBar);
    if (titleBar == null) {
        return;
    }
    type = titleBar.getStatusBarModeType();
    if (type <= 0) {//無法設置白底黑字
        titleBar.setStatusAlpha(102);//5.0 半透明模式alpha-102
    }
    titleBar.setTitleMainText(mContext.getClass().getSimpleName());
    setTitleBar();
    titleBar.setOnLeftTextClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            onBackPressed();
        }
    });
    setTitleLine(isShowLine());
}
 
開發者ID:AriesHoo,項目名稱:TitleBarView,代碼行數:20,代碼來源:BaseActivity.java

示例2: setTitleBar

import com.aries.ui.view.title.TitleBarView; //導入依賴的package包/類
@Override
public void setTitleBar(TitleBarView titleBar) {
    titles = getResources().getStringArray(R.array.arrays_tab_news);
    mPosition = getArguments().getInt("position");
    titleBar.setTitleMainTextSize(TypedValue.COMPLEX_UNIT_DIP, 16);
    if (mPosition == 3) {
        titleBar.setTitleMainTextColor(Color.WHITE)
                .setBackgroundResource(R.color.colorMainAli);
    }
    if (mPosition == 0 || mPosition == 2) {
        View view = View.inflate(mContext, R.layout.layout_news_sliding, null);
        mSlidingTab = view.findViewById(R.id.tabLayout_slidingNews);
        titleBar.addCenterAction(titleBar.new ViewAction(view));
    } else {
        titleBar.setTitleMainText(titles[mPosition]);
    }
    titleBar.setLeftTextDrawable(mPosition == 0 || mPosition == 1 ? R.drawable.ic_news_search : 0)
            .setLeftText(mPosition == 1 ? getString(R.string.find) : "")
            .setRightTextDrawable(mPosition == 3 ? R.drawable.ic_news_setting_normal : mPosition == 0 ? R.drawable.ic_news_channel_plus : 0);
}
 
開發者ID:AriesHoo,項目名稱:FastLib,代碼行數:21,代碼來源:NewsItemFragment.java

示例3: setTitleBar

import com.aries.ui.view.title.TitleBarView; //導入依賴的package包/類
@Override
public void setTitleBar(TitleBarView titleBar) {
    title = getIntent().getStringExtra("title");
    titleBar.setStatusAlpha(102)
            .setCenterGravityLeft(true)
            .setCenterGravityLeftPadding(SizeUtil.dp2px(24))
            .setTitleMainText(title)
            .setTitleMainTextColor(Color.WHITE)
            .setLeftTextDrawable(R.drawable.ic_back_white)
            .setBackgroundColor(Color.parseColor("#38393E"));
}
 
開發者ID:AriesHoo,項目名稱:FastLib,代碼行數:12,代碼來源:SwipeBackActivity.java

示例4: setTitleBar

import com.aries.ui.view.title.TitleBarView; //導入依賴的package包/類
@Override
public void setTitleBar(TitleBarView titleBar) {
    titleBar.setLeftTextDrawable(R.drawable.ic_back_white)
            .setTitleMainText("QQ默認主題TitleBar背景漸變")
            .setTitleMainTextColor(Color.WHITE)
            .setBackgroundResource(R.drawable.shape_qq_bg);
}
 
開發者ID:AriesHoo,項目名稱:FastLib,代碼行數:8,代碼來源:QQTitleActivity.java

示例5: beforeSetTitleBar

import com.aries.ui.view.title.TitleBarView; //導入依賴的package包/類
@Override
public void beforeSetTitleBar(TitleBarView titleBar) {
    super.beforeSetTitleBar(titleBar);
    titles = getResources().getStringArray(R.array.arrays_tab_ali);
    titleBar.setStatusAlpha(75)
            .setLeftTextColor(Color.WHITE)
            .setRightTextColor(Color.WHITE)
            .setLeftTextSize(TypedValue.COMPLEX_UNIT_DIP, 16)
            .setRightTextSize(TypedValue.COMPLEX_UNIT_DIP, 16)
            .setBackgroundResource(R.color.colorMainAli);
}
 
開發者ID:AriesHoo,項目名稱:FastLib,代碼行數:12,代碼來源:ALiPayBaseFragment.java

示例6: setTitleBar

import com.aries.ui.view.title.TitleBarView; //導入依賴的package包/類
@Override
public void setTitleBar(TitleBarView titleBar) {
    titleBar.setLeftText(titles[mPosition]);
    if (mPosition == 3) {
        titleBar.setRightText(R.string.setting);
    }
}
 
開發者ID:AriesHoo,項目名稱:FastLib,代碼行數:8,代碼來源:ALiPayItemFragment.java

示例7: setTitleBar

import com.aries.ui.view.title.TitleBarView; //導入依賴的package包/類
@Override
public void setTitleBar(TitleBarView titleBar) {
    isSliding = (boolean) SPUtil.get(mContext, SPConstant.SP_KEY_ACTIVITY_TAB_SLIDING, true);
    if (isSliding && viewSliding == null) {
        viewSliding = View.inflate(mContext, R.layout.layout_activity_sliding, null);
        mSlidingTab = viewSliding.findViewById(R.id.tabLayout_slidingActivity);
    } else if (!isSliding && viewSegment == null) {
        viewSegment = View.inflate(mContext, R.layout.layout_activity_segment, null);
        mSegmentTab = viewSegment.findViewById(R.id.tabLayout_segment);
    }
    LinearLayout center = titleBar.getLinearLayout(Gravity.CENTER);
    if (isSliding) {
        if (center.indexOfChild(viewSliding) == -1) {
            titleBar.addCenterAction(titleBar.new ViewAction(viewSliding));
        }
        viewSliding.setVisibility(View.VISIBLE);
        if (viewSegment != null) {
            viewSegment.setVisibility(View.GONE);
        }
    } else {
        if (center.indexOfChild(viewSegment) == -1) {
            titleBar.addCenterAction(titleBar.new ViewAction(viewSegment));
        }
        viewSegment.setVisibility(View.VISIBLE);
        if (viewSliding != null) {
            viewSliding.setVisibility(View.GONE);
        }
    }
}
 
開發者ID:AriesHoo,項目名稱:FastLib,代碼行數:30,代碼來源:ActivityFragment.java

示例8: setTitleBar

import com.aries.ui.view.title.TitleBarView; //導入依賴的package包/類
@Override
public void setTitleBar(TitleBarView titleBar) {
    if (!mIsShowTitle) {
        titleBar.setVisibility(View.GONE);
    }
    titleBar.setTitleMainTextMarquee(true)
            .setDividerVisible(Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP);
}
 
開發者ID:AriesHoo,項目名稱:FastLib,代碼行數:9,代碼來源:WebViewActivity.java

示例9: setTitleBar

import com.aries.ui.view.title.TitleBarView; //導入依賴的package包/類
@Override
public void setTitleBar(TitleBarView titleBar) {
    titleBar.setVisibility(View.GONE);
}
 
開發者ID:AriesHoo,項目名稱:FastLib,代碼行數:5,代碼來源:SplashActivity.java

示例10: setTitleBar

import com.aries.ui.view.title.TitleBarView; //導入依賴的package包/類
@Override
public void setTitleBar(TitleBarView titleBar) {
    titleBar.setTitleMainText("ToastUtil工具類示例");
}
 
開發者ID:AriesHoo,項目名稱:FastLib,代碼行數:5,代碼來源:ToastActivity.java

示例11: beforeSetTitleBar

import com.aries.ui.view.title.TitleBarView; //導入依賴的package包/類
@Override
public void beforeSetTitleBar(TitleBarView titleBar) {
    mPosition = getArguments().getInt("position");
    super.beforeSetTitleBar(titleBar);
}
 
開發者ID:AriesHoo,項目名稱:FastLib,代碼行數:6,代碼來源:ALiPayItemFragment.java

示例12: setTitleBar

import com.aries.ui.view.title.TitleBarView; //導入依賴的package包/類
@Override
public void setTitleBar(TitleBarView titleBar) {
    titleBar.setTitleMainText("Activity直接嵌套Fragment懶加載效果")
            .setTitleMainTextSize(TypedValue.COMPLEX_UNIT_DIP,16)
            .setTitleMainTextMarquee(true);
}
 
開發者ID:AriesHoo,項目名稱:FastLib,代碼行數:7,代碼來源:TestFragmentActivity.java

示例13: setTitleBar

import com.aries.ui.view.title.TitleBarView; //導入依賴的package包/類
@Override
public void setTitleBar(TitleBarView titleBar) {
    titleBar.setTitleMainText(R.string.third_part);
}
 
開發者ID:AriesHoo,項目名稱:FastLib,代碼行數:5,代碼來源:ThirdLibraryActivity.java

示例14: setTitleBar

import com.aries.ui.view.title.TitleBarView; //導入依賴的package包/類
@Override
public void setTitleBar(TitleBarView titleBar) {
    titleBar.setTitleMainText(R.string.setting);
}
 
開發者ID:AriesHoo,項目名稱:FastLib,代碼行數:5,代碼來源:SettingActivity.java

示例15: setTitleBar

import com.aries.ui.view.title.TitleBarView; //導入依賴的package包/類
@Override
public void setTitleBar(TitleBarView titleBar) {
    titleBar.setTitleMainText(R.string.mine);
}
 
開發者ID:AriesHoo,項目名稱:FastLib,代碼行數:5,代碼來源:MineFragment.java


注:本文中的com.aries.ui.view.title.TitleBarView類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。