use of android.widget.FrameLayout.LayoutParams in project UltimateAndroid by cymcsg.
the class SuperAwesomeCardFragment method onCreateView.
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
LayoutParams params = new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT);
params.gravity = Gravity.CENTER;
FrameLayout fl = new FrameLayout(getActivity());
fl.setLayoutParams(params);
final int margin = (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 8, getResources().getDisplayMetrics());
TextView v = new TextView(getActivity());
params.setMargins(margin, margin, margin, margin);
v.setLayoutParams(params);
v.setGravity(Gravity.CENTER);
v.setBackgroundResource(R.drawable.view_sliding_tab_background_card);
v.setText("CARD " + (position + 1));
fl.addView(v);
return fl;
}
use of android.widget.FrameLayout.LayoutParams in project Klyph by jonathangerbaud.
the class KlyphFakeHeaderGridFragment method onViewCreated.
@Override
public void onViewCreated(View view, Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
MultiObjectAdapter adapter = new MultiObjectAdapter(getListView(), getSpecialLayout());
LayoutParams params = (LayoutParams) getGridView().getEmptyView().getLayoutParams();
params.topMargin = fakeHeaderHeight;
getGridView().getEmptyView().setLayoutParams(params);
View progress = view.findViewById(android.R.id.progress);
params = (LayoutParams) progress.getLayoutParams();
params.topMargin = fakeHeaderHeight;
params.gravity = Gravity.CENTER_HORIZONTAL | Gravity.TOP;
progress.setLayoutParams(params);
setListAdapter(adapter);
}
use of android.widget.FrameLayout.LayoutParams in project ImagePicker by jeasonlzy.
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 9GAG by Mixiaoxiao.
the class SystemBarTintManager method setupNavBarView.
private void setupNavBarView(Context context, ViewGroup decorViewGroup) {
mNavBarTintView = new View(context);
LayoutParams params;
if (mConfig.isNavigationAtBottom()) {
params = new LayoutParams(LayoutParams.MATCH_PARENT, mConfig.getNavigationBarHeight());
params.gravity = Gravity.BOTTOM;
} else {
params = new LayoutParams(mConfig.getNavigationBarWidth(), LayoutParams.MATCH_PARENT);
params.gravity = Gravity.RIGHT;
}
mNavBarTintView.setLayoutParams(params);
mNavBarTintView.setBackgroundColor(DEFAULT_TINT_COLOR);
mNavBarTintView.setVisibility(View.GONE);
decorViewGroup.addView(mNavBarTintView);
}
use of android.widget.FrameLayout.LayoutParams in project CircleDemo by Naoki2015.
the class SystemBarUtil 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);
}
Aggregations