use of android.widget.FrameLayout.LayoutParams in project superCleanMaster by joyoyao.
the class SystemBarTintManager method setupStatusBarView.
private void setupStatusBarView(Context context, ViewGroup decorViewGroup) {
mStatusBarTintView = new View(context);
LayoutParams params = new LayoutParams(LayoutParams.MATCH_PARENT, mConfig.getStatusBarHeight());
params.gravity = Gravity.TOP;
if (mNavBarAvailable && !mConfig.isNavigationAtBottom()) {
params.rightMargin = mConfig.getNavigationBarWidth();
}
mStatusBarTintView.setLayoutParams(params);
mStatusBarTintView.setBackgroundColor(DEFAULT_TINT_COLOR);
mStatusBarTintView.setVisibility(View.GONE);
decorViewGroup.addView(mStatusBarTintView);
}
use of android.widget.FrameLayout.LayoutParams in project android_packages_apps_Dialer by LineageOS.
the class OldSpeedDialFragment method setEmptyViewVisibility.
/* package */
void setEmptyViewVisibility(final boolean visible) {
final int previousVisibility = emptyView.getVisibility();
final int emptyViewVisibility = visible ? View.VISIBLE : View.GONE;
final int listViewVisibility = visible ? View.GONE : View.VISIBLE;
if (previousVisibility != emptyViewVisibility) {
final FrameLayout.LayoutParams params = (LayoutParams) contactTileFrame.getLayoutParams();
params.height = visible ? LayoutParams.WRAP_CONTENT : LayoutParams.MATCH_PARENT;
contactTileFrame.setLayoutParams(params);
emptyView.setVisibility(emptyViewVisibility);
listView.setVisibility(listViewVisibility);
}
}
use of android.widget.FrameLayout.LayoutParams in project android_packages_apps_Dialer by LineageOS.
the class NewSearchFragment method setHeight.
private void setHeight(int start, int end, float percentage) {
View view = getView();
if (view == null) {
return;
}
FrameLayout.LayoutParams params = (LayoutParams) view.getLayoutParams();
params.height = (int) (start + (end - start) * percentage);
view.setLayoutParams(params);
}
Aggregations