Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static void teken(Coupe coupe, ViewGroup container, Context context, Nsbeacon beacon) {
- // LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
- // RelativeLayout coupeDrukteLayout = (RelativeLayout)inflater.inflate(R.layout.coupe_drukte_layout, null);
- // container.addView(coupeDrukteLayout, 0 , new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, 1000));
- RelativeLayout coupeDrukteLayout = (RelativeLayout) container.findViewById(R.id.drukte_balk);
- coupeDrukteLayout.setBackgroundColor(getKleurCoupeOpBasisVanBezetting(coupe.getCapaciteit(), coupe.getBezetting()));
- if(beacon != null) {
- if(beacon.getCoupeId().getCoupeId() == coupe.getCoupeId()) {
- Log.d("You are in coupe:", String.valueOf(beacon.getCoupeId().getCoupeId()));
- RelativeLayout plaatsInCoupe = new RelativeLayout(context);
- container.addView(plaatsInCoupe);
- RelativeLayout.LayoutParams params = new RelativeLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT,ViewGroup.LayoutParams.WRAP_CONTENT);
- params.addRule(RelativeLayout.BELOW, coupeDrukteLayout.getId());
- params.addRule(RelativeLayout.ALIGN_BASELINE, coupeDrukteLayout.getId());
- plaatsInCoupe.setLayoutParams(params);
- TextView tv = new TextView(context);
- tv.setText("U bent hier");
- plaatsInCoupe.addView(tv);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement