dzikovskyy

My location button position (Google maps, Android)

Nov 25th, 2016
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.43 KB | None | 0 0
  1. if (mMapFragment.getView() != null) {
  2.     View locationButton = ((View) mMapFragment.getView().findViewById(Integer.parseInt("1")).getParent()).findViewById(Integer.parseInt("2"));
  3.     RelativeLayout.LayoutParams rlp = (RelativeLayout.LayoutParams) locationButton.getLayoutParams();
  4.     rlp.addRule(RelativeLayout.ALIGN_PARENT_TOP, 0);
  5.     rlp.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM, RelativeLayout.TRUE);
  6.     rlp.setMargins(0, 0, 30, 30);
  7. }
Add Comment
Please, Sign In to add comment