Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- LinearLayout.LayoutParams navigationBarParams =
- new LinearLayout.LayoutParams(0, (int)(BAR_DEFAULT_HEIGHT_DP * density) );
- _navigationBar.setId(R.id.navigation_fragment_navigation_bar);
- _navigationBar.setPadding(0, 0, 0, 0);
- _navigationBar.setLayoutParams(navigationBarParams);
- _navigationBar.setOrientation(LinearLayout.HORIZONTAL);
- _navigationBar.setBaselineAligned(false);
- _navigationBar.setWeightSum(6f);
- _navigationBar.setElevation(20.0f);
- ConstraintLayout con = (ConstraintLayout)_rootView.findViewById(_rootConstraintLayoutId);
- con.addView(_navigationBar);
- ConstraintSet set = new ConstraintSet();
- set.clone(con);
- set.constrainWidth(_navigationBar.getId(), 0);
- set.connect(_navigationBar.getId(), ConstraintSet.TOP, con.getId(), ConstraintSet.TOP, 100 ); //work!
- set.connect(_navigationBar.getId(), ConstraintSet.LEFT, con.getId(), ConstraintSet.LEFT,100 ); //not work!!
- set.connect(_navigationBar.getId(), ConstraintSet.RIGHT, con.getId(), ConstraintSet.RIGHT, 100 ); //not work!!
- set.applyTo(con);
Add Comment
Please, Sign In to add comment