Search in sources :

Example 1 with SystemBarTintManager

use of com.readystatesoftware.systembartint.SystemBarTintManager in project UltimateAndroid by cymcsg.

the class PagerSlidingTabStripActivity method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.pager_sliding_tab_activity_main);
    ButterKnife.inject(this);
    setSupportActionBar(toolbar);
    // create our manager instance after the content view is set
    mTintManager = new SystemBarTintManager(this);
    // enable status bar tint
    mTintManager.setStatusBarTintEnabled(true);
    adapter = new MyPagerAdapter(getSupportFragmentManager());
    pager.setAdapter(adapter);
    tabs.setViewPager(pager);
    final int pageMargin = (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 4, getResources().getDisplayMetrics());
    pager.setPageMargin(pageMargin);
    changeColor(getResources().getColor(R.color.Green));
}
Also used : SystemBarTintManager(com.readystatesoftware.systembartint.SystemBarTintManager)

Example 2 with SystemBarTintManager

use of com.readystatesoftware.systembartint.SystemBarTintManager in project SimplifyReader by chentao0707.

the class BaseAppCompatActivity method setSystemBarTintDrawable.

/**
     * use SytemBarTintManager
     *
     * @param tintDrawable
     */
protected void setSystemBarTintDrawable(Drawable tintDrawable) {
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
        SystemBarTintManager mTintManager = new SystemBarTintManager(this);
        if (tintDrawable != null) {
            mTintManager.setStatusBarTintEnabled(true);
            mTintManager.setTintDrawable(tintDrawable);
        } else {
            mTintManager.setStatusBarTintEnabled(false);
            mTintManager.setTintDrawable(null);
        }
    }
}
Also used : SystemBarTintManager(com.readystatesoftware.systembartint.SystemBarTintManager)

Example 3 with SystemBarTintManager

use of com.readystatesoftware.systembartint.SystemBarTintManager in project StickerCamera by Skykai521.

the class BaseActivity method initWindow.

@TargetApi(19)
private void initWindow() {
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
        getWindow().addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
        getWindow().addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION);
        SystemBarTintManager tintManager = new SystemBarTintManager(this);
        tintManager.setStatusBarTintColor(getStatusBarColor());
        tintManager.setStatusBarTintEnabled(true);
    }
}
Also used : SystemBarTintManager(com.readystatesoftware.systembartint.SystemBarTintManager) TargetApi(android.annotation.TargetApi)

Example 4 with SystemBarTintManager

use of com.readystatesoftware.systembartint.SystemBarTintManager in project SystemBarTint by jgilfelt.

the class DefaultActivity method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_default);
    SystemBarTintManager tintManager = new SystemBarTintManager(this);
    tintManager.setStatusBarTintEnabled(true);
    tintManager.setNavigationBarTintEnabled(true);
}
Also used : SystemBarTintManager(com.readystatesoftware.systembartint.SystemBarTintManager)

Example 5 with SystemBarTintManager

use of com.readystatesoftware.systembartint.SystemBarTintManager in project SystemBarTint by jgilfelt.

the class MatchActionBarActivity method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_match_actionbar);
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
        setTranslucentStatus(true);
    }
    SystemBarTintManager tintManager = new SystemBarTintManager(this);
    tintManager.setStatusBarTintEnabled(true);
    tintManager.setStatusBarTintResource(R.color.statusbar_bg);
}
Also used : SystemBarTintManager(com.readystatesoftware.systembartint.SystemBarTintManager)

Aggregations

SystemBarTintManager (com.readystatesoftware.systembartint.SystemBarTintManager)23 TargetApi (android.annotation.TargetApi)5 View (android.view.View)5 SuppressLint (android.annotation.SuppressLint)4 ActionBar (android.support.v7.app.ActionBar)3 LinearLayoutManager (android.support.v7.widget.LinearLayoutManager)2 RecyclerView (android.support.v7.widget.RecyclerView)2 Toolbar (android.support.v7.widget.Toolbar)2 ViewGroup (android.view.ViewGroup)2 LinearLayout (android.widget.LinearLayout)2 TextView (android.widget.TextView)2 Dialog (android.app.Dialog)1 ComponentName (android.content.ComponentName)1 Intent (android.content.Intent)1 SharedPreferences (android.content.SharedPreferences)1 Drawable (android.graphics.drawable.Drawable)1 InsetDrawable (android.graphics.drawable.InsetDrawable)1 AudioEffect (android.media.audiofx.AudioEffect)1 Uri (android.net.Uri)1 AsyncTask (android.os.AsyncTask)1