Search in sources :

Example 1 with SystemBarTintManager

use of com.mixiaoxiao.android.util.SystemBarTintManager in project 9GAG by Mixiaoxiao.

the class MxxBrowserActivity method initPadding.

private void initPadding() {
    SystemBarTintManager tintManager = new SystemBarTintManager(this);
    SystemBarTintManager.SystemBarConfig config = tintManager.getConfig();
    View rootView = findViewById(R.id.mxx_common_activity_browser_webview_rootlayout);
    rootView.setPadding(0, config.getPixelInsetTop(true), config.getPixelInsetRight(), config.getPixelInsetBottom());
    tintManager.setStatusBarTintEnabled(true);
    tintManager.setStatusBarTintDrawable(new ColorDrawable(getResources().getColor(R.color.mxx_item_theme_color_alpha)));
    tintManager.setNavigationBarTintEnabled(true);
    tintManager.setNavigationBarTintDrawable(new ColorDrawable(0xff393d43));
}
Also used : ColorDrawable(android.graphics.drawable.ColorDrawable) SystemBarTintManager(com.mixiaoxiao.android.util.SystemBarTintManager) View(android.view.View) WebView(android.webkit.WebView)

Example 2 with SystemBarTintManager

use of com.mixiaoxiao.android.util.SystemBarTintManager in project 9GAG by Mixiaoxiao.

the class MainActivity method initTint.

private void initTint() {
    SystemBarTintManager tintManager = new SystemBarTintManager(this);
    SystemBarTintManager.SystemBarConfig config = tintManager.getConfig();
    //		tintManager.setStatusBarTintEnabled(true);
    //		tintManager.setStatusBarTintDrawable(new ColorDrawable(getResources().getColor(R.color.mxx_item_theme_color_alpha)));
    //mPagerSlidingTabStrip.setPadding(0, config.getPixelInsetTop(true), config.getPixelInsetRight(), 0);
    //		View rootView = findViewById(R.id.main_layout_root);
    tabLayout = findViewById(R.id.main_tab_layout);
    FrameLayout.LayoutParams layoutParams = (FrameLayout.LayoutParams) tabLayout.getLayoutParams();
    layoutParams.topMargin = config.getPixelInsetTop(true);
    //		layoutParams.height = MxxUiUtil.dip2px(this, 48) + config.getPixelInsetTop(true);
    tabLayout.requestLayout();
}
Also used : FrameLayout(android.widget.FrameLayout) SystemBarTintManager(com.mixiaoxiao.android.util.SystemBarTintManager)

Example 3 with SystemBarTintManager

use of com.mixiaoxiao.android.util.SystemBarTintManager in project 9GAG by Mixiaoxiao.

the class GagFragment method initInsetTop.

private void initInsetTop(View rootView) {
    SystemBarTintManager tintManager = new SystemBarTintManager(getActivity());
    SystemBarTintManager.SystemBarConfig config = tintManager.getConfig();
    rootView.setPadding(0, config.getPixelInsetTop(true) + MxxUiUtil.dip2px(getActivity(), 48), config.getPixelInsetRight(), config.getPixelInsetBottom());
    rootView.requestLayout();
}
Also used : SystemBarTintManager(com.mixiaoxiao.android.util.SystemBarTintManager)

Example 4 with SystemBarTintManager

use of com.mixiaoxiao.android.util.SystemBarTintManager in project 9GAG by Mixiaoxiao.

the class ImageFragment method onCreateView.

@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    // TODO Auto-generated method stub
    rootView = (RelativeLayout) inflater.inflate(R.layout.fragment_image, null);
    rootView.setVisibility(View.INVISIBLE);
    mImageTitleTextView = (TextView) rootView.findViewById(R.id.fragment_image_title_textview);
    ((View) mImageTitleTextView.getParent()).setAlpha(0);
    mProgressWheel = (ProgressWheel) rootView.findViewById(R.id.fragment_image_progresswheel);
    mImageViewEx = (ImageViewEx) rootView.findViewById(R.id.fragment_image_imageViewex);
    mImageViewEx.setFillDirection(ImageViewEx.FillDirection.HORIZONTAL);
    blurView = (MxxBlurView) rootView.findViewById(R.id.fragment_image_blurview);
    this.mScaleImageView = (MxxScaleImageView) rootView.findViewById(R.id.fragment_image_scaleimageview);
    mScaleImageView.setBlurView(blurView);
    SystemBarTintManager manager = new SystemBarTintManager(getActivity());
    View view = (View) mScaleImageView.getParent();
    view.setPadding(0, manager.getConfig().getPixelInsetTop(true), 0, 0);
    return rootView;
}
Also used : SystemBarTintManager(com.mixiaoxiao.android.util.SystemBarTintManager) MxxScaleImageView(com.mixiaoxiao.android.view.MxxScaleImageView) ImageView(android.widget.ImageView) MxxBlurView(com.mixiaoxiao.android.blur.MxxBlurView) View(android.view.View) TextView(android.widget.TextView)

Example 5 with SystemBarTintManager

use of com.mixiaoxiao.android.util.SystemBarTintManager in project 9GAG by Mixiaoxiao.

the class AboutActivity method initInsetTop.

private void initInsetTop() {
    SystemBarTintManager tintManager = new SystemBarTintManager(this);
    SystemBarTintManager.SystemBarConfig config = tintManager.getConfig();
    tabLayout = findViewById(R.id.about_tab_layout);
    FrameLayout.LayoutParams layoutParams = (FrameLayout.LayoutParams) tabLayout.getLayoutParams();
    layoutParams.topMargin = config.getPixelInsetTop(true);
    //		layoutParams.height = MxxUiUtil.dip2px(this, 48) + config.getPixelInsetTop(true);
    tabLayout.requestLayout();
    final int top_margin = MxxUiUtil.dip2px(this, 48);
    view_gag.setPadding(0, config.getPixelInsetTop(true) + top_margin, config.getPixelInsetRight(), config.getPixelInsetBottom());
    view_gag.requestLayout();
    view_me.setPadding(0, config.getPixelInsetTop(true) + top_margin, config.getPixelInsetRight(), config.getPixelInsetBottom());
    view_me.requestLayout();
}
Also used : FrameLayout(android.widget.FrameLayout) SystemBarTintManager(com.mixiaoxiao.android.util.SystemBarTintManager)

Aggregations

SystemBarTintManager (com.mixiaoxiao.android.util.SystemBarTintManager)5 View (android.view.View)2 FrameLayout (android.widget.FrameLayout)2 ColorDrawable (android.graphics.drawable.ColorDrawable)1 WebView (android.webkit.WebView)1 ImageView (android.widget.ImageView)1 TextView (android.widget.TextView)1 MxxBlurView (com.mixiaoxiao.android.blur.MxxBlurView)1 MxxScaleImageView (com.mixiaoxiao.android.view.MxxScaleImageView)1