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));
}
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();
}
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();
}
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;
}
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();
}
Aggregations